Skip to main content
Glama
appwrite

Appwrite MCP Server

Official
by appwrite

tables_db_create_integer_column

Add an integer column to an Appwrite database table with optional constraints like minimum/maximum values and default settings.

Instructions

Create an integer column. Optionally, minimum and maximum values can be provided.

Input Schema

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

Implementation Reference

  • Generic handler that dispatches to the Appwrite SDK method for the tool. For tables_db_create_integer_column, bound_method is TablesDB.create_integer_column.
    @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)}")]
  • Registers the TablesDB Appwrite service with prefix 'tables_db', enabling automatic tool generation for its methods including create_integer_column as 'tables_db_create_integer_column'.
    tools_manager.register_service(Service(TablesDB(client), "tables_db"))
  • Generates the tool name by prefixing service_name (tables_db) to the method name (create_integer_column). Also generates input schema from type hints and docstrings.
    # Get the overridden name if it exists
    tool_name = self._method_name_overrides.get(name, f"{self.service_name}_{name}")
  • Imports the TablesDB class from Appwrite SDK, whose methods become MCP tools.
    from appwrite.services.tables_db import TablesDB
  • ToolManager method that registers a service by adding its dynamically generated tools to the registry.
    def register_service(self, service: Service):
        """Register a new service and its tools"""
        self.services.append(service)
        self.tools_registry.update(service.list_tools())
Behavior2/5

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

With no annotations provided, the description carries full burden for behavioral disclosure. It mentions optional min/max constraints but doesn't address critical behaviors: whether this is a destructive schema change, what permissions are required, error conditions, or what happens to existing data. For a schema mutation tool, this leaves significant gaps.

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 extremely concise at just two sentences with zero wasted words. It's front-loaded with the core purpose and efficiently mentions the key optional constraints. Every word serves a purpose.

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 schema mutation tool with 8 parameters, no annotations, and no output schema, the description is inadequate. It doesn't explain what the tool returns, error conditions, side effects, or important behavioral constraints. The agent would need to guess about critical aspects of this column creation operation.

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 8 parameters thoroughly. The description adds minimal value by mentioning min/max constraints, but doesn't provide additional context about parameter interactions (like the default/required conflict noted in the schema) or usage patterns beyond what's already in the structured schema.

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 verb ('Create') and resource ('integer column'), making the purpose unambiguous. It distinguishes this tool from other column creation tools by specifying the data type (integer), but doesn't explicitly differentiate it from sibling integer column tools like 'tables_db_update_integer_column'.

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. It doesn't mention prerequisites (like needing a database and table), when to choose integer over other numeric types, or when to use this versus the update_integer_column sibling tool.

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