Skip to main content
Glama
Lagaam

Lagaam

Official

Query data

query_data
Read-only

Run governed read-only SELECT queries against Trino and Apache Pinot lakehouses; SQL is safety-checked, table-allowlisted, budget-priced, and returns capped rows or fixable rejection messages.

Instructions

Run a read-only SELECT and get the rows back.

    Write a single SELECT in the engine's dialect. The query is checked
    for safety, priced against your budget, and executed with a row cap —
    so name the columns you need (no SELECT *), and add WHERE filters to
    keep the scan small. At most 1,000 rows come back by default (a
    larger LIMIT is lowered to the cap), and `truncated` marks a result
    the cap cut off. A query that touches any table outside your grant
    is refused before it runs. If it is rejected, the message says what
    to fix. Describe the tables first so column and table names are exact.
    

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "sql": "<sql>"
    },
    "name": "query_data"
  }
}

Input Schema

NameRequiredDescriptionDefault
sqlYesOne SELECT in the engine's dialect, naming each table as catalog.schema.table and each column it needs.

Output Schema

NameRequiredDescriptionDefault
rowsYes
columnsYes
warningsNo
row_countYes
truncatedNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv1.0.0
    • addedInput schema / properties / sql / description
      Added value: +"One SELECT in the engine's dialect, naming each table as catalog.schema.table and each column it needs."
  2. First observedv0.2.4

TDQS

A4.6/5.0
Behavior5/5

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

Annotations only declare readOnlyHint and openWorldHint; the description adds substantial behavior beyond them: a safety check, budget pricing, a 1,000-row default cap with larger LIMITs lowered, a `truncated` marker, and grant-based refusal before execution. It also tells the agent that rejections return actionable messages, which shapes retry behavior.

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

Conciseness4/5

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

Front-loaded with the core action, then constraints in a logical order (safety, cap, grants, recovery). A few clauses restate the schema's 'one SELECT in the engine's dialect' wording, but nothing is padded or wasted.

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

Completeness5/5

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

For a single-parameter tool with an output schema, the description covers everything an agent needs: input constraints, execution limits, failure modes, and prerequisite discovery. The extra note about `truncated` is a bonus rather than a gap-filler.

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?

Schema coverage is 100% and the schema already specifies catalog.schema.table naming, so the baseline is met by structured data alone. The description still adds meaning the schema does not: exactly one SELECT, no SELECT *, and the recommendation to add WHERE filters to keep the scan small.

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?

States a specific verb and resource ('Run a read-only SELECT and get the rows back') and implicitly separates itself from siblings by directing the agent to describe tables first, which maps to describe_table. An agent can tell this is the execute-SQL tool and not a metadata lister without opening the schema.

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

Usage Guidelines4/5

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

Gives clear preconditions and usage context: name columns explicitly, add WHERE filters, and describe tables before querying so identifiers are exact. It lacks an explicit when-not or a named alternative for read-only metadata exploration, but the routing hint to describe_table covers the main decision point.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Deploy Server

Other Tools