@fruggr/zendesk-mcp-server 3.0.2 → 3.0.3
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.
- package/dist/index.js +24 -12
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -2082,6 +2082,23 @@ const createTopologyProvider = (getToken, subdomain, onUnauthorized) => {
|
|
|
2082
2082
|
return promise;
|
|
2083
2083
|
} };
|
|
2084
2084
|
};
|
|
2085
|
+
const PARAMS_FIELD_DESCRIPTION = "Parameters of the chosen operation, named exactly as its line in \"operation\" lists them (* = required). An unknown name is rejected.";
|
|
2086
|
+
const summarizeDescription = (description) => {
|
|
2087
|
+
const idx = description.indexOf(". ");
|
|
2088
|
+
if (idx === -1) return description;
|
|
2089
|
+
return description.slice(0, idx + 1);
|
|
2090
|
+
};
|
|
2091
|
+
const operationSignature = (tool) => {
|
|
2092
|
+
const params = Object.entries(tool.inputSchema.shape).map(([key, field]) => field.safeParse(void 0).success ? key : `${key}*`);
|
|
2093
|
+
return `${tool.name}(${params.join(", ")})`;
|
|
2094
|
+
};
|
|
2095
|
+
const buildOperationList = (tools) => tools.map((t) => `- ${operationSignature(t)}: ${summarizeDescription(t.description)}${t.readOnly ? "" : " (write)"}`).join("\n");
|
|
2096
|
+
const buildOperationFieldDescription = (tools) => `One of the operations below. Each line reads name(parameters): summary, where the parameters are the exact names "params" accepts and * marks a required one; (write) marks an operation that changes data.\n${buildOperationList(tools)}`;
|
|
2097
|
+
const buildProxyDescription = ({ title, tools, readOnly }) => {
|
|
2098
|
+
const head = `${readOnly ? "[RO] " : ""}${title}. Specify the operation and its parameters. The "operation" field lists every operation with a one-line summary and the parameter names "params" accepts (* = required); an unknown parameter is rejected with the list of valid ones.`;
|
|
2099
|
+
const withNames = `${head}\n\nOperations: ${tools.map((t) => t.name).join(", ")}`;
|
|
2100
|
+
return withNames.length <= 2048 ? withNames : head;
|
|
2101
|
+
};
|
|
2085
2102
|
//#endregion
|
|
2086
2103
|
//#region src/routing/registry.ts
|
|
2087
2104
|
/**
|
|
@@ -5197,12 +5214,6 @@ const runHandler = async (def, params, onUnauthorized) => {
|
|
|
5197
5214
|
throw err;
|
|
5198
5215
|
}
|
|
5199
5216
|
};
|
|
5200
|
-
const summarizeDescription = (description) => {
|
|
5201
|
-
const idx = description.indexOf(". ");
|
|
5202
|
-
if (idx === -1) return description;
|
|
5203
|
-
return description.slice(0, idx + 1);
|
|
5204
|
-
};
|
|
5205
|
-
const buildOperationList = (tools) => tools.map((t) => `- **${t.name}**: ${summarizeDescription(t.description)}${t.readOnly ? "" : " (write)"}`).join("\n");
|
|
5206
5217
|
const aggregateAnnotations = (tools) => ({
|
|
5207
5218
|
readOnlyHint: tools.every((t) => t.annotations.readOnlyHint),
|
|
5208
5219
|
destructiveHint: tools.some((t) => t.annotations.destructiveHint),
|
|
@@ -5227,17 +5238,18 @@ const buildProxyDispatch = (tools, onUnauthorized) => {
|
|
|
5227
5238
|
};
|
|
5228
5239
|
};
|
|
5229
5240
|
const registerProxyTool = (server, toolName, title, tools, readOnlyMode, onUnauthorized) => {
|
|
5230
|
-
const operationNames = tools.map((t) => t.name);
|
|
5231
|
-
const operationList = buildOperationList(tools);
|
|
5232
5241
|
const annotations = aggregateAnnotations(tools);
|
|
5233
|
-
const prefix = readOnlyMode ? "[RO] " : "";
|
|
5234
5242
|
const dispatch = buildProxyDispatch(tools, onUnauthorized);
|
|
5235
5243
|
return server.registerTool(toolName, {
|
|
5236
5244
|
title,
|
|
5237
|
-
description:
|
|
5245
|
+
description: buildProxyDescription({
|
|
5246
|
+
title,
|
|
5247
|
+
tools,
|
|
5248
|
+
readOnly: readOnlyMode
|
|
5249
|
+
}),
|
|
5238
5250
|
inputSchema: z.object({
|
|
5239
|
-
operation: z.string().describe(
|
|
5240
|
-
params: z.record(z.string(), z.unknown()).default({}).describe(
|
|
5251
|
+
operation: z.string().describe(buildOperationFieldDescription(tools)),
|
|
5252
|
+
params: z.record(z.string(), z.unknown()).default({}).describe(PARAMS_FIELD_DESCRIPTION)
|
|
5241
5253
|
}),
|
|
5242
5254
|
annotations
|
|
5243
5255
|
}, async (args) => dispatch(args));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fruggr/zendesk-mcp-server",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.3",
|
|
4
4
|
"mcpName": "io.github.fruggr/zendesk-mcp-server",
|
|
5
5
|
"description": "Deep Zendesk MCP server for your AI assistant: search, draft, update and translate Help Center articles and manage Support tickets end to end — comments, triage and image attachments.",
|
|
6
6
|
"type": "module",
|