Skip to main content
Glama

Analyse the schema as a graph (roles, centrality, areas, ambiguity)

analyze_schema
Read-only

Reads the plan as a graph: each table's role (fact, dimension, bridge, isolated), the most central tables, subject areas, cycles, table pairs with more than one path, and which relationships can be active together. Requires workspace and source. Returns JSON. Metadata only, no data queries; changes nothing. Errors: {error, kind, hint}.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "workspace": "<workspace>",
      "source": "<source>"
    },
    "name": "analyze_schema"
  }
}

Input Schema

NameRequiredDescriptionDefault
keysNoPrimary keys replacing the inferred ones. Default: inferred. Example: {"order_items": ["order_id", "line_no"]}.
detailNo"auto" (default: full up to 60 tables, else summary), "full" or "summary".auto
schemaNoSchema in the source. Default "dbo".dbo
sourceYesLakehouse, warehouse or SQL database, name or id.
tablesNoTable names or globs to show. Default all. Example: ["sales_*"].
confirmedNoRelationships the user confirmed, added to the plan. Default none. Example: [{"source": "orders", "source_cols": ["ship_to_id"], "target": "addresses", "target_cols": ["address_id"]}].
workspaceYesFabric workspace, name or id.

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed7 schema fields changed
    • addedInput schema / properties / confirmed / description
      Added value: +"Relationships the user confirmed, added to the plan. Default none. Example: [{\"source\": \"orders\", \"source_cols\": [\"ship_to_id\"], \"target\": \"addresses\", \"target_cols\": [\"address_id\"]}]."
    • addedInput schema / properties / detail / description
      Added value: +"\"auto\" (default: full up to 60 tables, else summary), \"full\" or \"summary\"."
    • addedInput schema / properties / keys / description
      Added value: +"Primary keys replacing the inferred ones. Default: inferred. Example: {\"order_items\": [\"order_id\", \"line_no\"]}."
    • addedInput schema / properties / schema / description
      Added value: +"Schema in the source. Default \"dbo\"."
    • addedInput schema / properties / source / description
      Added value: +"Lakehouse, warehouse or SQL database, name or id."
    • addedInput schema / properties / tables / description
      Added value: +"Table names or globs to show. Default all. Example: [\"sales_*\"]."
    • addedInput schema / properties / workspace / description
      Added value: +"Fabric workspace, name or id."
  2. First observed

TDQS

A3.7/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true and destructiveHint=false, so 'changes nothing' is partly redundant, but the description adds real value beyond them: it discloses that no data queries are issued (only metadata is read) and documents the error envelope {error, kind, hint}. It does not discuss cost/latency on large schemas, which is the remaining gap.

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?

Roughly four sentences, front-loaded with the output contents and ending with preconditions and the error shape. The middle is a dense enumeration of outputs, which is efficient, though the fragment style ('Requires workspace and source. Returns JSON.') reads as compressed notes rather than prose.

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?

An output schema exists, so the return values need not be spelled out, and the description nonetheless names the key sections an agent will find. Combined with preconditions, non-mutating behavior, and the error contract, an agent has enough to invoke it correctly; only the alternative-tool routing is missing.

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 100%, so all seven parameters (keys, detail, schema, source, tables, confirmed, workspace) are already documented with defaults and examples. The description only restates that workspace and source are required, adding nothing the schema does not already carry.

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?

Opens with a specific verb+resource ('Reads the plan as a graph') and enumerates the concrete artifacts produced: table roles (fact, dimension, bridge, isolated), centrality, subject areas, cycles, multi-path pairs, and relationship co-activity. That is far more specific than the sibling names (lineage, join_path, suggest_relationships) would suggest, though it never names a sibling to contrast against.

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

Usage Guidelines3/5

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

'Requires workspace and source' gives a precondition, and 'Metadata only, no data queries' implies an exploration/analysis use case. But there is no explicit when-to-use versus lineage, join_path, or suggest_relationships, and no stated situation in which an agent should pick this instead.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.