Skip to main content
Glama

Check the plan against the data

validate_plan
Read-only

Checks the plan against the rows: is each key unique, non-null, how many references find no target (orphans). Requires workspace and source; keys, confirmed as in plan_backend. Returns JSON counts, no row values: failing checks in full, passing as totals. Read-only. create_backend does not run it. 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": "validate_plan"
  }
}

Input Schema

NameRequiredDescriptionDefault
keysNoPrimary keys replacing the inferred ones. Default: inferred. Example: {"order_items": ["order_id", "line_no"]}.
fixesNotrue: a fix per finding; applies nothing.
detailNo"summary" (default) or "full" (every check).summary
reviewNoWith fixes: a review_plan file.
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_*"].
profileNotrue adds per column of the checked tables: NULL share, distinct count, number min/max below/above zero; {"numbers": [lo, hi], "dates": [from, to]} states ranges. One query per table within max_items; never values. Default false.
sql_sumsNotrue also reads the SQL views' definitions (no rows) and lists views that SUM a header amount after joining its line table, and views it could not read. Default false.
confirmedNoRelationships the user confirmed, added to the plan. Default none. Example: [{"source": "orders", "source_cols": ["ship_to_id"], "target": "addresses", "target_cols": ["address_id"]}].
max_itemsNoCap on counting queries (one per key and relationship), 1–200. Default 60.
workspaceYesFabric workspace, name or id.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changed
    • addedInput schema / properties / fixes
      Added value: +{
      +  "default": false,
      +  "description": "true: a fix per finding; applies nothing.",
      +  "title": "Fixes",
      +  "type": "boolean"
      +}
    • addedInput schema / properties / review
      Added value: +{
      +  "anyOf": [
      +    {
      +      "additionalProperties": true,
      +      "type": "object"
      +    },
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "With fixes: a review_plan file.",
      +  "title": "Review"
      +}
    • addedInput schema / properties / tables
      Added value: +{
      +  "anyOf": [
      +    {
      +      "items": {
      +        "type": "string"
      +      },
      +      "type": "array"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "Table names or globs to show. Default all. Example: [\"sales_*\"].",
      +  "title": "Tables"
      +}
  2. Changed1 schema field changed
    • changedOutput schema / (root)
      Previous value: -{
      -  "properties": {
      -    "result": {
      -      "title": "Result",
      -      "type": "string"
      -    }
      -  },
      -  "required": [
      -    "result"
      -  ],
      -  "title": "validate_planOutput",
      -  "type": "object"
      -}New value: +null
  3. Changed2 schema fields changed
    • addedInput schema / properties / profile
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "boolean"
      +    },
      +    {
      +      "additionalProperties": true,
      +      "type": "object"
      +    }
      +  ],
      +  "default": false,
      +  "description": "true adds per column of the checked tables: NULL share, distinct count, number min/max below/above zero; {\"numbers\": [lo, hi], \"dates\": [from, to]} states ranges. One query per table within max_items; never values. Default false.",
      +  "title": "Profile"
      +}
    • addedInput schema / properties / sql_sums
      Added value: +{
      +  "default": false,
      +  "description": "true also reads the SQL views' definitions (no rows) and lists views that SUM a header amount after joining its line table, and views it could not read. Default false.",
      +  "title": "Sql Sums",
      +  "type": "boolean"
      +}
  4. Changed1 schema field changed
    • addedInput schema / properties / detail
      Added value: +{
      +  "default": "summary",
      +  "description": "\"summary\" (default) or \"full\" (every check).",
      +  "title": "Detail",
      +  "type": "string"
      +}
  5. Changed6 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 / keys / description
      Added value: +"Primary keys replacing the inferred ones. Default: inferred. Example: {\"order_items\": [\"order_id\", \"line_no\"]}."
    • addedInput schema / properties / max_items / description
      Added value: +"Cap on counting queries (one per key and relationship), 1–200. Default 60."
    • 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 / workspace / description
      Added value: +"Fabric workspace, name or id."
  6. First observed

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already declare readOnlyHint and destructiveHint=false, and the description reinforces this with 'Read-only'. It adds real value beyond the annotations: output shape ('JSON counts, no row values: failing checks in full, passing as totals') and an error envelope '{error, kind, hint}', which matters since there is no output schema.

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?

Purpose is front-loaded in the first clause and the remaining sentences each carry distinct information (requirements, output shape, safety, error format) with no filler. Some phrasing is over-compressed to the point of obscurity ('keys, confirmed as in plan_backend'), which costs a bit of clarity.

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?

For a 12-parameter tool with no output schema, the description covers what is needed: prerequisites, the checks run, that no row values are returned, the summary/full distinction, and the error format. What a 'plan' is and where it originates is only implied via the plan_backend reference.

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 coverage is 100%, so parameters are already documented in the schema; the description only cross-references where 'keys' and 'confirmed' come from (plan_backend), which is a small but genuine addition. It adds no meaning for the other ten parameters, so the baseline of 3 is correct.

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 names a specific verb and resource ('Checks the plan against the rows') and enumerates the actual checks performed: key uniqueness, non-null, and orphan reference counts. It also distinguishes itself from the nearest sibling by noting 'create_backend does not run it', so an agent knows validation is a separate step.

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?

It states prerequisites (workspace and source required) and clarifies the workflow relationship with plan_backend ('keys, confirmed as in plan_backend') and create_backend (which does not run it). It stops short of naming the alternative for acting on findings (review_plan / fixes), so the when-not guidance is implied rather than explicit.

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.