Skip to main content
Glama
Abeautifulsnow

TDengine Query MCP Server

query_taos_db_data

Execute read-only SQL queries on TDengine databases to retrieve data, explore database structures, and investigate information directly from AI-powered tools.

Instructions

Important: Run a read-only SQL query on Taos database(涛思数据库).

    Args:
        sql_stmt (str): The sql statement you want to retrieve data from taos db.

    Returns:
        List: All data from the specified table.

    

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sql_stmtYesThe sql statement you want to retrieve data from taos db

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
dataYes
headYes
rowsYes
statusYes
column_metaYes

Implementation Reference

  • The implementation of the `query_taos_db_data` tool handler in the `tdengine_mcp_server`.
    @mcp.tool(name="query_taos_db_data")
    def query_taos_db_data(
        ctx: Context,
        sql_stmt: str = Field(
            description="The sql statement you want to retrieve data from taos db"
        ),
    ) -> TaosSqlResponse:
        """**Important**: Run a read-only SQL query on `Taos database(涛思数据库)`.
    
        Args:
            sql_stmt (str): The sql statement you want to retrieve data from taos db.
    
        Returns:
            List: All data from the specified table.
    
        """
    
        taos = ctx.request_context.lifespan_context.client
        return taos.execute_sql(sql_stmt)  # type: ignore
Behavior3/5

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

With no annotations provided, the description carries the full disclosure burden. It successfully declares the 'read-only' safety trait, but omits other behavioral details like result set limits, error handling for invalid SQL, or connection pooling behavior that would help an agent anticipate failure modes.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description uses Python docstring formatting (Args/Returns) which is redundant given the structured input schema and existence of output schema. While the 'Important' prefix effectively front-loads the read-only constraint, the Args/Returns sections waste tokens by repeating fully-documented schema information.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a single-parameter query tool with complete schema coverage and an existing output schema, the description is sufficiently complete. It identifies the target database system and operation type adequately, though mentioning SQL dialect specifics or result size limits would improve it.

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?

The Args section describes sql_stmt as 'The sql statement you want to retrieve data from taos db', which is verbatim repetition of the schema description. With 100% schema coverage, this meets the baseline score of 3 without adding additional syntactic or semantic guidance (e.g., expected SQL dialect features).

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 executes a 'read-only SQL query' on the specific 'Taos database' resource. The 'read-only' qualifier is specific and distinguishes it from potential write operations, though it could better differentiate from sibling metadata tools like get_field_infos.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The 'read-only' constraint provides basic usage guidance (do not use for INSERT/UPDATE), but there is no explicit guidance on when to choose this over sibling metadata tools like get_all_stables or how to construct valid queries for this specific SQL dialect.

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

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