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)}")]

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