Skip to main content
Glama
appwrite

Appwrite MCP Server

Official
by appwrite

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
NameRequiredDescriptionDefault
database_idYesDatabase ID.
table_idYesTable ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/references/cloud/server-dart/tablesDB#createTable).
row_idYesRow ID.
queriesNoArray 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_idNoTransaction ID to read uncommitted changes within the transaction.

Implementation Reference

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

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