Skip to main content
Glama
ruya-grp

fusion-query-mcp

by ruya-grp

fusion_validate_query

Read-onlyIdempotent

Validate free SQL against trusted ground truth to confirm query correctness. Supply expectations or a fixture, and get a full diff of every mismatch for targeted repair.

Instructions

Validate free SQL -- ONLY on a pod that substitutes lexical parameters.

Same engine as fusion_validate_report, pointed at a statement instead of a registered report. It therefore inherits fusion_run_query's limitation: on a pod with lexical substitution disabled the statement never reaches the database (SELECT * FROM (), ORA-00903), and the response hint says so. Use fusion_validate_report instead there -- validating a registered report's output is the path that works, and validation is the point of this server.

Where free SQL does run, this is what turns "the query ran" into "the query is correct". Supply the facts the user already trusts -- a total read off the Fusion UI, a known document number, an exported spreadsheet -- and every expectation is evaluated (never short-circuited) so one round trip tells you everything that is wrong.

Read the diff on failure; it is a repair signal, not just a verdict. A unique_key failure means join fan-out. An expected row that is absent means either the WHERE is too tight or Fusion row-level Data Security hides it from the service account -- add a broadened cross_check COUNT(*) to tell those apart before rewriting the query.

Two honest limits: a passing fixture proves consistency with the ground truth supplied, not universal correctness (use at least two independent expectation types); and results reflect what the single service account is allowed to see.

Args: sql: The SELECT statement to validate. expectations: Inline expectation objects. Mutually exclusive with fixture. fixture: Name of a saved fixture to validate against. datasource: Configured datasource key. max_rows: Row cap for the validation run; keep it above the expected count. timeout_s: Per-call timeout in seconds.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sqlYes
fixtureNo
max_rowsNo
timeout_sNo
datasourceNo
expectationsNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. First observedv0.1.0

TDQS

A5/5.0
Behavior5/5

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

Annotations already mark it read-only and non-destructive, and the description adds substantial behavior: the lexical-substitution failure mode with ORA-00903, all expectations always evaluated, diff interpretation, join fan-out, and row-level security visibility. It also discloses the limitation that passing only proves consistency with supplied ground truth.

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 dense but front-loaded, with the core purpose and key constraint in the first line. Each paragraph earns its place, and the final Args bullet list gives a scannable parameter reference without padding.

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, the description covers when to use it, failure modes, diagnostic interpretation, and limitations. An output schema exists for response details, so the description's focus on selection and interpretation is appropriately complete.

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

Parameters5/5

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

The input schema provides no property descriptions (0% coverage), but the Args section explains every parameter, including mutual exclusivity of expectations and fixture, the meaning of datasource as a configured key, max_rows as a cap above expected count, and timeout_s as per-call timeout. This fully compensates for the schema gap.

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 opens with a specific verb and resource, 'Validate free SQL', and immediately differentiates itself from fusion_validate_report ('same engine... pointed at a statement instead of a registered report'). It clearly establishes this tool validates ad hoc SQL rather than registered reports.

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?

It gives an explicit condition for use ('ONLY on a pod that substitutes lexical parameters') and names the alternative ('Use fusion_validate_report instead there'). It also explains when the tool applies ('Where free SQL does run') and how to distinguish failure modes.

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

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/ruya-grp/Fusion-MCP'

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