Skip to main content
Glama

Run read-only SQL query

query
Read-onlyIdempotent

Run read-only SQL queries across federated data sources to retrieve matching rows. Specify fully-qualified names and use LIMIT for safe exploration.

Instructions

Run a read-only SQL query and return rows. Use fully-qualified relation names. Prefer LIMIT for exploration.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sqlYes
Behavior3/5

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

Annotations already declare readOnlyHint=true and idempotentHint=true. The description adds the key behavioral detail 'return rows' and confirms 'read-only.' Since annotations cover safety traits, the description adds moderate value but no extra on auth, rate limits, or side effects. A 3 is appropriate given annotation coverage.

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?

Two sentences, no filler. First sentence: purpose + output. Second sentence: best practices. Every word earns its place. Front-loaded with the core action.

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?

For a simple one-parameter tool with no output schema, the description covers purpose, output, and usage tips. It could mention error handling or query size limits, but given low complexity, it is adequately complete compared to sibling descriptions.

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?

Input schema has 0% description coverage for the single 'sql' parameter. The description compensates fully: it clarifies the parameter is a SQL query, must be read-only, and advises using fully-qualified names and LIMIT. This adds essential meaning beyond the raw schema type.

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 runs a read-only SQL query and returns rows. It uses specific action verbs ('Run') and resource ('SQL query'). It distinguishes from sibling tools (list_sources, list_tables, describe_table) which handle metadata, while this tool executes arbitrary SQL.

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

Usage Guidelines4/5

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

Provides explicit guidance: 'Use fully-qualified relation names' and 'Prefer LIMIT for exploration.' This helps agents write safe queries and understand exploration use. It doesn't explicitly exclude DDL/DML, but the 'read-only' hint covers that. Could mention when to prefer sibling tools, but the context is clear.

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/datacharter/datacharter'

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