Skip to main content
Glama

Pre-action gatekeeper check

pre_action_check
Read-onlyIdempotent

Verify a code change is justified by providing an executable reproduction of the problem before editing files. Blocks modifications unless evidence demonstrates the task is unsolved.

Instructions

Gatekeeper check. Call this BEFORE modifying any code. It verifies whether the change is justified by evidence and whether the task is already solved. If not justified, the agent MUST NOT edit files. Supply an executable reproduction under reproduction (a bare command plus args, never a shell string): free-text evidenceOfProblem alone is never enough to obtain an "allow".

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
runTestsNoRun the project test suite as extra evidence. Default false.
reproductionNoAn executable command that reproduces the problem.
affectedFilesNoFiles the agent intends to modify.
proposedChangeYesThe diff, or a natural-language description, of the proposed change.
taskDescriptionYesWhat the agent is trying to accomplish.
evidenceOfProblemNoFree-text proof that a problem exists. Not executable on its own; supply `reproduction` to obtain an allow decision.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
stateYesWhat the state inspection stage found.
reasonYesOne or two sentences explaining the verdict.
decisionYesThe verdict for the proposed change.
evidenceYesWhat the reproduction stage found.
nextStepsYesOrdered, actionable instructions.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.0.1

TDQS

A4.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. The description adds valuable behavioral context: the tool acts as a gate that can block edits, verifies task completion, and mandates a specific reproduction format. It does not explicitly state the return decision structure, but the output schema likely covers that, and the 'allow' requirement implies it.

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 concise—four sentences that front-load the main purpose and then detail the critical constraint. Every sentence earns its place: the gatekeeper role, the requirement to call before editing, the reproduction format, and the rule about evidence. No filler or redundancy.

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 (6 params, nested object, output schema), the description fully covers the essential usage: when to call, what to supply, and the decision rule. The output schema covers return values, so no additional return explanation is needed. The description is complete for an agent to correctly invoke the tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, baseline is 3. The description enriches parameter understanding beyond the schema by specifying that `command` must be a bare executable, `args` must not be embedded in `command`, and that `evidenceOfProblem` alone is insufficient without `reproduction`. This adds practical usage meaning to the parameters.

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 ('verify'), the resource (whether a change is justified and task already solved), and context (before modifying code). It clearly distinguishes the tool's role as a gatekeeper without ambiguity, and no siblings exist to confuse.

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?

Explicitly instructs 'Call this BEFORE modifying any code' and sets a hard rule: a reproduction is required to obtain an 'allow', and free-text evidence alone is insufficient. This gives clear when-to-use and what-to-provide guidance, with no alternative tools to compare.

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

Deploy Server

Other Tools