Skip to main content
Glama

execute_query

Run SQL queries on CockroachDB with customizable parameters, output formats, and row limits. Retrieve results in JSON, CSV, or table format for efficient data handling.

Instructions

Execute a SQL query with optional parameters and formatting.

Args: query (str): SQL query to execute. params (List, optional): Query parameters. format (str): Output format ('json', 'csv', 'table'). limit (int, optional): Limit number of rows returned.

Returns: The query resultset in json or csv format.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
formatNojson
limitNo
paramsNo
queryYes
Behavior2/5

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

With no annotations provided, the description carries full burden but only mentions basic functionality. It doesn't disclose critical behavioral traits like whether this requires specific database permissions, if it can execute DDL/DML statements, what happens with large resultsets, timeout behavior, or connection requirements. The description is insufficient for a mutation-capable tool with zero 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.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is efficiently structured with a clear opening sentence followed by organized Args and Returns sections. Every sentence adds value, though the Returns section could be slightly more informative about result structure beyond just format.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a SQL execution tool with no annotations and no output schema, the description is incomplete. It doesn't address critical context like security implications, transaction handling, error behavior, or result structure details. The tool can potentially modify data but lacks proper behavioral disclosure.

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?

With 0% schema description coverage, the description compensates well by explaining all 4 parameters: query (SQL to execute), params (optional query parameters), format (output format with enum values), and limit (optional row limit). It adds meaningful context beyond the bare schema, though it could elaborate on params format or limit behavior.

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 verb 'execute' and the resource 'SQL query', specifying it handles optional parameters and formatting. It distinguishes itself from siblings like explain_query (which analyzes rather than executes) and execute_transaction (which handles multi-statement transactions).

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?

The description implies usage for executing SQL queries with formatting options, but doesn't explicitly state when to use this versus alternatives like execute_transaction for multi-statement operations or explain_query for query analysis. No explicit exclusions or prerequisites are mentioned.

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

Related 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/amineelkouhen/mcp-cockroach'

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