Trino MCP Server
Provides tools to query and interact with a Trino cluster, enabling listing catalogs, schemas, tables, describing table structures, executing SQL queries (read-only and optionally write with explicit opt-in), and exporting results to files.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Trino MCP Servershow tables in my_catalog.information_schema"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Trino MCP Server
A simple Model Context Protocol (MCP) server for Trino query engine with OAuth and Azure Service Principal (SPN) support.
Quick Start (TL;DR)
Using with VS Code? Add to .vscode/mcp.json:
{
"servers": {
"trino": {
"command": "uvx",
"args": ["trino-mcp"],
"env": {
"TRINO_HOST": "${trino_host_address}",
"TRINO_USER": "${env:USER}",
"AUTH_METHOD": "OAuth2"
// "ALLOW_WRITE_QUERIES": "true" // Enable write operations (disabled by default)
}
}
}
}Want to run standalone?
# Run directly with CLI flags (no installation needed)
uvx trino-mcp --trino-host localhost --trino-port 8080 --auth-method NONE
# Or use a .env file — just run in the same directory
uvx trino-mcpThat's it! The server will connect to your Trino cluster and provide query capabilities.
Related MCP server: Trino MCP Server
Features
Core Trino Operations without over-complication: Query catalogs, schemas, tables, and execute SQL
Multiple Auth Methods: OAuth2, Azure Service Principal (SPN, >=v0.1.4), basic username/password, or no auth
Azure SPN with Auto-Refresh: Tokens are automatically refreshed before each request — no expiry issues for long-running servers
CLI flags (>=v0.2.1): Pass all configuration via
--trino-host,--auth-method, etc. — no env vars or.envfile requireduvx Compatible: Run directly with
uvxwithout installationDouble-Write Protection: Two layers of safety — separate read-only and read-write tools (
execute_query_read_onlyvsexecute_query), plus anALLOW_WRITE_QUERIESconfiguration flag that must be explicitly enabled before any write query can runFile Export (>=v0.2.0): Write query results directly to disk (JSON or CSV, derived from file extension) to enable subsequent processing by other tools while preventing LLM hallucination on raw data
Query Watermarking: Automatically adds watermark comments to queries for tracking and auditing (includes username and version).
Support for custom watermark key-value pairs via
TRINO_MCP_CUSTOM_WATERMARK(>=v0.2.0)
Prerequisites
Python 3.10 or higher
A running Trino server
(Optional) Trino credentials for authentication
(Optional) uvx
Setup & Configuration
General recommendation: using uvx or uv.
# From PyPI
uv pip install trino-mcp
# From PyPI
uvx trino-mcp
# Clone to local directory and install
uv pip install .
trino-mcpUsing with Claude Desktop
Add to your Claude Desktop configuration (~/Library/Application Support/Claude/claude_desktop_config.json on macOS):
{
"mcpServers": {
"trino": {
"command": "uvx",
"args": ["trino-mcp"],
"env": {
"TRINO_HOST": "localhost",
"TRINO_PORT": "8080",
"TRINO_USER": "trino"
// "ALLOW_WRITE_QUERIES": "true" // Enable write operations if needed
}
}
}
}Using with VS Code
Add to .vscode/mcp.json:
{
"servers": {
"trino": {
"command": "uvx",
"args": ["trino-mcp"],
"env": {
"TRINO_HOST": "${trino_host_address}",
"TRINO_USER": "${env:USER}",
"AUTH_METHOD": "OAuth2"
// "ALLOW_WRITE_QUERIES": "true" // Enable write operations if needed
}
}
}
}Configuration Priority
The server accepts configuration from three sources. When the same setting is provided in multiple places, CLI flags take the highest priority:
Priority | Source | Example |
1 (highest) | CLI flags |
|
2 | Shell environment variables |
|
3 (lowest) |
|
|
CLI Flags
All configuration can be passed as command-line arguments:
Flag | Env Var | Default | Description |
|
|
| Trino server hostname |
|
|
| Trino server port (auto-set to |
|
|
| Username |
|
| — | Default catalog |
|
| — | Default schema |
|
|
|
|
|
|
|
|
|
| — | Password for |
|
| — | Azure token scope for |
|
| — | Azure client ID for |
|
| — | Azure client secret for |
|
| — | Azure tenant ID for |
|
|
| Enable write operations ( |
|
| — | JSON object for custom query watermark (values can be literal or |
|
| — | JSON object of Trino session properties (e.g. |
|
|
| Client-side query timeout in minutes ( |
|
|
| Max concurrent tool calls; excess calls are rejected immediately |
Example:
uvx trino-mcp \
--trino-host trino.example.com \
--trino-port 443 \
--trino-user myuser \
--trino-catalog hive \
--trino-schema default \
--trino-http-scheme https \
--auth-method AZURE_SPN \
--azure-scope "api://your-trino-app-id/.default" \
--azure-client-id your-client-id \
--azure-client-secret your-client-secret \
--azure-tenant-id your-tenant-id \
--allow-write-queries true \
--query-timeout-minutes 10 \
--max-concurrent-queries 3Run uvx trino-mcp --help for the full list of flags.
Environment Variables
Configure the server using environment variables or a .env file:
# Required
TRINO_HOST=localhost # Your Trino server hostname
TRINO_PORT=8080 # Trino server port (auto-set to 443 for Azure SPN/OAuth2)
TRINO_USER=trino # Username (auto-detected from JWT for Azure SPN)
TRINO_HTTP_SCHEME=http # http or https (auto-set to https for Azure SPN/OAuth2)
# Optional
TRINO_CATALOG=my_catalog # Default catalog
TRINO_SCHEMA=my_schema # Default schema
# Authentication method: NONE (default), PASSWORD, OAUTH2, or AZURE_SPN
AUTH_METHOD=PASSWORD
# Option 1: Basic Authentication (AUTH_METHOD=PASSWORD)
TRINO_PASSWORD=your_password
# Option 2: OAuth2 (AUTH_METHOD=OAUTH2)
# Uses Trino's built-in OAuth2 flow (browser-based)
# Option 3: Azure Service Principal (AUTH_METHOD=AZURE_SPN)
# See "Azure SPN Authentication" section below
# Option 4: No auth (AUTH_METHOD=NONE)
# Security
ALLOW_WRITE_QUERIES=true # Enable write operations (INSERT, UPDATE, DELETE, etc.)
# Disabled by default for safety
# accepts `true`, `1`, or `yes`
# Custom Watermark
# JSON object mapping watermark keys to values.
# Use "env:VAR_NAME" to resolve from an environment variable,
# or a plain string for a direct literal value.
TRINO_MCP_CUSTOM_WATERMARK='{"team": "my-team", "app_id": "env:MY_APP_ID"}'Available Tools
The Trino MCP server provides the following tools (see server.py for full details):
list_catalogs- List all available Trino catalogslist_schemas- List all schemas in a cataloglist_tables- List all tables in a schemadescribe_table- Describe the structure of a tableexecute_query_read_only- Execute read-only SQL queries (SELECT, SHOW, DESCRIBE, EXPLAIN)execute_query- Execute any SQL query (requiresALLOW_WRITE_QUERIES=truefor write operations)show_create_table- Show the CREATE TABLE statement for a tableget_table_stats- Get statistics for a table
Exporting Query Results to File
Both execute_query and execute_query_read_only support an output_file parameter that writes results directly to disk instead of returning them to the AI. This is useful for:
Preventing LLM hallucination: Large result sets passed through the AI may be summarized, truncated, or hallucinated. Writing to a file ensures data integrity.
Subsequent processing: The exported file can be read by other tools (e.g., a Python script) for accurate data processing without AI interpretation.
The output format is automatically derived from the file extension:
.csv→ CSV format (with header row).json(or any other extension) → JSON format
When output_file is set, only a confirmation message with the row count is returned to the AI — the raw data never passes through the model.
Authentication
OAuth2
Set AUTH_METHOD=OAUTH2. The Trino Python client handles the OAuth2 flow automatically through a browser-based redirect — no manual JWT handling required.
Azure Service Principal (SPN)
For non-interactive / CI environments using Azure AD. Install with Azure extras:
# pip
pip install trino-mcp[azure]
# uv
uv pip install trino-mcp[azure]
# uvx (install azure-identity alongside)
uvx --from "trino-mcp>=0.1.4" --with azure-identity trino-mcpThe server tries four credential methods in order:
GitHub Actions OIDC (ClientAssertionCredential) — Best for GitHub Actions CI. Uses federated credentials to fetch fresh tokens from the Actions runtime. Requires
AZURE_CLIENT_IDandAZURE_TENANT_ID.az login(AzureCliCredential) — Easiest for local dev. Just runaz login --service-principalbeforehand.Environment variables (ClientSecretCredential) — For CI/CD with client secrets. Set
AZURE_CLIENT_ID,AZURE_CLIENT_SECRET, andAZURE_TENANT_ID.DefaultAzureCredential — Fallback for managed identity, etc.
AZURE_SCOPE is always required (the Trino server's Azure AD app scope, e.g. api://<trino-app-id>/.default).
Option A: Using az login (local development)
# Login as the service principal
az login --service-principal \
--username "$AZURE_CLIENT_ID" \
--password "$AZURE_CLIENT_SECRET" \
--tenant "$AZURE_TENANT_ID" \
--allow-no-subscriptions.env:
AUTH_METHOD=AZURE_SPN
AZURE_SCOPE=api://your-trino-app-id/.default
TRINO_HOST=trino.example.com
TRINO_CATALOG=hive
TRINO_SCHEMA=defaultOption B: Using environment variables (CI/CD)
.env:
AUTH_METHOD=AZURE_SPN
AZURE_SCOPE=api://your-trino-app-id/.default
AZURE_CLIENT_ID=your-client-id
AZURE_CLIENT_SECRET=your-client-secret
AZURE_TENANT_ID=your-tenant-id
TRINO_HOST=trino.example.com
TRINO_CATALOG=hive
TRINO_SCHEMA=defaultOption C: GitHub Actions OIDC (federated credentials)
For GitHub Actions workflows using azure/login@v2 with OIDC. This avoids client secrets entirely and solves token expiry issues — the server fetches fresh OIDC tokens from the Actions runtime on every Azure AD token exchange.
Prerequisites:
An Azure AD app registration with a federated credential configured to trust your GitHub repository's OIDC issuer (
https://token.actions.githubusercontent.com).The federated credential's subject claim must match your workflow (e.g.
repo:your-org/your-repo:ref:refs/heads/mainorrepo:your-org/your-repo:environment:production).
Workflow setup:
jobs:
my-job:
permissions:
id-token: write # Required — enables OIDC token requests
contents: read
steps:
- name: Azure OIDC Login
uses: azure/login@v2
with:
client-id: "<your-client-id>"
tenant-id: "<your-tenant-id>"
allow-no-subscriptions: trueMCP config — pass --azure-client-id and --azure-tenant-id:
{
"trino-mcp": {
"type": "local",
"command": "uvx",
"args": [
"--from", "trino-mcp",
"--with", "azure-identity",
"trino-mcp",
"--trino-host", "trino.example.com",
"--auth-method", "AZURE_SPN",
"--azure-scope", "api://your-trino-app-id/.default",
"--azure-client-id", "<your-client-id>",
"--azure-tenant-id", "<your-tenant-id>",
"--trino-catalog", "hive",
"--trino-schema", "default"
]
}
}The server automatically detects the GitHub Actions environment via ACTIONS_ID_TOKEN_REQUEST_URL and ACTIONS_ID_TOKEN_REQUEST_TOKEN (set by the runner when id-token: write is granted). No additional environment variables need to be forwarded.
Why not just use
azure/login@v2+ AzureCliCredential? TheazCLI session from OIDC login holds a short-lived token that cannot be refreshed. After ~5 minutes, queries start failing.ClientAssertionCredentialsolves this by requesting fresh OIDC tokens from the Actions runtime on every Azure AD token exchange.
VS Code MCP config for Azure SPN
Using CLI flags (no .env file needed):
{
"servers": {
"trino": {
"type": "stdio",
"command": "uvx",
"args": [
"--from", "trino-mcp>=0.2.1",
"--with", "azure-identity",
"trino-mcp",
"--trino-host", "trino.example.com",
"--auth-method", "AZURE_SPN",
"--azure-scope", "api://your-trino-app-id/.default"
],
"cwd": "${workspaceFolder}"
}
}
}Or using .env file (the server reads it automatically):
{
"servers": {
"trino": {
"type": "stdio",
"command": "uvx",
"args": ["--from", "trino-mcp>=0.2.1", "--with", "azure-identity", "trino-mcp"],
"cwd": "${workspaceFolder}"
}
}
}Token auto-refresh: The server automatically refreshes Azure tokens before each Trino request, so it works reliably for long-running sessions without expiry issues.
Development
# Install development dependencies
uv pip install -e ".[dev]"
# Run tests (when available)
pytest
# Format code
black src/
# Type checking
mypy src/Publishing a New Version
See docs/dev.md for release instructions.
Known Issues
Pytest exits with code 137 (SIGKILL)
If tests hang or exit with code 137, there may be stuck trino-mcp or uv processes consuming resources. Try killing them:
# Check for stuck processes
ps aux | grep -E "trino-mcp|uvx" | grep -v grep
# Kill if found
pkill -f trino-mcpCopilot CLI MCP error -32001: Request timed out
When a Trino query takes longer than the MCP client's internal request timeout (~3 minutes in Copilot CLI), the client reports MCP error -32001: Request timed out. The query itself continues running on the Trino server even after the MCP request has timed out.
Mitigation: set --query-timeout-minutes to a value shorter than the client timeout (e.g. 2). This ensures the server cancels the Trino query via cursor.cancel() before the client gives up, so you get a clear timeout error message instead of a raw -32001.
Note: even if the --query-timeout-minutes is longer than the MCP client request timeout error, the query cancellation still work.
License
MIT License - see LICENSE for details.
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
For issues and questions:
Check Trino documentation: https://trino.io/docs/
Check MCP documentation: https://modelcontextprotocol.io/
Available Tools
8 toolsdescribe_tableB
Describe the structure of a table (columns, types, etc).
Args: table: The table name (e.g. 'my_table'). Preferably just the table name; catalog and schema should be passed as separate parameters. Fully qualified names like 'catalog.schema.table' are also accepted. catalog: The catalog name (optional if default is configured) schema: The schema name (optional if default is configured)
| Name | Required | Description | Default |
|---|---|---|---|
| table | Yes | The table name (e.g. 'my_table'). Preferably just the table name; catalog and schema should be passed as separate parameters. Fully qualified names like 'catalog.schema.table' are also accepted for convenience. | |
| schema | No | The schema name (e.g. 'my_schema') | |
| catalog | No | The catalog name (e.g. 'my_catalog') |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
There are no annotations, so the description carries the full burden. It only states the purpose and parameter guidance, but does not disclose whether this is a read-only operation, any permission requirements, error behavior, or what happens if the table doesn't exist. Though 'describe' implies a safe read, that is not explicit.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is efficient: a one-sentence purpose followed by a structured Args list. It is front-loaded and easy to scan. However, the Args section duplicates the schema's parameter descriptions, which is somewhat redundant but not overly verbose.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The tool is relatively simple, and the output schema is present, so return values are covered. Parameters are well-documented in both schema and description. The main gap is missing usage guidance and behavioral details, which makes it only minimally complete for such a tool.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so the baseline is 3. The description largely repeats the schema's parameter docs, with the same wording for 'table' and similar descriptions for 'catalog' and 'schema'. The only slight addition is the note 'optional if default is configured', which adds minor nuance but also potential ambiguity.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states what the tool does: 'Describe the structure of a table (columns, types, etc).' The verb and resource are specific. It does not explicitly distinguish from sibling tools like show_create_table or get_table_stats, but the purpose is unambiguous.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies usage through its purpose and parameter details, but it does not explicitly state when to use this tool compared to alternatives such as show_create_table or list_tables. No exclusions or alternative recommendations are provided.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
execute_queryA
Execute a SQL query and return the results.
This tool can execute any SQL query including write operations (INSERT, UPDATE, DELETE, etc.). By default, write operations are disabled for security. Set ALLOW_WRITE_QUERIES=true to enable.
When output_file is provided, results are written directly to disk and only a confirmation message is returned. This prevents raw data from passing through the AI, avoiding hallucination when processing large result sets. The output format (JSON or CSV) is derived from the file extension.
Args: query: The SQL query to execute output_file: File path to write results to. Extension determines format (.csv → CSV, .json or others → JSON). Results are NOT returned to the AI, enabling reliable downstream processing.
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | The SQL query to execute | |
| output_file | No | File path to write results to. Format is derived from the file extension: '.csv' for CSV, '.json' (or others) for JSON. When set, results are written directly to disk and are NOT returned to the AI, preventing hallucinated values and enabling subsequent processing by other tools. |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the full burden. It discloses that write operations are disabled by default and require ALLOW_WRITE_QUERIES=true, and explains the output_file behavior (results go to disk, only confirmation returned, prevents hallucination). These are substantive behavioral details beyond the schema.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is well-structured with a clear opening sentence, paragraphs on key behaviors, and a bulleted args list. Every sentence provides useful information with no fluff, and the most important details are front-loaded.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's moderate complexity (write support, output_file, security flag), the description covers all major aspects: the query execution capability, the write enable flag, the output_file behavior and format, and the rationale for disk writing. With an output schema present, return values need not be explained. It is complete for successful invocation.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100%, so baseline is 3. The description adds meaningful context beyond the schema: for output_file, it explains the rationale (prevents hallucination, enables downstream processing) and the format derivation. The query param is minimally restated, but the added value for output_file justifies a 4.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description starts with 'Execute a SQL query and return the results' – a specific verb and resource. It clearly distinguishes itself from siblings, especially execute_query_read_only, by stating it can execute write operations (INSERT, UPDATE, DELETE) and by describing the output_file behavior for disk writes.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides clear context for when to use this tool: for any SQL query, including write operations, and for scenarios where results should be written to disk to avoid hallucination. It does not explicitly name alternatives like execute_query_read_only or state when NOT to use this tool, so it lacks explicit when-not guidance.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
execute_query_read_onlyA
Execute a read-only SQL query and return the results.
This tool is designed for read-only queries (SELECT, SHOW, DESCRIBE, EXPLAIN, etc.). It validates that the query is read-only before execution.
When output_file is provided, results are written directly to disk and only a confirmation message is returned. This prevents raw data from passing through the AI, avoiding hallucination when processing large result sets. The output format (JSON or CSV) is derived from the file extension.
Args: query: The SQL query to execute (must be read-only) output_file: File path to write results to. Extension determines format (.csv → CSV, .json or others → JSON). Results are NOT returned to the AI, enabling reliable downstream processing.
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | The SQL query to execute (read-only) | |
| output_file | No | File path to write results to. Format is derived from the file extension: '.csv' for CSV, '.json' (or others) for JSON. When set, results are written directly to disk and are NOT returned to the AI, preventing hallucinated values and enabling subsequent processing by other tools. |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description takes on full responsibility for behavioral disclosure. It reveals key traits: validation of read-only status, optional output_file writes directly to disk, only a confirmation message returned, and format derived from file extension. This goes well beyond a simple 'runs a query' statement, though it stops short of explaining error handling or permissions.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is front-loaded with a clear purpose statement, followed by concise usage notes and parameter details. Each paragraph serves a distinct role—overview, file behavior, args—and the wording is efficient. The only slight redundancy is the repeated 'not returned to the AI,' but it appears in different contexts and reinforces a critical caveat.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the presence of an output schema, return values are covered. The description fully equips an agent to select and invoke the tool: it defines read-only scope, explains the output_file option and its format, and clarifies when results are returned vs. written to disk. No critical information is missing for safe and correct usage.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100%, so baseline is 3. The description adds meaningful context for output_file—that results are written to disk and NOT returned to the AI, preventing hallucination, and explains the format derivation (.csv vs .json). This supplements the schema's own description with rationale and practical guidance, earning above baseline.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description opens with 'Execute a read-only SQL query and return the results'—a specific verb and resource that clearly identifies the tool's function. It further distinguishes itself from the sibling execute_query by explicitly focusing on read-only queries and validation.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description states this is 'designed for read-only queries (SELECT, SHOW, DESCRIBE, EXPLAIN, etc.)' and that it 'validates that the query is read-only before execution,' giving clear context on when to use it. It does not explicitly mention alternatives or exclusions, but the read-only scoping is evident and the sibling naming supports differentiation.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_table_statsB
Get statistics for a table.
Args: table: The table name (e.g. 'my_table'). Preferably just the table name; catalog and schema should be passed as separate parameters. Fully qualified names like 'catalog.schema.table' are also accepted. catalog: The catalog name (optional if default is configured) schema: The schema name (optional if default is configured)
| Name | Required | Description | Default |
|---|---|---|---|
| table | Yes | The table name (e.g. 'my_table'). Preferably just the table name; catalog and schema should be passed as separate parameters. Fully qualified names like 'catalog.schema.table' are also accepted for convenience. | |
| schema | No | The schema name (e.g. 'my_schema') | |
| catalog | No | The catalog name (e.g. 'my_catalog') |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden. It only restates parameter usage and does not disclose what statistics are returned, potential performance costs, permission requirements, or any other behavioral traits. The description adds no transparency beyond the schema.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is short and front-loaded with the main purpose, followed by a structured parameter list. However, the parameter descriptions largely duplicate the schema, so some content is redundant and not earning its place.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple stats retrieval tool with an output schema, the description is minimally adequate. It covers the required parameters and basic usage, but lacks guidance on when to use this tool vs alternatives and any transparency about behavior. Given the tool's simplicity, this is a moderate but acceptable level of completeness.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so the baseline is 3. The description essentially repeats the schema descriptions without adding new meaning. It includes some guidance about fully qualified names and separate catalog/schema, but this is already present in the schema parameter description.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool retrieves statistics for a table, naming the specific verb and resource. However, it does not explicitly differentiate itself from sibling tools like describe_table or show_create_table, though 'statistics' implies a distinct purpose.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides guidance on how to pass parameters (prefer separate catalog/schema, fully qualified names accepted), which is a form of usage context. However, it does not explicitly state when to use this tool over alternatives like describe_table or when not to use it.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
list_catalogsA
List all available Trino catalogs.
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the full burden. 'List all available' clearly indicates a read-only enumeration operation with no parameters and no side effects, but it doesn't mention potential limitations like connectivity requirements or the exact return format (which is covered by the output schema).
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, clear sentence with no wasted words. It front-loads the action and resource.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a parameterless listing tool with an output schema and clear sibling context, the description is complete. It accurately conveys the tool's function without needing additional details.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema has 0 parameters, so there is nothing to explain. The description's mention of 'all available' appropriately communicates the lack of filtering, making the 4 baseline appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description uses the specific verb 'List' and the resource 'Trino catalogs', clearly distinguishing it from sibling tools like list_schemas and list_tables. It precisely states the scope as 'all available'.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description is straightforward but provides no explicit guidance on when to use this tool relative to siblings. The context of a hierarchy (catalogs → schemas → tables) implies it should be used first, but this is not stated.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
list_schemasA
List all schemas in a catalog.
Args: catalog: The name of the catalog to list schemas from
| Name | Required | Description | Default |
|---|---|---|---|
| catalog | Yes | The catalog name |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden. It does not disclose behavioral traits such as read-only nature, required permissions, or side effects. The verb 'list' implies read-only, but this is not explicitly stated.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is very concise with a clear opening sentence and a single parameter definition. There is no fluff, and every sentence serves a purpose.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's simplicity, one parameter, and existing output schema, the description is largely complete. It clearly states what the tool does and accepts, though it omits usage guidance and behavioral details.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100% for the catalog parameter. The description adds slight context by saying 'to list schemas from', but mostly repeats schema information. Therefore, it meets the baseline for high coverage.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states 'List all schemas in a catalog.' with a specific verb and resource. This distinguishes it from sibling tools like list_catalogs and list_tables, which target different objects.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description does not explicitly mention when to use this tool versus alternatives. Usage is implied from the function statement, but there is no exclusion or comparison with list_catalogs or list_tables.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
list_tablesA
List all tables in a schema.
Args: catalog: The name of the catalog schema: The name of the schema
| Name | Required | Description | Default |
|---|---|---|---|
| schema | Yes | The schema name | |
| catalog | Yes | The catalog name |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden of disclosing behavior. It only says 'List all tables' without noting that it is a read-only operation, whether it returns table names only, or if any permissions are required. This is a significant gap for a tool that could be part of a database management context.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is extremely concise, with the main action in the first sentence and a compact args list. Every sentence serves a clear purpose, and there is no fluff or unnecessary detail, making it highly scannable and effective.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The tool is simple and the description covers the core function, but it lacks context about return values (though an output schema exists) and does not mention any behavioral nuances or prerequisites. Given the presence of an output schema, the lack of return details is partially compensated, but the description still feels minimal for a tool with no annotations.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100%, with both parameters already described in the schema ('The schema name' and 'The catalog name'). The description repeats this information in an 'Args' section without adding any extra meaning, such as formatting, constraints, or default behavior. Baseline 3 is appropriate when the schema fully documents parameters.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states 'List all tables in a schema' with a specific verb and resource, and the title 'list_tables' reinforces this. It distinguishes itself from sibling tools like list_catalogs, list_schemas, and describe_table by focusing on tables within a given catalog and schema.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies usage when you need to list tables, but it does not explicitly state when to use this tool versus alternatives or provide any exclusions. Sibling tools like list_catalogs and list_schemas are not mentioned, so guidance is only implicit, not explicit.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
show_create_tableA
Show the CREATE TABLE statement for a table.
Args: table: The table name (e.g. 'my_table'). Preferably just the table name; catalog and schema should be passed as separate parameters. Fully qualified names like 'catalog.schema.table' are also accepted. catalog: The catalog name (optional if default is configured) schema: The schema name (optional if default is configured)
| Name | Required | Description | Default |
|---|---|---|---|
| table | Yes | The table name (e.g. 'my_table'). Preferably just the table name; catalog and schema should be passed as separate parameters. Fully qualified names like 'catalog.schema.table' are also accepted for convenience. | |
| schema | No | The schema name (e.g. 'my_schema') | |
| catalog | No | The catalog name (e.g. 'my_catalog') |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the full burden. It clearly conveys a read-only operation ('Show') and the parameter default behavior for catalog/schema. While it does not explicitly state 'read-only' or error conditions, the behavior is transparent enough for an agent to understand the primary outcome.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is appropriately brief and front-loads the purpose. The Args section is somewhat redundant with the schema, but the overall length is reasonable and does not waste words.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple tool with an output schema, the description sufficiently covers the main function and parameter usage. It does not detail return format, but the output schema handles that. The description is complete enough for an agent to select and invoke the tool correctly.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema has 100% description coverage for all three parameters, and the description's Args section largely duplicates the schema's descriptions. The description adds no new semantics beyond what the schema already provides, so the baseline score of 3 applies.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's purpose with a specific verb and resource: 'Show the CREATE TABLE statement for a table.' This distinguishes it from sibling tools like describe_table, which focuses on table metadata rather than DDL.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies when to use the tool (when a CREATE TABLE statement is needed) and provides guidance on parameter formatting (preferring separate catalog/schema parameters). However, it does not explicitly mention alternatives or when not to use it, leaving some ambiguity.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
8 tool updates
v0.1.0- First observed
describe_table - First observed
execute_query - First observed
execute_query_read_only - First observed
get_table_stats - First observed
list_catalogs - First observed
list_schemas - First observed
list_tables - First observed
show_create_table
TDQS
Scored across 8 tools
Most tools have clear, distinct purposes: listing catalogs/schemas/tables, getting table metadata, and executing queries. The two query execution tools are differentiated by read-only vs. write-capable, and describe_table vs. show_create_table both deal with table structure but with different outputs. Minor overlap exists but descriptions resolve ambiguity.
All tool names follow a consistent verb_noun pattern (list_*, describe_table, execute_query, show_create_table, get_table_stats), using lowercase snake_case throughout. The read-only query tool is named as a clear modifier of execute_query, maintaining consistency.
The 8 tools are well-scoped for a Trino query server, covering metadata exploration and query execution without redundancy. The count is within the ideal 3-15 range and each tool serves a specific need.
The tool surface covers the primary use cases: discovering catalogs/schemas/tables, inspecting table structure, retrieving table statistics, and running read-only or write queries. Minor gaps exist, such as lack of explicit query cancellation or history, but these are not critical for typical Trino interactions and can be handled via SQL.
Maintenance
Related MCP Connectors
Governed data discovery, exact queries, decisions, simulations, and runtime utilities over MCP.
Access New Relic observability data through MCP - query metrics, logs, traces, entities, and more
Governed MCP gateway: one endpoint for your tools, with credential custody and audit log.
Query your warehouse or a CSV with Claude/ChatGPT over MCP, governed by table-level ACL + audit.
Related MCP Servers
- AlicenseNot gradedqualityCmaintenanceMCP server providing seamless integration with Trino and Iceberg for advanced data exploration, querying, and table maintenance.Apache 2.0
- AlicenseNot gradedqualityDmaintenanceEnables listing and querying Trino tables via MCP, supporting arbitrary SQL queries against a Trino cluster.MIT
- AlicenseNot gradedqualityCmaintenanceEnables querying multiple SQL Server, Azure SQL, or Synapse databases through a single MCP interface, with support for read-only targets and various authentication methods.MIT
- AlicenseNot gradedqualityCmaintenanceEnables executing SQL queries, exploring database schemas, and exporting results from Redash via MCP, with ad-hoc queries and write protection.5 npmMIT