tables_db_get_row
Retrieve a specific row from an Appwrite database table using its unique ID. Returns JSON data for the requested row entry.
Instructions
Get a row by its unique ID. This endpoint response returns a JSON object with the row data.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| database_id | Yes | Database ID. | |
| table_id | Yes | Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/references/cloud/server-dart/tablesDB#createTable). | |
| row_id | Yes | Row ID. | |
| queries | No | Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. | |
| transaction_id | No | Transaction ID to read uncommitted changes within the transaction. |
Implementation Reference
- src/mcp_server_appwrite/server.py:71-71 (registration)Registers the Appwrite TablesDB service instance with the tool manager using service name 'tables_db'. This enables dynamic tool generation for all public methods of TablesDB, including 'tables_db_get_row' from the presumed 'get_row' method.tools_manager.register_service(Service(TablesDB(client), "tables_db"))
- src/mcp_server_appwrite/server.py:94-94 (registration)Default registration of the TablesDB service if no specific services are enabled via CLI arguments.tools_manager.register_service(Service(TablesDB(client), "tables_db"))
- Dynamically generates the tool name by combining service_name ('tables_db') and method name ('get_row'), resulting in 'tables_db_get_row'. This is part of the tool definition creation in list_tools().# Get the overridden name if it exists tool_name = self._method_name_overrides.get(name, f"{self.service_name}_{name}")
- Creates the MCP Tool definition object, including name, description, and input schema derived from method signature and type hints.tool_definition = Tool( name=tool_name, description=f"{docstring.short_description or "No description available"}", inputSchema={ "type": "object", "properties": properties, "required": required } )
- Generic handler for all tools, including 'tables_db_get_row'. Retrieves the bound method (TablesDB.get_row) from the registry and executes it with 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)}")]