Skip to main content
Glama
kewinall

Data Platform MCP Server

by kewinall

analyze_sql_lineage

Parse read-only SQL to identify referenced input tables and common table expressions, enabling data lineage tracking.

Instructions

Parse read-only SQL and extract referenced input tables and CTEs.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sqlYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.4.0

TDQS

A4.2/5.0
Behavior4/5

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

With no annotations provided, the description must disclose behavioral traits itself. The verb 'parse' clearly indicates a non-mutating, analytical operation, and 'read-only SQL' suggests the input is not executed. This conveys safety and purpose beyond the schema, though it does not detail error handling or dialect support, which is acceptable for a simple 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, front-loaded sentence with no filler. It states the purpose and the input constraint in a compact way, earning every word.

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

Completeness4/5

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

The tool has a single parameter and an output schema (not shown but noted in context), so the description need not explain return values. It covers the core functionality and the read-only constraint, leaving only minor gaps like error behavior or supported SQL dialects, which are not critical for a parsing tool.

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?

Schema description coverage is 0%, so the description must compensate. It adds a meaningful constraint by specifying 'read-only SQL', which informs the agent about acceptable input. However, it does not provide examples, dialect limitations, or format details, so it only partially compensates for the bare schema.

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 a specific action (parse) on a resource (read-only SQL) with a defined outcome (extract referenced input tables and CTEs). This is sufficiently distinct from siblings like get_table_lineage (which likely works on a catalog) and explain_sql (which explains query plans).

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

Usage Guidelines4/5

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

The description provides a clear context: use when you have a SQL string and need its input tables/CTEs. It implies a static analysis use case without explicitly naming alternatives or exclusions, but the 'read-only SQL' qualifier gives enough context for an agent to select it over catalog-based lineage tools.

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