Skip to main content
Glama
robertoamoreno

CouchDB MCP Server

listDatabases

Retrieve all database names from a CouchDB instance to manage data storage and access.

Instructions

List all CouchDB databases

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The main handler for the 'listDatabases' tool. It invokes the listDatabases helper function from connection.ts, formats the result 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, specifying an empty object (no parameters required).
      name: 'listDatabases',
      description: 'List all CouchDB databases',
      inputSchema: {
        type: 'object',
        properties: {},
      },
    },
  • src/index.ts:232-233 (registration)
    Tool dispatch registration in the CallToolRequest handler's switch statement, routing calls to the handleListDatabases method.
    case 'listDatabases':
      return this.handleListDatabases();
  • Core utility function that performs the actual database listing using the CouchDB nano client.
    export async function listDatabases(): Promise<string[]> {
      return couch.db.list();
    }
Behavior2/5

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

With no annotations provided, the description carries full burden for behavioral disclosure. It states what the tool does but doesn't describe how it behaves - no information about pagination, rate limits, authentication requirements, error conditions, or return format. 'List all' implies completeness but doesn't guarantee it.

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

Conciseness5/5

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

The description is a single, efficient sentence that states exactly what the tool does with zero wasted words. It's appropriately sized for a simple list operation and front-loads the core functionality.

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

Completeness2/5

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

For a read operation with no annotations and no output schema, the description is insufficient. It doesn't explain what the output looks like (array of database names? objects with metadata?), potential limitations, or error handling. The agent would need to guess about the return format and behavior.

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

Parameters4/5

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

The tool has zero parameters, and schema description coverage is 100% (though empty). The description appropriately doesn't discuss parameters since none exist, earning a baseline score of 4 for tools with no parameters.

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

Purpose4/5

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

The description clearly states the action ('List') and target resource ('all CouchDB databases'), providing a specific verb+resource combination. However, it doesn't differentiate from sibling tools like 'getDocument' or 'createDatabase' beyond the obvious scope difference, which prevents a perfect score.

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

Usage Guidelines2/5

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

No guidance is provided about when to use this tool versus alternatives. While the purpose is clear, there's no mention of prerequisites, timing considerations, or comparison to sibling tools like 'getDocument' for retrieving specific database information.

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

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