list_json_doc_databases
Discover available JSON document databases to identify which collections you can access for document management and querying operations.
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. Queries the localJsonDbCollection by 'name' index, extracts database names from documents, and returns them as a JSON string in the tool response.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:117-127 (registration)Registration of the 'list_json_doc_databases' tool in the ListTools response, specifying name, description, and input schema (no required parameters).{ 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, defining an empty object with no properties or required fields.inputSchema: { type: "object", properties: {}, required: [], },