chat_history
Retrieve conversation history from Pickaxe agents to analyze user interactions, identify knowledge gaps, and review performance metrics.
Instructions
Fetch conversation history for a Pickaxe agent. Use to analyze user questions, identify KB gaps, and review agent performance.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| studio | No | Studio name to use. Available: STAGING, MAIN, DEV, PRODUCTION. Default: PRODUCTION | |
| pickaxeId | Yes | The Pickaxe agent ID (from the agent URL or config) | |
| skip | No | Number of conversations to skip (for pagination). Default: 0 | |
| limit | No | Maximum conversations to return. Default: 10, Max: 100 | |
| format | No | Output format. 'messages' is human-readable, 'raw' includes metadata. Default: messages |
Implementation Reference
- src/index.ts:475-483 (handler)The handler case in executeTool function that implements the chat_history tool by calling the Pickaxe API to fetch conversation history for a given agent, with pagination and format options.case "chat_history": { const result = await pickaxeRequest("/studio/pickaxe/history", "POST", { pickaxeId: args.pickaxeId, skip: args.skip ?? 0, limit: args.limit ?? 10, format: args.format ?? "messages", }, studio); return JSON.stringify(result, null, 2); }
- src/index.ts:120-146 (registration)The registration of the chat_history tool in the tools array, including its name, description, and input schema definition. This is used by the MCP server to list available tools.name: "chat_history", description: "Fetch conversation history for a Pickaxe agent. Use to analyze user questions, identify KB gaps, and review agent performance.", inputSchema: { type: "object", properties: { studio: studioParam, pickaxeId: { type: "string", description: "The Pickaxe agent ID (from the agent URL or config)", }, skip: { type: "number", description: "Number of conversations to skip (for pagination). Default: 0", }, limit: { type: "number", description: "Maximum conversations to return. Default: 10, Max: 100", }, format: { type: "string", enum: ["messages", "raw"], description: "Output format. 'messages' is human-readable, 'raw' includes metadata. Default: messages", }, }, required: ["pickaxeId"], }, },
- src/index.ts:122-146 (schema)The input schema for the chat_history tool, defining parameters like pickaxeId (required), studio, skip, limit, and format.inputSchema: { type: "object", properties: { studio: studioParam, pickaxeId: { type: "string", description: "The Pickaxe agent ID (from the agent URL or config)", }, skip: { type: "number", description: "Number of conversations to skip (for pagination). Default: 0", }, limit: { type: "number", description: "Maximum conversations to return. Default: 10, Max: 100", }, format: { type: "string", enum: ["messages", "raw"], description: "Output format. 'messages' is human-readable, 'raw' includes metadata. Default: messages", }, }, required: ["pickaxeId"], }, },