Skip to main content
Glama

Gate an implementation plan

validate_plan
Read-onlyIdempotent

Validates implementation plans, designs, and specs before coding begins. Returns a binary verdict with findings on feasibility, performance, security, and completeness to catch flaws early.

Instructions

The gate for PLANS, designs and specs — run BEFORE any code is written, the cheapest place to catch a bad design. Returns the same binary verdict shape as validate_ai_output, with findings on completeness, feasibility, performance and scalability implications, security risks and missing considerations (e.g. it rejects a plan that polls an API every 100ms per client, with the request-volume math). Read-only: nothing is executed or stored beyond the verdict. Use validate_ai_output for the code that follows.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
planYesThe implementation plan, design or spec to validate, as plain text or markdown — e.g. a numbered migration plan or an architecture sketch.
contextNoOptional constraints the review should weigh, e.g. {"system": "payments API", "scale": "1M users", "constraints": "PostgreSQL only"}.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
scoreYesCombined score 0-100 (gates fused with the model review)
validYesThe binary verdict: true = approved, false = rejected
issuesYesSeverity-ranked findings, each 'severity|category|detail' with the reasoning
providerNoModel that ran the deep review, or 'protection-gates-only'
confidenceNoscore / 100
protectionNoDeterministic gate result. A veto here is final — the model review cannot override it.
suggestionsNoConcrete fixes to reach approval

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changedv1.8.6
    • changedInput schema / properties / context / description
      Previous value: -"Optional context (system, constraints, scale targets)"New value: +"Optional constraints the review should weigh, e.g. {\"system\": \"payments API\", \"scale\": \"1M users\", \"constraints\": \"PostgreSQL only\"}."
    • changedInput schema / properties / plan / description
      Previous value: -"The plan/design/spec to validate"New value: +"The implementation plan, design or spec to validate, as plain text or markdown — e.g. a numbered migration plan or an architecture sketch."
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "additionalProperties": true,
      +  "properties": {
      +    "confidence": {
      +      "description": "score / 100",
      +      "type": "number"
      +    },
      +    "issues": {
      +      "description": "Severity-ranked findings, each 'severity|category|detail' with the reasoning",
      +      "items": {
      +        "type": "string"
      +      },
      +      "type": "array"
      +    },
      +    "protection": {
      +      "additionalProperties": true,
      +      "description": "Deterministic gate result. A veto here is final — the model review cannot override it.",
      +      "properties": {
      +        "protection_score": {
      +          "description": "Deterministic gate score, 0-100",
      +          "type": "number"
      +        },
      +        "verdict": {
      +          "description": "'approved' or 'rejected' from the gate layer",
      +          "type": "string"
      +        },
      +        "vetoed": {
      +          "description": "True if any veto gate failed the submission",
      +          "type": "boolean"
      +        },
      +        "vetoed_by": {
      +          "description": "Names of the gates that vetoed, e.g. ['code_reality_gate']",
      +          "items": {
      +            "type": "string"
      +          },
      +          "type": "array"
      +        }
      +      },
      +      "type": "object"
      +    },
      +    "provider": {
      +      "description": "Model that ran the deep review, or 'protection-gates-only'",
      +      "type": "string"
      +    },
      +    "score": {
      +      "description": "Combined score 0-100 (gates fused with the model review)",
      +      "type": "number"
      +    },
      +    "suggestions": {
      +      "description": "Concrete fixes to reach approval",
      +      "items": {
      +        "type": "string"
      +      },
      +      "type": "array"
      +    },
      +    "valid": {
      +      "description": "The binary verdict: true = approved, false = rejected",
      +      "type": "boolean"
      +    }
      +  },
      +  "required": [
      +    "valid",
      +    "score",
      +    "issues"
      +  ],
      +  "type": "object"
      +}
  2. First observedv0.1.0

TDQS

A4.7/5.0
Behavior5/5

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

The description states 'Read-only: nothing is executed or stored beyond the verdict,' which adds concrete side-effect context beyond the annotations. It also describes the verdict shape and the categories of findings, such as security risks and request-volume feasibility checks. No contradiction with annotations; the description enriches them.

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 dense but every sentence earns its place: gate/timing, verdict shape and findings, read-only guarantee, and routing to the sibling tool. It is front-loaded with the most important decision guidance and contains no filler.

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?

Given the tool's moderate complexity, the description covers what it does, when to use it, what it returns, safety guarantees, and the key alternative. The output schema covers return-value structure, so nothing essential 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%, and the schema already explains the plan and context parameters with examples. The tool description does not substantially add parameter-level meaning beyond what the schema provides, so the baseline of 3 is appropriate.

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 verb and resource: validate PLANS, designs and specs. It positions itself as 'the gate' before code is written and distinguishes itself from validate_ai_output for the code that follows. An agent can select this tool confidently without opening the schema.

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

Usage Guidelines5/5

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

The description gives explicit timing guidance: run BEFORE any code is written. It also names the relevant alternative, 'Use validate_ai_output for the code that follows,' making the when-to-use and when-not-to-use boundary explicit.

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