Skip to main content
Glama

save_json_doc

Saves a JSON document to the mcp-database-server, a fireproof ledger database supporting multi-user synchronization. Ensures secure storage and accessibility for structured data.

Instructions

Save a JSON document

Input Schema

NameRequiredDescriptionDefault
docYesJSON document to save

Input Schema (JSON Schema)

{ "properties": { "doc": { "description": "JSON document to save", "type": "object" } }, "required": [ "doc" ], "type": "object" }

Implementation Reference

  • The handler for the 'save_json_doc' tool. It extracts the 'doc' from arguments, validates it, saves it to the Fireproof database with a 'created' timestamp, and returns a message with the saved document's ID.
    case "save_json_doc": { const doc = request.params.arguments?.doc; if (!doc) { throw new Error("Document is required"); } const response = await db.put({ ...doc, created: Date.now() }); return { content: [{ type: "text", text: `Saved document with ID: ${response.id}` }] }; }
  • src/index.ts:39-52 (registration)
    The tool registration in the ListTools response, defining name, description, and input schema for 'save_json_doc'.
    { name: "save_json_doc", description: "Save a JSON document", inputSchema: { type: "object", properties: { doc: { type: "object", description: "JSON document to save" } }, required: ["doc"] } },
  • Input schema for the 'save_json_doc' tool, requiring a 'doc' object.
    inputSchema: { type: "object", properties: { doc: { type: "object", description: "JSON document to save" } }, required: ["doc"] }

Other Tools

Related Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/fireproof-storage/mcp-database-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server