couchdb_list_databases
Retrieve a list of all databases available in your CouchDB server for database management and administration tasks.
Instructions
List all databases in the CouchDB server
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "couchdb_list_databases"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- couchdb_mcp_server.py:322-329 (handler)The handler function _list_databases() that executes the tool logic - retrieves all databases from the CouchDB server, formats the result with count, and returns as JSON
async def _list_databases(self) -> list[TextContent]: """List all databases.""" databases = list(self._get_server()) result = { "databases": databases, "count": len(databases) } return [TextContent(type="text", text=json.dumps(result, indent=2))] - couchdb_mcp_server.py:266-267 (registration)Registration in call_tool() - maps the tool name 'couchdb_list_databases' to its handler method _list_databases()
if name == "couchdb_list_databases": return await self._list_databases() - couchdb_mcp_server.py:55-62 (schema)Tool schema definition - declares the tool name, description, and input schema (empty object, no parameters required)
Tool( name="couchdb_list_databases", description="List all databases in the CouchDB server", inputSchema={ "type": "object", "properties": {}, }, ), - couchdb_mcp_server.py:41-46 (helper)Helper method _get_server() that returns the CouchDB server connection, connecting if needed
def _get_server(self) -> couchdb.Server: """Return the CouchDB server, connecting if needed.""" if self.couch is None: self.connect() assert self.couch is not None return self.couch