get_talk_stats
Retrieve analytics and performance metrics for Zendesk Talk phone support, including call volume, wait times, and agent activity.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/tools/talk.js:9-24 (handler)MCP tool handler for 'get_talk_stats'. Calls zendeskClient.getTalkStats(), stringifies the result as JSON text response, or returns error message.handler: async () => { try { const result = await zendeskClient.getTalkStats(); return { content: [{ type: "text", text: JSON.stringify(result, null, 2) }] }; } catch (error) { return { content: [{ type: "text", text: `Error getting Talk stats: ${error.message}` }], isError: true }; } }
- src/server.js:48-52 (registration)Registration of all tools (including 'get_talk_stats') on the MCP server via server.tool() calls in a loop over allTools which includes talkTools.allTools.forEach((tool) => { server.tool(tool.name, tool.schema, tool.handler, { description: tool.description, }); });
- src/zendesk-client.js:282-284 (helper)Helper method in ZendeskClient that performs the API request to fetch Talk statistics from the '/channels/voice/stats.json' endpoint.async getTalkStats() { return this.request("GET", "/channels/voice/stats.json"); }
- src/tools/talk.js:4-26 (registration)Tool specification definition: exports talkTools array with 'get_talk_stats' tool including name, description, empty schema, and reference to handler.export const talkTools = [ { name: "get_talk_stats", description: "Get Zendesk Talk statistics", schema: {}, handler: async () => { try { const result = await zendeskClient.getTalkStats(); return { content: [{ type: "text", text: JSON.stringify(result, null, 2) }] }; } catch (error) { return { content: [{ type: "text", text: `Error getting Talk stats: ${error.message}` }], isError: true }; } } } ];