Skip to main content
Glama
andyfe76

CouchDB MCP Server

by andyfe76

couchdb_delete_database

Remove a CouchDB database by name to manage storage and clean up unused data in your database system.

Instructions

Delete a database

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesName of the database to delete

Implementation Reference

  • The handler function that executes the couchdb_delete_database tool logic. It uses the CouchDB server's delete() method and handles ResourceNotFound exceptions.
    async def _delete_database(self, name: str) -> list[TextContent]:
        """Delete a database."""
        try:
            self._get_server().delete(name)
            return [TextContent(type="text", text=f"Database '{name}' deleted successfully")]
        except couchdb.http.ResourceNotFound:
            return [TextContent(type="text", text=f"Database '{name}' not found")]
  • Registration of the couchdb_delete_database tool with its schema definition, including the required 'name' parameter.
    Tool(
        name="couchdb_delete_database",
        description="Delete a database",
        inputSchema={
            "type": "object",
            "properties": {
                "name": {
                    "type": "string",
                    "description": "Name of the database to delete",
                },
            },
            "required": ["name"],
        },
    ),
  • Routing logic that maps the couchdb_delete_database tool name to its handler function, extracting the 'name' argument from the input.
    elif name == "couchdb_delete_database":
        return await self._delete_database(arguments["name"])

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/andyfe76/couchdb_mcp'

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