Skip to main content
Glama

validate_plan

Read-onlyIdempotent

Statically validates a multi-step geoprocessing plan before execution, checking operations, arguments, step references, file paths, output collisions, and CRS flow without running jobs.

Instructions

Statically validate a multi-step geoprocessing plan BEFORE running anything.

Write the plan as steps in execution order; each step has a unique id, an operation name from list_operations, and its arguments. Use "$step_id" as an argument value to consume the output dataset of an earlier step. Checks: operations exist and are installed, arguments complete and well-typed, references resolve backwards (mis-ordered steps are rejected), input files exist, outputs don't collide, and CRS flow is simulated end-to-end from the real input files. Returns machine-actionable errors/warnings/notes plus the simulated output CRS per step. Nothing is executed and nothing is written.

Example plan: {"goal": "wells at risk", "steps": [ {"id": "buf", "operation": "buffer_layer", "arguments": {"input_path": "wells.gpkg", "distance_meters": 300, "output_path": "buf.parquet"}}, {"id": "cut", "operation": "clip_layer", "arguments": {"input_path": "$buf", "mask_path": "zone.gpkg", "output_path": "risk.parquet"}}]}

Input Schema

NameRequiredDescriptionDefault
planYes

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv0.11.0
    • addedInput schema / $defs / OutputContract
      Added value: +{
      +  "additionalProperties": false,
      +  "description": "What a branch promises to return, independently of its operation name.",
      +  "properties": {
      +    "cardinality": {
      +      "default": "unknown",
      +      "enum": [
      +        "one",
      +        "fewer",
      +        "more",
      +        "same_as_input",
      +        "unknown"
      +      ],
      +      "title": "Cardinality",
      +      "type": "string"
      +    },
      +    "geometry": {
      +      "anyOf": [
      +        {
      +          "enum": [
      +            "point",
      +            "line",
      +            "polygon"
      +          ],
      +          "type": "string"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ],
      +      "default": null,
      +      "title": "Geometry"
      +    },
      +    "kind": {
      +      "enum": [
      +        "vector",
      +        "raster",
      +        "table",
      +        "number",
      +        "map",
      +        "description"
      +      ],
      +      "title": "Kind",
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "kind"
      +  ],
      +  "title": "OutputContract",
      +  "type": "object"
      +}
    • addedInput schema / $defs / PlanStep / properties / output
      Added value: +{
      +  "anyOf": [
      +    {
      +      "$ref": "#/$defs/OutputContract"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "Expected branch output: kind, optional geometry and cardinality"
      +}
  2. First observedv0.3.0

TDQS

A4.8/5.0
Behavior5/5

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

The description adds substantial behavioral detail beyond the readOnly and idempotent annotations: it lists the exact validations performed, notes backward-reference ordering enforcement, describes simulated CRS flow, and states that nothing is executed or written. It also discloses the return shape as machine-actionable errors, warnings, notes, and per-step output CRS.

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 front-loaded with the core action and safety boundary, then proceeds through plan format, validation checks, return behavior, and a compact example. Every section contributes useful information for correctly constructing a plan.

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?

For a complex, single-parameter validation tool, the description covers what the plan is, how to encode it, what is checked, what is returned, and what side effects do not occur. With an output schema present, the description does not need to duplicate full return structure.

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?

Although schema description coverage is reported as 0%, the single 'plan' parameter is thoroughly explained: step structure, unique ids, operation names from the catalog, argument passing, '$step_id' references, and a complete example plan. This removes ambiguity that the schema alone would not resolve.

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 states a specific verb and resource: statically validate a multi-step geoprocessing plan before execution. It clearly distinguishes this from execution-oriented siblings by emphasizing that nothing is executed or written.

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 gives strong usage context: validate before running anything, write steps in execution order, use operation names from list_operations, and reference earlier outputs with '$step_id'. It does not explicitly compare against siblings such as execute_plan or brief_plan, so it stops short of full alternative routing guidance.

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