Skip to main content
Glama

execute_query

Execute SQL queries on CockroachDB with optional parameters, outputting results in JSON, CSV, or table format, and controlled row limits for targeted data retrieval.

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 provides minimal behavioral information. It mentions 'execute a SQL query' which implies a write operation could occur, but doesn't clarify if this tool can perform DML/DDL operations, what permissions are required, whether transactions are managed, or if there are rate limits. The return format is mentioned but not the structure or error handling.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

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

The description is reasonably concise with clear sections for Args and Returns, but includes redundant information ('Execute a SQL query' then repeats in Args). The formatting could be more front-loaded with critical information about what types of queries can be executed and safety considerations.

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

Completeness3/5

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

For a 4-parameter tool with no annotations and no output schema, the description provides basic parameter semantics and return format information. However, it lacks critical context about what happens when queries fail, whether DDL/DML operations are supported, transaction behavior, and how results are structured beyond format type.

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?

The description adds significant value beyond the 0% schema description coverage by explaining all 4 parameters: query (SQL to execute), params (optional query parameters), format (output format with enum values), and limit (optional row limit). This compensates well for the schema's lack of descriptions, though it doesn't provide examples or format details for the params array.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool executes SQL queries with optional parameters and formatting, providing a specific verb ('execute') and resource ('SQL query'). However, it doesn't explicitly differentiate from sibling tools like 'execute_transaction' or 'explain_query' which suggests similar query-related functionality.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives like 'execute_transaction' for transactional operations or 'explain_query' for query analysis. It mentions optional parameters but doesn't explain when they should be used or what alternatives exist among the many sibling database tools.

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-cockroachdb'

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