Skip to main content
Glama
Coalesce-Software-Inc

coalesce-transform-mcp

Official

Parse SQL Structure

parse_sql_structure
Read-onlyIdempotent

Parses a SQL statement to extract CTEs, source tables, and projected columns for pipeline planning. Use this to inspect SQL decomposition before building a plan.

Instructions

Parse a SQL statement into its structural components without touching the workspace. Returns CTEs (if any), source table references (FROM/JOIN), and projected columns (SELECT list). Use this as the first step in a multi-step pipeline creation workflow to inspect the SQL decomposition before choosing node types or building a plan.

For CTE-based SQL, each CTE is returned with its columns (with transform detection), WHERE filters, source tables, structural flags (hasJoin, hasGroupBy), and inter-CTE dependency references.

For non-CTE SQL, returns the parsed source refs and SELECT items with column/expression classification.

This tool is pure parsing — no workspace reads, no node type selection, no mutations.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sqlYesThe SQL statement to parse. Pass it exactly as provided — do not rewrite or modify it.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
ctesNo
hasCtesNo
hasJoinNo
cteCountNo
guidanceNo
warningsNo
sourceRefsNo
selectItemsNo
sourceCountNo
selectItemCountNo
supportedSelectCountNo
unsupportedSelectCountNo
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint, and destructiveHint. The description adds valuable context about the tool being pure parsing, details return behavior for CTE vs non-CTE SQL, and reinforces no side effects.

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 front-loaded with the main purpose and structured into paragraphs for CTE and non-CTE cases. It is moderately concise but could integrate the final reinforcing sentence earlier.

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 presence of an output schema and rich annotations, the description provides sufficient context about return types and the tool's role in workflows. It covers both CTE and non-CTE cases adequately.

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?

Schema coverage is 100% with parameter `sql`. The description adds the important instruction to pass the SQL verbatim without rewriting, which goes beyond the schema's description.

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 tool parses SQL statements into structural components and distinguishes itself from sibling tools by emphasizing it's pure parsing without mutations or workspace access.

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 explicitly advises using this as the first step in a multi-step pipeline creation workflow and clarifies that it does not perform workspace reads, node selection, or mutations, guiding when to use or avoid it.

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/Coalesce-Software-Inc/coalesce-transform-mcp'

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