delete_json_doc
Remove a JSON document by its unique ID from the fireproof ledger database, ensuring secure deletion and multi-user synchronization on the MCP server.
Instructions
Delete a JSON document by ID
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | ID of document to delete |
Input Schema (JSON Schema)
{
"properties": {
"id": {
"description": "ID of document to delete",
"type": "string"
}
},
"required": [
"id"
],
"type": "object"
}
Implementation Reference
- src/index.ts:120-133 (handler)The handler logic for the delete_json_doc tool. It retrieves the document ID from the request arguments, validates it, deletes the document from the Fireproof database using db.del(id), and returns a confirmation message.case "delete_json_doc": { const id = String(request.params.arguments?.id); if (!id) { throw new Error("ID is required"); } await db.del(id); return { content: [{ type: "text", text: `Deleted document with ID: ${id}` }] }; }
- src/index.ts:67-80 (registration)Tool registration in the ListToolsRequestSchema handler, including the tool name, description, and input schema requiring a 'id' string.{ name: "delete_json_doc", description: "Delete a JSON document by ID", inputSchema: { type: "object", properties: { id: { type: "string", description: "ID of document to delete" } }, required: ["id"] } },