Skip to main content
Glama
fabianguiliani

warehouse-mcp-server

run_query

Execute read-only SQL SELECT queries on a warehouse, returning rows as JSON with a default cap of 200 (max 5000). Aggregate counts in SQL to stay within row limits.

Instructions

Run a read-only SQL SELECT against the warehouse and return rows as JSON. Only SELECT (and WITH ... SELECT) is permitted; a single statement per call. Results are capped at 200 rows by default and 5000 at most — aggregate in SQL rather than pulling rows and counting them yourself.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sqlYesA single SELECT statement.
limitNoRow cap (default 200).
Install Server

TDQS

A4.9/5.0
Behavior5/5

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

With no annotations provided, the description carries the full burden. It discloses read-only behavior, allowed statement types, single-statement restriction, default and maximum row caps, and advises against pulling rows for counting. This is rich behavioral disclosure far beyond simple 'runs a query'.

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 sentences, front-loaded with the core purpose, followed by constraints and best-practice advice. No filler or redundancy; every sentence adds necessary information.

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 (SQL query execution), the description covers return format (JSON), allowed syntax, single-statement rule, and row limits. Sibling tools are metadata-oriented, so this is complete for selecting and invoking the tool. No output schema or annotations exist, but the description sufficiently covers what the agent needs to know.

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 100%, so baseline is 3. The description adds value by explaining the default row cap (200), the absolute max (5000), and the rationale for using SQL-side aggregation, which complements the schema's limit parameter and sql description.

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?

Description clearly states a specific verb ('Run') and resource ('a read-only SQL SELECT against the warehouse') with a concrete outcome ('return rows as JSON'). It distinguishes itself from siblings (list_tables/describe_table) by being the data-query tool rather than a metadata tool.

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?

Provides explicit constraints: only SELECT/WITH...SELECT, single statement, row caps, and guidance to aggregate in SQL instead of pulling raw rows. This clearly tells the agent when to use the tool and what to avoid, effectively differentiating from metadata-only sibling tools.

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

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/fabianguiliani/warehouse-mcp-server'

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