Skip to main content
Glama

raw_sql

Run read-only SQL against raw and derived tables to inspect data and retrieve raw values, with row limits and timeouts enforced.

Instructions

Escape hatch: read-only SQL over every raw and derived table (see describe_schema and coverage). A single SELECT or WITH statement, row cap, timeout, no file or network access. Results carry no definitions — prefer query for anything involving a concept, and tell the user when a number came from raw SQL. Every call is logged; recurring raw queries are how new attributes get prioritised.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sqlYes
limitNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.9/5.0
Behavior5/5

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

With no annotations, the description carries the full behavioral burden and does so thoroughly. It discloses read-only access, no file or network access, single SELECT/WITH statements, row caps, timeouts, lack of definitions in results, and logging behavior—far beyond what the schema alone provides.

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?

The description is dense but every sentence earns its place: purpose, constraints, alternative tool guidance, and operational side effects are all packed into a highly readable format. The most important distinguishing information is front-loaded.

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?

Given the tool's complexity and the presence of an output schema, the description is fully sufficient. It covers scope, safety, usage boundaries, logging, and fallback behavior without needing to describe return values, which the output schema already handles.

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 description coverage is 0%, so the description must compensate for missing parameter documentation. It adds meaning by specifying that `sql` must be a single SELECT or WITH statement and implying `limit` through the row-cap constraint, though it does not explicitly name the limit parameter.

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 opens with 'Escape hatch: read-only SQL over every raw and derived table,' which clearly states the tool's function, scope, and constraints. It also distinguishes itself from `query` by noting that raw SQL results carry no definitions and that `query` should be preferred for concept-based work.

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?

The description explicitly tells the agent when to use this tool versus `query`, directing concept-related queries to `query` and raw/derived table access here. It also provides practical guidance such as telling the user when a number came from raw SQL and noting that recurring raw queries drive attribute prioritization.

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