Skip to main content
Glama
appwrite

Appwrite MCP Server

Official
by appwrite

tables_db_increment_row_column

Increase a numeric value in a specific database table cell by a specified amount. Use this tool to update counters, track metrics, or modify numerical data in Appwrite databases.

Instructions

Increment a specific column of a row by a given value.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
database_idYesDatabase ID.
table_idYesTable ID.
row_idYesRow ID.
columnYesColumn key.
valueNoValue to increment the column by. The value must be a number.
maxNoMaximum value for the column. If the current value is greater than this value, an error will be thrown.
transaction_idNoTransaction ID for staging the operation.

Implementation Reference

  • Registers the TablesDB Appwrite service with the ToolManager using service name 'tables_db'. This enables dynamic tool generation for all public methods of TablesDB, including 'tables_db_increment_row_column' which wraps TablesDB.increment_row_column.
    tools_manager.register_service(Service(TablesDB(client), "tables_db"))
  • Default registration of TablesDB service if no specific services are enabled.
    tools_manager.register_service(Service(TablesDB(client), "tables_db"))
  • Generates the tool name by prefixing the service name ('tables_db') to the method name ('increment_row_column'), producing 'tables_db_increment_row_column'.
    tool_name = self._method_name_overrides.get(name, f"{self.service_name}_{name}")
  • Dynamically generates the JSON schema for the tool input based on the method's type hints, docstring, and signature.
    tool_definition = Tool(
        name=tool_name,
        description=f"{docstring.short_description or "No description available"}",
        inputSchema={
            "type": "object",
            "properties": properties,
            "required": required
        }
  • The generic MCP tool handler that resolves the tool by name, retrieves the bound Appwrite SDK method, invokes it with arguments, and formats 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)}")]
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 but provides minimal information. It mentions the increment action but doesn't describe error conditions (beyond what's in the schema), permission requirements, whether the operation is atomic, what happens if the column doesn't exist, or what the response looks like. For a mutation tool with zero annotation coverage, this leaves significant behavioral gaps.

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 the core functionality without unnecessary words. It's front-loaded with the essential action and target, making it immediately understandable. Every word earns its place in this minimal but complete statement of purpose.

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 mutation tool with 7 parameters, no annotations, and no output schema, the description is insufficiently complete. It doesn't address what the tool returns, error conditions beyond what's in parameter descriptions, transactional behavior implications, or how this operation relates to other table operations. The agent would need to guess about important behavioral aspects.

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 already documents all 7 parameters thoroughly. The description adds no additional parameter semantics beyond what's in the schema - it doesn't explain relationships between parameters, provide examples, or clarify edge cases. Baseline 3 is appropriate when the schema does all the parameter documentation work.

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 ('increment') and target ('a specific column of a row'), making the purpose immediately understandable. It distinguishes from siblings like 'tables_db_decrement_row_column' by specifying increment rather than decrement, but doesn't explicitly contrast with other update operations like 'tables_db_update_row'.

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 like 'tables_db_update_row' or 'tables_db_decrement_row_column'. The description doesn't mention prerequisites, appropriate contexts, or limitations that would help an agent choose between similar tools.

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