load_json_doc
Retrieve a JSON document by its unique ID from the MCP database server, enabling quick access to stored data in a structured format.
Instructions
Load a JSON document by ID
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | ID of document to load |
Input Schema (JSON Schema)
{
"properties": {
"id": {
"description": "ID of document to load",
"type": "string"
}
},
"required": [
"id"
],
"type": "object"
}
Implementation Reference
- src/index.ts:135-149 (handler)Handler for the load_json_doc tool. Retrieves the JSON document from the Fireproof database by the given ID and returns it as a JSON string in the tool response content.case "load_json_doc": { const id = String(request.params.arguments?.id); if (!id) { throw new Error("ID is required"); } const doc = await db.get(id); return { content: [{ type: "text", text: JSON.stringify(doc) }] }; }
- src/index.ts:53-66 (registration)Registration of the load_json_doc tool in the ListTools response, including name, description, and input schema definition.{ name: "load_json_doc", description: "Load a JSON document by ID", inputSchema: { type: "object", properties: { id: { type: "string", description: "ID of document to load" } }, required: ["id"] } },
- src/index.ts:56-65 (schema)Input schema definition for the load_json_doc tool, specifying the required 'id' string parameter.inputSchema: { type: "object", properties: { id: { type: "string", description: "ID of document to load" } }, required: ["id"] }