Skip to main content
Glama
appwrite

Appwrite MCP Server

Official
by appwrite

tables_db_create_email_column

Add an email column to an Appwrite database table to store and validate email addresses, supporting required fields, default values, and array formats.

Instructions

Create an email column.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
database_idYesDatabase ID.
table_idYesTable ID.
keyYesColumn Key.
requiredYesIs column required?
defaultNoDefault value for column when not provided. Cannot be set when column is required.
arrayNoIs column an array?

Implementation Reference

  • Registers the TablesDB service with service name 'tables_db'. This service dynamically generates MCP tools for each public method on the TablesDB instance, naming them as 'tables_db_{method_name}', thus creating the 'tables_db_create_email_column' tool.
    if args.tables_db:
        tools_manager.register_service(Service(TablesDB(client), "tables_db"))
  • The generic MCP tool call handler that retrieves the tool implementation from the registry (the bound TablesDB.create_email_column method) and executes it with user-provided arguments, formatting 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)}")]
  • Dynamically generates the JSON schema for the tool input based on the method signature, type hints, and docstring of TablesDB.create_email_column.
    tool_definition = Tool(
        name=tool_name,
        description=f"{docstring.short_description or "No description available"}",
        inputSchema={
            "type": "object",
            "properties": properties,
            "required": required
        }
    )
  • Constructs the tool name 'tables_db_create_email_column' by prefixing the service name 'tables_db' to the original method name 'create_email_column'.
    tool_name = self._method_name_overrides.get(name, f"{self.service_name}_{name}")
  • Updates the global tools registry with all tools from the registered service, including 'tables_db_create_email_column'.
    self.tools_registry.update(service.list_tools())
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. While 'Create' implies a write/mutation operation, the description doesn't address permission requirements, whether this operation is reversible, potential side effects, or what happens if a column with the same key already exists. For a mutation tool with zero annotation coverage, this represents significant gaps in behavioral understanding.

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 maximally concise at just three words, with zero wasted language. It's front-loaded with the essential action and resource, making it immediately scannable and understandable despite its brevity.

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 no annotations and no output schema, the description is insufficiently complete. It doesn't explain what the tool returns, error conditions, or behavioral nuances. Given the complexity of database column creation and the lack of structured metadata, the description should provide more operational context to be truly helpful.

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 6 parameters thoroughly. The description adds no additional parameter information beyond what's in the schema. The baseline of 3 is appropriate when the schema does the heavy lifting, though the description could have added context about how parameters interact (e.g., the relationship between 'required' and 'default').

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 ('Create') and resource ('email column'), making the purpose immediately understandable. It distinguishes this tool from other column creation tools by specifying the column type (email), but doesn't explicitly differentiate from sibling tools like 'tables_db_create_string_column' or 'tables_db_create_url_column' beyond the email type specification.

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?

The description provides no guidance on when to use this tool versus alternatives. With multiple column creation tools available (boolean, datetime, enum, float, integer, etc.), there's no indication of when an email column is appropriate versus other column types, nor any mention of prerequisites or dependencies.

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