couchdb_create_database
Create a new database in CouchDB by specifying its name, enabling document storage and management through the MCP server.
Instructions
Create a new database
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Name of the database to create |
Implementation Reference
- couchdb_mcp_server.py:331-337 (handler)The actual handler function that creates a CouchDB database. It calls self._get_server().create(name) to create the database and handles the PreconditionFailed exception when the database already exists.async def _create_database(self, name: str) -> list[TextContent]: """Create a new database.""" try: self._get_server().create(name) return [TextContent(type="text", text=f"Database '{name}' created successfully")] except couchdb.http.PreconditionFailed: return [TextContent(type="text", text=f"Database '{name}' already exists")]
- couchdb_mcp_server.py:63-76 (schema)Tool schema definition for couchdb_create_database, including name, description, and inputSchema with required 'name' parameter for the database name.Tool( name="couchdb_create_database", description="Create a new database", inputSchema={ "type": "object", "properties": { "name": { "type": "string", "description": "Name of the database to create", }, }, "required": ["name"], }, ),
- couchdb_mcp_server.py:268-269 (registration)Registration of the couchdb_create_database tool in the call_tool handler, mapping the tool name to the _create_database method with the name argument.elif name == "couchdb_create_database": return await self._create_database(arguments["name"])