Skip to main content
Glama
robertoamoreno

CouchDB MCP Server

listDatabases

Retrieve a list of all CouchDB databases to manage and interact with data storage effectively. Ideal for accessing database information within the CouchDB MCP Server.

Instructions

List all CouchDB databases

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Core handler function that lists all CouchDB databases by calling couch.db.list() from the nano library.
    export async function listDatabases(): Promise<string[]> { return couch.db.list(); }
  • MCP tool handler for 'listDatabases' that calls the core function, formats the response as JSON text content, and handles errors appropriately.
    private async handleListDatabases() { try { const databases = await listDatabases(); return { content: [ { type: 'text', text: JSON.stringify(databases, null, 2), }, ], }; } catch (error: any) { return { content: [ { type: 'text', text: `Error listing databases: ${error.message}`, }, ], isError: true, }; } }
  • Input schema definition for the 'listDatabases' tool, indicating no required input parameters.
    { name: 'listDatabases', description: 'List all CouchDB databases', inputSchema: { type: 'object', properties: {}, }, },
  • src/index.ts:232-233 (registration)
    Registration in the tool dispatcher switch statement that maps the 'listDatabases' tool name to its handler.
    case 'listDatabases': return this.handleListDatabases();

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/robertoamoreno/couchdb-mcp-server'

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