Skip to main content
Glama

cdp_generate_query

Generate SQL queries automatically from dataset definitions in JSON format to simplify data analysis and reporting tasks.

Instructions

Generate a SQL query from a dataset definition. Pass the dataset definition as a JSON string.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
bodyYes
tenant_idNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the tool generates a SQL query but does not describe any behavioral traits such as whether it's read-only, if it has side effects, rate limits, or authentication needs. For a tool with no annotation coverage, this is inadequate, as it leaves the agent uncertain about operational risks.

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?

The description is extremely concise and front-loaded, consisting of only two sentences that directly state the tool's function and parameter usage. There is no wasted verbiage, making it efficient and easy to parse.

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?

Given the tool's moderate complexity (2 parameters, no annotations, but with an output schema), the description is minimally adequate. It explains the core function but lacks details on behavioral traits, parameter specifics beyond 'body,' and usage context. The presence of an output schema mitigates the need to describe return values, but overall completeness is limited.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The description adds some meaning by specifying that the 'body' parameter should be a 'dataset definition as a JSON string,' which clarifies its purpose beyond the schema's generic 'Body' title. However, with 0% schema description coverage and two parameters (body and tenant_id), it does not fully compensate for the lack of schema details, especially for 'tenant_id,' which remains undocumented.

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's purpose: 'Generate a SQL query from a dataset definition.' It specifies the verb ('Generate'), resource ('SQL query'), and source ('dataset definition'). However, it does not explicitly differentiate from sibling tools like 'cdp_query_sql' or 'cdp_query_sql_post', which might be for executing queries rather than generating them, leaving some ambiguity.

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. It mentions passing the dataset definition as a JSON string but does not specify prerequisites, context, or exclusions. Given the presence of sibling tools like 'cdp_query_sql', the lack of comparative guidance is a significant gap.

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/atharva-joshi77/cdp-mcp'

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