Skip to main content
Glama
Teradata

Teradata MCP Server

Official
by Teradata

Base Readquery

base_readQuery
Read-onlyIdempotent

Run a user-supplied SQL query against Teradata and return matching rows. Use row_limit or persist to retrieve large result sets without truncation.

Instructions

Execute a user-provided SQL query against Teradata and return the results. Use this tool ONLY when the user supplies an explicit SQL statement or a request that includes filter conditions (WHERE clause, aggregations, JOINs, etc.). Do NOT use for simply browsing or sampling rows from a table — use base_tablePreview for that. The sql parameter is required and must contain the full SQL text.

Arguments: sql - SQL text, with optional bind-parameter placeholders persist - Set to True to persist the results as a table and reuse it later. Recommended for large result sets. row_limit - Maximum rows to return (default 1000, ceiling 50000). Pass a higher value when you need more rows.

When the response metadata contains 'truncated: true', more rows exist beyond the limit. To get more data:

  • Pass a higher row_limit (up to 50000) to retrieve more rows in the response.

  • Use persist=true to write all rows to a volatile table and query it directly — this bypasses the row limit entirely and is the recommended approach for large result sets.

Returns: ResponseType: formatted response with query results + metadata (includes 'volatile_table' field in metadata if persist=True) (includes 'truncated' and 'row_limit' in metadata when results are capped)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sqlNo
persistNo
row_limitNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.2.2
    • addedInput schema / properties / row_limit
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "integer"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null
      +}
  2. Changed3 schema fields changedv0.2.1
    • addedInput schema / additionalProperties
      Added value: +false
    • addedInput schema / properties / persist
      Added value: +{
      +  "default": false,
      +  "type": "boolean"
      +}
    • removedInput schema / properties / sql / title
      Removed value: -"Sql"
  3. Changed1 schema field changedv1.0.0
    • removedInput schema / title
      Removed value: -"handle_base_readQueryArguments"
  4. First observed

TDQS

A4.8/5.0
Behavior5/5

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

Beyond the readOnly/idempotent annotations, the description discloses the row_limit default (1000) and ceiling (50000), the 'truncated' metadata flag, and the persist option writing to a volatile table. It also tells the agent how to obtain more rows, including a path that bypasses the row limit.

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?

The content is well front-loaded and organized into arguments, truncation handling, and returns. It is slightly redundant — persist is 'recommended for large result sets' twice — but every major operational point is covered.

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 three-parameter tool with no output schema, the description supplies the missing return contract: formatted query results plus metadata, with 'volatile_table', 'truncated', and 'row_limit' fields. It also covers practical large-result behavior, so an agent can call and interpret the tool correctly.

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% schema coverage, the description fully explains sql, persist, and row_limit, including defaults and bound-parameter placeholders. One point is deducted because the description calls sql 'required' while the input schema marks it optional (default null), an inconsistency an agent may stumble on.

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 states a specific action: 'Execute a user-provided SQL query against Teradata and return the results.' It also distinguishes this tool from row-browsing by saying it is for explicit SQL with filters, aggregations, or JOINs, unlike base_tablePreview.

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?

It gives an explicit go condition ('ONLY when the user supplies an explicit SQL statement...'), an explicit don't-use condition ('Do NOT use for simply browsing or sampling rows'), and names the alternative (base_tablePreview). An agent can select this tool without inference.

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