get_talk_stats
Retrieve detailed statistics from Zendesk Talk to analyze call performance, agent activity, and call center metrics for actionable insights.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Input Schema (JSON Schema)
{
"$schema": "http://json-schema.org/draft-07/schema#",
"additionalProperties": false,
"properties": {},
"type": "object"
}
Implementation Reference
- src/tools/talk.js:9-24 (handler)MCP tool handler for 'get_talk_stats' that calls zendeskClient.getTalkStats(), formats the result as JSON text block, 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/tools/talk.js:8-8 (schema)Empty input schema for 'get_talk_stats' tool (no parameters required).schema: {},
- src/tools/talk.js:4-26 (registration)Defines and exports the 'get_talk_stats' tool as part of talkTools array, which is later imported and registered.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 }; } } } ];
- src/server.js:48-52 (registration)Final registration of all tools including 'get_talk_stats' by dynamically calling server.tool() on each tool from 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 actual API request to retrieve Talk statistics from Zendesk.async getTalkStats() { return this.request("GET", "/channels/voice/stats.json"); }