Skip to main content
Glama
Teradata

Teradata MCP Server

Official
by Teradata

base_readQuery

Read-onlyIdempotent

Execute a user-provided SQL query against Teradata and return the results. Use only when explicit SQL is supplied.

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
Behavior4/5

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

Annotations already declare readOnlyHint=true and idempotentHint=true. Description adds context on truncation behavior, persist option, and metadata fields. However, it does not explicitly state the tool only executes read-only queries (SQL could include DML), but annotations cover this. Slight gap in emphasizing safety beyond annotations.

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?

Well-structured with sections for arguments, truncated handling, and returns. Every sentence adds value; no fluff. Front-loaded with core purpose and usage guidance.

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?

Covers all three parameters and return metadata fields (volatile_table, truncated, row_limit). Does not address error cases or invalid SQL, but given no output schema, it provides adequate completeness for the tool's complexity.

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

Parameters5/5

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

Schema has 0% description coverage, but the description provides thorough explanations for all three parameters: sql (required full SQL text), persist (persist results as table), row_limit (default 1000, ceiling 50000). Adds significant meaning beyond bare schema.

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 executes user-provided SQL queries against Teradata and returns results. It explicitly distinguishes from sibling tool base_tablePreview for browsing, and mentions alternatives, avoiding ambiguity.

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?

Provides explicit when-to-use (user supplies explicit SQL or filter conditions) and when-not-to-use (do not use for browsing/sampling - use base_tablePreview). Includes guidance on handling truncated results with higher row_limit or persist=true.

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/Teradata/teradata-mcp-server'

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