Skip to main content
Glama

validate_plan

Checks a planning workspace before code is written by running modularity-delta and surprise analysis, plus architecture policy rules when present, to catch structural issues early.

Instructions

Validate a planning workspace before writing code. Always runs the Louvain modularity delta gate and surprise analysis. Unless skip_policy_rules is true, it also applies explicit .graphenium/policy.json rules when present.

Input Schema

NameRequiredDescriptionDefault
plan_idYesThe workspace plan identifier to validate.
skip_policy_rulesNoWhen true, skip explicit architecture policy rules and run only the Louvain modularity delta gate. Default false.
surprise_thresholdNoSurprise threshold used to flag structurally surprising planned edges (default 5.0).
modularity_toleranceNoMaximum allowed modularity drop for the delta gate (default -0.02).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changedv0.23.0
    • addedInput schema / properties / modularity_tolerance
      Added value: +{
      +  "description": "Maximum allowed modularity drop for the delta gate (default -0.02).",
      +  "format": "double",
      +  "type": "number"
      +}
    • changedInput schema / properties / plan_id / description
      Previous value: -"The workspace plan identifier to validate"New value: +"The workspace plan identifier to validate."
    • addedInput schema / properties / skip_policy_rules
      Added value: +{
      +  "description": "When true, skip explicit architecture policy rules and run only the Louvain modularity delta gate. Default false.",
      +  "type": "boolean"
      +}
    • addedInput schema / properties / surprise_threshold
      Added value: +{
      +  "description": "Surprise threshold used to flag structurally surprising planned edges (default 5.0).",
      +  "format": "double",
      +  "type": "number"
      +}
  2. First observedv0.1.0

TDQS

A3.7/5.0
Behavior3/5

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

With no annotations, the description carries the full burden, and it does disclose substantive internals: the Louvain modularity delta gate and surprise analysis always run, and policy rules are applied conditionally. However, it never says whether validation mutates workspace state or is a pure read, nor what happens on failure — the most important behavioral facts for a gate 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?

Three short sentences, zero filler, with the core action front-loaded and the conditional policy behavior placed last. Every sentence carries information.

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

Completeness3/5

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

For a validation gate with no output schema and no annotations, the description explains what checks run but not what the agent receives back (pass/fail, violation list, modularity numbers) or whether the workspace is modified. That leaves a meaningful gap for an agent deciding how to act on the result.

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 every parameter including defaults is already documented. The description adds only marginal meaning by naming the gates that modularity_tolerance and surprise_threshold feed into; it adds no syntax, ranges, or interaction details beyond the schema. Baseline 3 applies.

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?

States a specific verb and resource ('Validate a planning workspace') plus the lifecycle position ('before writing code'), which makes it distinguishable from graph-inspection siblings like get_architecture_summary or query_graph. It does not explicitly contrast itself with the closest sibling, verify_changes, so it stops short of a 5.

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 phrase 'before writing code' gives clear timing context for invocation, and the skip_policy_rules clause implies a lighter-weight mode. There is no explicit statement of when not to use it or which sibling to prefer for post-change verification.

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