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

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

With no annotations provided, the description carries full burden but offers minimal behavioral insight. It mentions the response format ('JSON object with the row data'), which is helpful, but lacks details on permissions, error handling, rate limits, or whether it's a read-only operation. For a database tool with zero annotation coverage, this is inadequate.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is brief and front-loaded with the core purpose. Both sentences are relevant, though the second about the response format could be integrated more tightly. There's no wasted text, making it efficient but not perfectly structured.

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 retrieval tool with 5 parameters, no annotations, and no output schema, the description is insufficient. It lacks details on authentication, error cases, pagination, or how optional parameters like 'queries' and 'transaction_id' affect behavior, leaving significant gaps for the agent.

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 5 parameters. The description adds no parameter-specific information beyond what's in the schema, resulting in the baseline score of 3. No value is added to explain parameter interactions or usage nuances.

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 ('Get a row') and resource ('by its unique ID'), making the purpose immediately understandable. However, it doesn't differentiate from sibling tools like 'tables_db_get' or 'tables_db_list_rows' that might also retrieve row data, so it doesn't reach the highest score.

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. The description doesn't mention sibling tools like 'tables_db_list_rows' for multiple rows or 'tables_db_get' for database metadata, leaving the agent without context for tool selection.

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