Skip to main content
Glama
1franky

Data Platform MCP

by 1franky

generate_and_execute_query

Write SQL from a natural language question, validate it, and execute it against the selected database to return results.

Instructions

Generate SQL and, only if it is executable, run it under full revalidation.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
max_rowsNo
questionYes
connection_idYes
timeout_secondsNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
messageYes
outcomeYesTerminal outcome of one SQL generation attempt.
questionYes
executionNo
generatedNo
error_codeNo
clarificationNo
connection_idYes
contract_versionNo1.0.0
Behavior2/5

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

With no annotations, the description must carry the full burden. It discloses conditional execution and 'full revalidation' but leaves critical behaviors unspecified, such as whether writes are allowed, what revalidation entails, or failure behavior. This is insufficient for a potentially mutating query execution tool.

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 a single concise sentence, front-loaded with the core action. Every word earns its place; there is no fluff or repetition.

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?

Given the tool's complexity (generation + conditional execution), the presence of sibling tools, and the lack of annotations, the description is too sparse. It omits usage context, side-effect transparency, and parameter semantics, though the output schema reduces the need to describe return values.

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

Parameters2/5

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

Schema description coverage is 0%, and the description provides no parameter details. Though parameter names like connection_id, max_rows, and timeout_seconds are self-explanatory, the description adds no meaning about how they interact with query generation or execution.

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?

Description clearly states the tool generates SQL and executes it conditionally, which distinguishes it from siblings like generate_sql and execute_read_query. However, it doesn't explicitly mention that the SQL is generated from the 'question' parameter, though this is implied.

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?

No guidance is provided on when to use this tool versus alternatives such as generate_sql, validate_sql, or execute_read_query. The conditional 'only if it is executable' is a behavioral condition, not a usage guideline.

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/1franky/data-analits-MCP'

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