list_json_doc_databases
Retrieve the list of available JSON document databases to identify accessible data sources before performing document operations on the MCP JSON Document Collection Server.
Instructions
Returns the list of JSON document databases. Use this to understand which databases are available before trying to access JSON documents.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/index.ts:358-373 (handler)Handler implementation for the 'list_json_doc_databases' tool. It queries the localJsonDbCollection database by the 'name' field, extracts the names of all JSON document databases, and returns them as a JSON string in the tool response content.case "list_json_doc_databases": { const results = await localJsonDbCollection.query<string, JsonDocDb>("name", { includeDocs: true, descending: true, }) const dbNames = results.rows.flatMap(row => row.doc ? [row.doc.name] : []); return { content: [ { type: "text", text: JSON.stringify(dbNames) } ] } }
- src/index.ts:118-127 (registration)Registration of the 'list_json_doc_databases' tool in the ListToolsRequestSchema handler, including the tool name, description, and empty input schema.name: "list_json_doc_databases", description: "Returns the list of JSON document databases. " + "Use this to understand which databases are available before trying to access JSON documents.", inputSchema: { type: "object", properties: {}, required: [], }, },
- src/index.ts:122-126 (schema)Input schema for the 'list_json_doc_databases' tool, defined as an empty object (no parameters required).inputSchema: { type: "object", properties: {}, required: [], },