Skip to main content
Glama
ThinAirTelematics

ThinAir Data

Official

query_sql

Execute read-only SQL queries against PostgreSQL, MySQL, or SQL Server. Automatically adapts syntax to the target dialect. Returns results with connection and dialect metadata. Default limit 100 rows.

Instructions

Execute a read-only SQL query against the target connection. ONLY SELECT / WITH / EXPLAIN permitted. Write dialect-appropriate SQL for the connection's engine — PostgreSQL syntax for postgres, T-SQL for mssql, MySQL for mysql. Response meta includes connection + dialect so you know which syntax worked. Default LIMIT 100 unless the user asks for all rows.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • bin/server.js:33-39 (registration)
    Registration of the query_sql tool in the TOOLS array. It is defined with name, description, and inputSchema, but no actual handler — this is a static catalog adapter that redirects execution to the hosted endpoint.
    // DISCOVER tier (free)
    {
      name: "query_sql",
      description:
        "Execute a read-only SQL query against the target connection. ONLY SELECT / WITH / EXPLAIN permitted. Write dialect-appropriate SQL for the connection's engine — PostgreSQL syntax for postgres, T-SQL for mssql, MySQL for mysql. Response meta includes `connection` + `dialect` so you know which syntax worked. Default LIMIT 100 unless the user asks for all rows.",
      inputSchema: { type: "object" },
    },
  • Handler for all tool call requests, including query_sql. This is a generic redirect handler — it does not execute query_sql logic but instead returns a message telling the user to use the hosted endpoint at https://data.thinair.co/mcp.
    server.setRequestHandler(CallToolRequestSchema, async () => ({
      content: [{ type: "text", text: REDIRECT_MESSAGE }],
      isError: false,
    }));
Behavior3/5

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

The description notes the tool is read-only and mentions response metadata (connection, dialect). However, it does not explain how to pass the SQL query given the empty input schema, which is a significant behavioral gap. Without annotations, the description should disclose this mechanism.

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 brief, front-loaded with the main purpose, and every sentence adds value. No wasted words.

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 no output schema and no parameters, the description fails to explain how the SQL query is actually provided to the tool (e.g., via a param not in schema, or from conversation context). This is a critical omission for correct invocation.

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

Parameters4/5

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

With 0 parameters and schema coverage 100%, the description adds value by explaining the tool's constraints and dialect guidance, though it could clarify how the query is supplied.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/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: 'Execute a read-only SQL query against the target connection.' It specifies permitted keywords (SELECT, WITH, EXPLAIN) and mentions dialect support, making the purpose very clear and distinguishable from siblings.

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

Usage Guidelines5/5

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

Explicitly states when to use this tool (read-only queries) and what is permitted. It provides dialect guidelines and a default LIMIT, giving the agent clear instructions on how to craft the query.

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/ThinAirTelematics/thinair-data'

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