Skip to main content
Glama
jimpick

MCP JSON Document Collection Server

by jimpick

create_json_doc_database

Create a JSON document database for storing, managing, and querying structured data with cloud synchronization capabilities.

Instructions

Create a JSON document database

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
databaseNameYes

Implementation Reference

  • Handler for the create_json_doc_database tool: parses input, checks if DB exists, creates a new Fireproof database, registers it in dbs and localJsonDbCollection, returns success message.
    case "create_json_doc_database": {
      const parsed = CreateDbArgsSchema.safeParse(args);
      if (!parsed.success) {
        throw new Error(`Invalid arguments for create_json_doc_database: ${parsed.error}`);
      }
      const results = await localJsonDbCollection.query<string, JsonDocDb>(
        "name",
        {
          range: [
            parsed.data.databaseName,
            parsed.data.databaseName
          ]
        });
      if (results.rows.length > 0) {
        throw new Error(`Database already exists: ${parsed.data.databaseName}`);
      }
      const newDb = fireproof(parsed.data.databaseName);
      dbs[parsed.data.databaseName] = { db: newDb };
      await localJsonDbCollection.put<JsonDocDb>({
        name: parsed.data.databaseName,
        created: Date.now(),
      });
    
      return {
        content: [
          {
            type: "text",
            text: `Created JSON document database: ${parsed.data.databaseName}`,
          }
        ]
      }
    }
  • Zod schema defining the input for create_json_doc_database: requires a databaseName string.
    const CreateDbArgsSchema = z.object({
      databaseName: z.string(),
    });
  • src/index.ts:100-104 (registration)
    Registration of the create_json_doc_database tool in the ListTools response, specifying name, description, and input schema.
    {
      name: "create_json_doc_database",
      description: "Create a JSON document database",
      inputSchema: zodToJsonSchema(CreateDbArgsSchema) as ToolInput,
    },
Behavior1/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description must fully disclose behavioral traits. It only states the action 'Create' without details on permissions, side effects (e.g., overwriting existing databases), error handling, or output format. This is inadequate for a mutation tool with zero annotation coverage, failing to inform the agent of risks or expected behavior.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence with no wasted words, making it appropriately concise. However, it is under-specified rather than optimally structured—it could benefit from front-loading key details like purpose and usage, but its brevity is not inherently flawed.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness1/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity (a mutation operation with no annotations or output schema) and low schema coverage, the description is severely incomplete. It omits critical context such as behavioral implications, parameter meanings, and relationships to sibling tools, leaving the agent ill-equipped to use the tool correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 1 parameter with 0% description coverage, so the description must compensate. It does not explain the 'databaseName' parameter (e.g., naming constraints, uniqueness, or format). Without this, the agent lacks semantic understanding beyond the schema's basic type, making tool invocation error-prone.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose2/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description 'Create a JSON document database' restates the tool name with minimal elaboration, making it tautological. It specifies the verb 'Create' and resource 'JSON document database', but lacks detail on what this entails (e.g., local vs. cloud, structure, or capabilities), and does not distinguish it from sibling tools like 'connect_json_doc_database_to_cloud' or 'list_json_doc_databases'.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines1/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance is provided on when to use this tool versus alternatives. It does not mention prerequisites (e.g., needing to create a database before saving documents), exclusions, or comparisons to siblings like 'connect_json_doc_database_to_cloud' for existing databases or 'list_json_doc_databases' for viewing. This leaves the agent without context for tool selection.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other 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/jimpick/mcp-json-db-collection-server'

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