doc_disconnect
Remove documents from an AI agent's knowledge base to manage content access and update information sources.
Instructions
Disconnect/unlink a document from a Pickaxe agent, removing it from the agent's knowledge base.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| studio | No | Studio name to use. Available: STAGING, MAIN, DEV, PRODUCTION. Default: PRODUCTION | |
| documentId | Yes | The document ID to disconnect | |
| pickaxeId | Yes | The Pickaxe agent ID to disconnect the document from |
Implementation Reference
- src/index.ts:500-505 (handler)Handler implementation for the 'doc_disconnect' tool. It makes a POST request to the Pickaxe API endpoint '/studio/document/disconnect' with the documentId and pickaxeId parameters to unlink the document from the agent.case "doc_disconnect": { const result = await pickaxeRequest("/studio/document/disconnect", "POST", { documentId: args.documentId, pickaxeId: args.pickaxeId, }, studio); return JSON.stringify(result, null, 2);
- src/index.ts:191-209 (schema)Input schema definition for the 'doc_disconnect' tool, specifying parameters: studio (optional), documentId (required), pickaxeId (required).{ name: "doc_disconnect", description: "Disconnect/unlink a document from a Pickaxe agent, removing it from the agent's knowledge base.", inputSchema: { type: "object", properties: { studio: studioParam, documentId: { type: "string", description: "The document ID to disconnect", }, pickaxeId: { type: "string", description: "The Pickaxe agent ID to disconnect the document from", }, }, required: ["documentId", "pickaxeId"], }, },
- src/index.ts:616-618 (registration)Registration of the tool list handler, which returns the array of tools including 'doc_disconnect'.server.setRequestHandler(ListToolsRequestSchema, async () => { return { tools }; });
- src/index.ts:621-636 (registration)Registration of the call tool handler, which dispatches to executeTool based on tool name, handling 'doc_disconnect' via the switch case.server.setRequestHandler(CallToolRequestSchema, async (request) => { const { name, arguments: args } = request.params; try { const result = await executeTool(name, (args as Record<string, unknown>) ?? {}); return { content: [{ type: "text", text: result }], }; } catch (error) { const errorMessage = error instanceof Error ? error.message : String(error); return { content: [{ type: "text", text: `Error: ${errorMessage}` }], isError: true, }; } });