Skip to main content
Glama
Abeautifulsnow

TDengine Query MCP Server

get_field_infos

Retrieve field information for a specified stable in TDengine databases to understand data structure and schema details for query planning.

Instructions

Get the field information of the specified stable.

    Args:
        db_name (Optional[str]): The name of the database. Defaults to None. When the value is None, it means the configured database is used.
        stable_name (str): The name of the stable.

    Returns:
        TaosSqlResponse: The field information of the specified stable.
    

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
db_nameNoThe name of the database. Default is None which means the configured database.
stable_nameYesThe name of the stable

Implementation Reference

  • The get_field_infos tool handler, which describes a stable in TDengine.
    @mcp.tool(name="get_field_infos")
    def get_field_infos(
        ctx: Context,
        db_name: Optional[str] = Field(
            None,
            description="The name of the database. Default is None which means the configured database.",
        ),
        stable_name: str = Field(description="The name of the stable"),
    ) -> TaosSqlResponse:
        """Get the field information of the specified stable.
    
        Args:
            db_name (Optional[str]): The name of the database. Defaults to None. When the value is None, it means the configured database is used.
            stable_name (str): The name of the stable.
    
        Returns:
            TaosSqlResponse: The field information of the specified stable.
        """
    
        taos = ctx.request_context.lifespan_context.client
        if db_name is None or db_name == "":
            db_name = taos.database
    
        result = taos.execute_sql(f"DESCRIBE {db_name}.{stable_name};")
    
        return result

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/Abeautifulsnow/tdengine-mcp'

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