Skip to main content
Glama
gigapi

GigAPI MCP Server

by gigapi

get_table_schema

Retrieve table structure and metadata from GigAPI Timeseries Lake to understand data organization and relationships for effective querying.

Instructions

Get schema information for a specific table.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
input_dataYes

Implementation Reference

  • Primary handler for the get_table_schema MCP tool. Calls the client method and wraps the response with success/error handling.
    def get_table_schema(self, database: str, table: str) -> Dict[str, Any]:
        """Get table schema information.
    
        Args:
            database: The name of the database
            table: The name of the table
    
        Returns:
            Table schema information
        """
        try:
            schema = self.client.get_table_schema(database, table)
            return {
                "schema": schema,
                "success": True,
                "database": database,
                "table": table
            }
        except GigAPIClientError as e:
            logger.error(f"Failed to get table schema: {e}")
            return {
                "error": str(e),
                "success": False,
                "database": database,
                "table": table
            }
  • Tool registration in create_tools function, defining the handler lambda, name, and description for FastMCP.
    Tool.from_function(
        lambda input_data: tools_instance.get_table_schema(
            input_data["database"], input_data.get("table", "")
        ),
        name="get_table_schema",
        description="Get schema information for a specific table.",
    ),
  • Core helper function in GigAPIClient that executes the DESCRIBE SQL query to retrieve the table schema.
    def get_table_schema(self, database: str, table: str) -> List[Dict[str, Any]]:
        """Get table schema information.
    
        Args:
            database: Database name
            table: Table name
    
        Returns:
            List of column information
        """
        query = f"DESCRIBE {table}"
        response = self.execute_query(query, database)
    
        if response.error:
            raise GigAPIClientError(f"Failed to get table schema: {response.error}")
    
        return response.results
  • Adds all tools, including get_table_schema, to the FastMCP server instance.
    tools = create_tools(client)
    for tool in tools:
        mcp.add_tool(tool)
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It only states what the tool does ('Get schema information') without adding context such as whether this is a read-only operation, if it requires specific permissions, what format the schema information is returned in, or any rate limits. This is inadequate for a tool with no annotation coverage.

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 a single, clear sentence that is front-loaded with the tool's purpose. There is no wasted language or unnecessary elaboration, making it highly efficient and easy to parse.

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 tool's complexity (1 parameter with no schema coverage, no output schema, and no annotations), the description is incomplete. It fails to explain the parameter meaning, the return format, or behavioral traits like safety and permissions. For a tool that retrieves schema information, this leaves critical gaps in understanding how to use it effectively.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 1 parameter with 0% description coverage, meaning the parameter 'input_data' is undocumented. The description does not compensate by explaining what 'input_data' should contain (e.g., a table name or identifier), leaving the agent guessing about how to invoke the tool correctly. This is a significant gap given the low schema coverage.

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 tool's purpose with a specific verb ('Get') and resource ('schema information for a specific table'), making it immediately understandable. However, it does not differentiate this tool from potential siblings like 'list_tables' or 'run_select_query', which might also provide schema-related information, so it falls short of a perfect 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?

The description provides no guidance on when to use this tool versus alternatives. For example, it does not specify if this is for metadata retrieval versus data querying, or how it differs from 'list_tables' or 'run_select_query' in terms of schema access. This lack of context leaves the agent without clear usage instructions.

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/gigapi/gigapi-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server