Skip to main content
Glama
Auto Ontology MCP

Auto Ontology MCP

by gogoymh

Run Sql

run_sql
Read-only

Execute read-only SQL queries against a datasource to return columns, rows, row count, truncation status, terms, and warnings; writes and multiple statements are refused.

Instructions

Execute a read-only query and return columns, rows, row_count and truncated, plus the Terms it used and warnings. Writes, DDL and multiple statements are refused; the connection itself is read-only. Present the SQL with the answer and say when results are truncated.

Input Schema

NameRequiredDescriptionDefault
sqlYesOne read-only SELECT in the datasource dialect.
max_rowsNoRows to return (capped by the server).
questionNoThe user's question, kept with the query for provenance.
datasourceNoDatasource name. Optional when only one datasource is registered.

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.3.0

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true and destructiveHint=false, and the description reinforces this with concrete behavior: the connection itself is read-only and writes, DDL and multiple statements are refused. It also discloses truncation behavior and instructs the agent to present the SQL and flag truncation, though it duplicates the shape of the response that the output schema already defines.

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?

Three tight sentences: capability and return shape first, hard constraints second, agent-facing presentation instruction last. Nothing is wasted, and the most decision-relevant fact (read-only execution) is front-loaded.

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?

With annotations, a full-coverage schema and an output schema, the description covers what an agent needs: what gets executed, what is refused, and how to report truncated results. It stops short of covering timeouts, result-size limits, or the validate-then-run workflow implied by the validate_sql sibling, which would make it complete for a multi-step SQL agent.

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

Parameters3/5

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

Schema description coverage is 100%, so all four parameters (sql, max_rows, question, datasource) are already documented in the schema, establishing a baseline of 3. The description adds only a small amount of meaning beyond that, mainly the link between max_rows and the truncated flag, without covering dialect constraints or the provenance role of 'question' beyond what the schema says.

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

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description gives a specific verb ('Execute') and resource ('a read-only query') plus the exact result shape (columns, rows, row_count, truncated, Terms, warnings), which is far more than a restatement of the name. It does not explicitly position itself against the nearby validate_sql or check_answerable siblings, leaving the agent to infer that this is the execution step rather than the validation step.

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

Usage Guidelines3/5

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

It clearly bounds usage by refusing writes, DDL and multiple statements, which is useful when-to-use context. However, there is no explicit guidance on when to call validate_sql first, when to prefer lookup_values or check_answerable, or how to handle a query that is rejected, so the alternative-selection guidance is only implied.

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