Skip to main content
Glama
Abeautifulsnow

TDengine Query MCP Server

get_all_stables

Retrieve all super tables from a TDengine database to analyze database structure and explore available data models for querying.

Instructions

Get all stables.

    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.

    Returns:
        TaosSqlResponse: All stables in the current Taos database.
    

Input Schema

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

Implementation Reference

  • The implementation of the 'get_all_stables' MCP tool handler.
    @mcp.tool(name="get_all_stables")
    def get_all_stables(
        ctx: Context,
        db_name: Optional[str] = Field(
            None,
            description="The name of the database. Default is None which means the configured database.",
        ),
    ) -> TaosSqlResponse:
        """Get all stables.
    
        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.
    
        Returns:
            TaosSqlResponse: All stables in the current Taos database.
        """
    
        taos = ctx.request_context.lifespan_context.client
        if db_name is None or db_name == "":
            db_name = taos.database
    
        result = taos.execute_sql(f"SHOW {db_name}.STABLES;")
    
        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