pulsemcp-cms-admin-mcp-server 0.9.12 → 0.9.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -24,7 +24,6 @@ function truncateExamResultData(data) {
|
|
|
24
24
|
const truncated = {};
|
|
25
25
|
for (const [key, value] of Object.entries(data)) {
|
|
26
26
|
if (key === 'tools' && Array.isArray(value)) {
|
|
27
|
-
// For tool listings, include only name and description, omit inputSchema
|
|
28
27
|
truncated[key] = value.map((tool) => ({
|
|
29
28
|
name: tool.name,
|
|
30
29
|
...(tool.description ? { description: String(tool.description).slice(0, 100) } : {}),
|
|
@@ -33,20 +32,18 @@ function truncateExamResultData(data) {
|
|
|
33
32
|
truncated['tools_truncated'] = true;
|
|
34
33
|
}
|
|
35
34
|
else if (key === 'inputSchema' || key === 'input_schema') {
|
|
36
|
-
// Omit full input schemas
|
|
37
35
|
truncated[key] = '(truncated — use get_exam_result to see full data)';
|
|
38
36
|
}
|
|
39
|
-
else if (typeof value === 'string' && value.length >
|
|
40
|
-
truncated[key] = value.slice(0,
|
|
37
|
+
else if (typeof value === 'string' && value.length > 2000) {
|
|
38
|
+
truncated[key] = value.slice(0, 2000) + '... (truncated)';
|
|
39
|
+
}
|
|
40
|
+
else if (Array.isArray(value)) {
|
|
41
|
+
truncated[key] = value.map((item) => typeof item === 'object' && item !== null
|
|
42
|
+
? truncateExamResultData(item)
|
|
43
|
+
: item);
|
|
41
44
|
}
|
|
42
45
|
else if (typeof value === 'object' && value !== null) {
|
|
43
|
-
|
|
44
|
-
if (serialized.length > 1000) {
|
|
45
|
-
truncated[key] = '(truncated — use get_exam_result to see full data)';
|
|
46
|
-
}
|
|
47
|
-
else {
|
|
48
|
-
truncated[key] = value;
|
|
49
|
-
}
|
|
46
|
+
truncated[key] = truncateExamResultData(value);
|
|
50
47
|
}
|
|
51
48
|
else {
|
|
52
49
|
truncated[key] = value;
|
package/package.json
CHANGED
|
@@ -24,7 +24,6 @@ function truncateExamResultData(data) {
|
|
|
24
24
|
const truncated = {};
|
|
25
25
|
for (const [key, value] of Object.entries(data)) {
|
|
26
26
|
if (key === 'tools' && Array.isArray(value)) {
|
|
27
|
-
// For tool listings, include only name and description, omit inputSchema
|
|
28
27
|
truncated[key] = value.map((tool) => ({
|
|
29
28
|
name: tool.name,
|
|
30
29
|
...(tool.description ? { description: String(tool.description).slice(0, 100) } : {}),
|
|
@@ -33,20 +32,18 @@ function truncateExamResultData(data) {
|
|
|
33
32
|
truncated['tools_truncated'] = true;
|
|
34
33
|
}
|
|
35
34
|
else if (key === 'inputSchema' || key === 'input_schema') {
|
|
36
|
-
// Omit full input schemas
|
|
37
35
|
truncated[key] = '(truncated — use get_exam_result to see full data)';
|
|
38
36
|
}
|
|
39
|
-
else if (typeof value === 'string' && value.length >
|
|
40
|
-
truncated[key] = value.slice(0,
|
|
37
|
+
else if (typeof value === 'string' && value.length > 2000) {
|
|
38
|
+
truncated[key] = value.slice(0, 2000) + '... (truncated)';
|
|
39
|
+
}
|
|
40
|
+
else if (Array.isArray(value)) {
|
|
41
|
+
truncated[key] = value.map((item) => typeof item === 'object' && item !== null
|
|
42
|
+
? truncateExamResultData(item)
|
|
43
|
+
: item);
|
|
41
44
|
}
|
|
42
45
|
else if (typeof value === 'object' && value !== null) {
|
|
43
|
-
|
|
44
|
-
if (serialized.length > 1000) {
|
|
45
|
-
truncated[key] = '(truncated — use get_exam_result to see full data)';
|
|
46
|
-
}
|
|
47
|
-
else {
|
|
48
|
-
truncated[key] = value;
|
|
49
|
-
}
|
|
46
|
+
truncated[key] = truncateExamResultData(value);
|
|
50
47
|
}
|
|
51
48
|
else {
|
|
52
49
|
truncated[key] = value;
|