Skip to main content
Glama
appwrite

Appwrite MCP Server

Official
by appwrite

tables_db_update

Modify a database's configuration in Appwrite by updating its name, status, or other properties using its unique ID.

Instructions

Update a database by its unique ID.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
database_idYesDatabase ID.
nameYesDatabase name. Max length: 128 chars.
enabledNoIs database enabled? When set to 'disabled', users cannot access the database but Server SDKs with an API key can still read and write to the database. No data is lost when this is toggled.

Implementation Reference

  • Generic handler for all MCP tools, including 'tables_db_update'. Retrieves the tool's bound method (TablesDB.update) from the registry and executes it with the provided arguments, returning the result as text content.
    @server.call_tool()
    async def handle_call_tool(
        name: str, arguments: dict | None
    ) -> list[types.TextContent | types.ImageContent | types.EmbeddedResource]:
        
        try:
            tool_info = tools_manager.get_tool(name)
            if not tool_info:
                raise McpError(f"Tool {name} not found")
            
            bound_method = tool_info["function"]
            result = bound_method(**(arguments or {}))
            if hasattr(result, 'to_dict'):
                result_dict = result.to_dict()
                return [types.TextContent(type="text", text=str(result_dict))]
            return [types.TextContent(type="text", text=str(result))]
        except AppwriteException as e:
            return [types.TextContent(type="text", text=f"Appwrite Error: {str(e)}")]
        except Exception as e:
            return [types.TextContent(type="text", text=f"Error: {str(e)}")]
  • Dynamically generates the input JSON Schema for each tool, including 'tables_db_update', based on the underlying Appwrite method's type hints, signature, and docstring.
    tool_definition = Tool(
        name=tool_name,
        description=f"{docstring.short_description or "No description available"}",
        inputSchema={
            "type": "object",
            "properties": properties,
            "required": required
        }
    )
  • Explicit registration of the TablesDB service as 'tables_db' when --tables-db flag is provided, making its methods (including 'update') available as prefixed tools like 'tables_db_update'.
    if args.tables_db:
        tools_manager.register_service(Service(TablesDB(client), "tables_db"))
    if args.users:
  • Default registration of the 'tables_db' service if no specific services are enabled via CLI flags.
    if not any([args.databases, args.tables_db, args.users, args.teams, args.storage,
                args.functions, args.messaging, args.locale, args.avatars, args.sites]):
        tools_manager.register_service(Service(TablesDB(client), "tables_db"))
  • Constructs the MCP tool name by prefixing the service name ('tables_db') to the method name ('update'), resulting in 'tables_db_update'.
    # Get the overridden name if it exists
    tool_name = self._method_name_overrides.get(name, f"{self.service_name}_{name}")
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states this is an update operation, implying mutation, but doesn't mention permissions required, whether changes are reversible, side effects, or response format. For a mutation tool with zero annotation coverage, this is a significant gap in transparency about how the tool behaves beyond its basic function.

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 with zero waste. It's front-loaded with the core action ('Update a database') and includes the key identifier ('by its unique ID'). Every word serves a purpose, making it easy to parse quickly without unnecessary elaboration.

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?

Given the complexity of a database update tool with no annotations and no output schema, the description is incomplete. It doesn't cover behavioral aspects like permissions or side effects, doesn't differentiate from sibling tools, and lacks context on usage. For a mutation operation in a rich toolset, this minimal description leaves critical gaps for an agent to operate effectively.

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

Parameters3/5

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

Schema description coverage is 100%, so the schema fully documents all three parameters (database_id, name, enabled) with clear descriptions. The description adds no additional meaning beyond what the schema provides—it doesn't explain parameter interactions, constraints, or usage examples. With high schema coverage, the baseline score of 3 is appropriate as the description doesn't compensate but also doesn't detract.

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

Purpose3/5

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

The description 'Update a database by its unique ID' states the verb ('update') and resource ('database'), but it's vague about what specifically gets updated. It doesn't differentiate from sibling tools like tables_db_update_table or tables_db_update_row, which also update database components. The purpose is clear at a high level but lacks specificity compared to alternatives.

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 on when to use this tool versus alternatives. With many sibling tools like tables_db_update_table and tables_db_update_row that update specific database elements, the description offers no context on prerequisites, when this tool is appropriate, or what distinguishes it from other update operations. This leaves the agent guessing about the correct application.

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/appwrite/mcp-for-api'

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