Skip to main content
Glama

run_sql

Execute a read-only SQL query via a Preset database connection to verify query functionality before dataset creation. Supports SELECT, SHOW, DESCRIBE, and EXPLAIN statements.

Instructions

Execute a read-only SQL query through a Preset database connection.

This is a debugging/verification tool — use it to confirm a query works through Preset's connection before creating a dataset. For primary SQL exploration, prefer your Snowflake MCP (igloo-mcp).

Only SELECT, SHOW, DESCRIBE, and EXPLAIN are permitted. Write operations and multi-statement queries are blocked.

Args: sql: SQL query to execute (read-only, single statement) database_id: Database connection ID — use list_databases to find it schema: Optional schema name limit: Max rows to return (default 1000) response_mode: 'compact' (columns only), 'standard' (5 sample rows), or 'full' (all rows with smart truncation). Default: standard.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sqlYes
database_idYes
schemaNo
limitNo
response_modeNostandard

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

No annotations, so description carries full burden. Clearly states read-only, single statement, blocked operations, response modes. Does not mention authentication or error handling, but constraints are well-disclosed.

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?

Front-loaded with purpose and usage context, then parameter list. No redundant sentences. Each sentence adds value. Well-structured and efficient.

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 parameter semantics, usage guidelines, behavioral constraints, and prerequisite (list_databases). Does not explain return values because output schema exists. Missing minor details like timeouts, but overall complete for a query tool.

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 coverage is 0%, but description comprehensively explains each parameter: sql, database_id (with lookup hint), schema (optional), limit (default 1000), and response_mode (enums with descriptions). Adds 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?

Clearly states it executes a read-only SQL query via Preset, specifying it's for debugging/verification before creating datasets. Distinguishes from sibling tools by referencing Snowflake MCP for primary exploration.

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?

Explicitly says when to use (confirm query works before creating dataset) and when not (prefer Snowflake MCP for primary SQL exploration). Also lists permitted commands (SELECT, SHOW, DESCRIBE, EXPLAIN) and blocks write operations.

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/Evan-Kim2028/preset-mcp'

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