Skip to main content
Glama

simulate_repository_patch

Simulate an in-flight unified diff against a persisted snapshot to verify a working-tree patch mid-run, returning the gated decision envelope with the apply gate verdict—no stored decision plan required.

Instructions

Simulate the risk of an in-flight unified diff against one persisted snapshot and return the canonical repository envelope — without creating a stored decision plan. Use this to verify a working-tree patch mid-run; use simulate_repository when a stored DecisionPlan already exists. Deterministic; no LLM is involved. Returns the gated DecisionEnvelope including the apply gate verdict.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
confidenceNoOptional caller confidence recorded with the simulation.
patch_diffYesUnified diff of the in-flight patch to evaluate.
snapshot_idYesSnapshot id from create_repository_snapshot.
repository_idYesSaved repository connector id from list_connectors.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changedv0.1.3
    • addedInput schema / properties / confidence / description
      Added value: +"Optional caller confidence recorded with the simulation."
    • addedInput schema / properties / patch_diff / description
      Added value: +"Unified diff of the in-flight patch to evaluate."
    • addedInput schema / properties / repository_id / description
      Added value: +"Saved repository connector id from list_connectors."
    • addedInput schema / properties / snapshot_id / description
      Added value: +"Snapshot id from create_repository_snapshot."
  2. First observedv0.1.0

TDQS

A4.3/5.0
Behavior4/5

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

Since all annotations are false and provide little safety coverage, the description carries the burden. It adds meaningful behavioral context: no stored decision plan is created, execution is deterministic and LLM-free, and the result is the gated DecisionEnvelope with the apply gate verdict. It stops short of disclosing possible audit/billing side effects, but the simulation framing and explicit no-persistence guarantee are substantial.

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?

The three sentences front-load the core function and each clause contributes useful information. There is minor redundancy between 'canonical repository envelope' and 'gated DecisionEnvelope', but the description is still tight and appropriately sized.

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 4-parameter tool with no output schema and neutral annotations, the description provides the operational trigger, the no-persistence guarantee, determinism, and the return shape. It is largely complete, though terms like 'canonical repository envelope' assume some domain familiarity.

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?

The schema already describes all four parameters at 100% coverage, so the baseline applies. The description reinforces that patch_diff is an 'in-flight unified diff' and snapshot is 'persisted', but it does not add meaningful parameter-level semantics beyond the schema.

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 the exact operation — simulate the risk of an in-flight unified diff against one persisted snapshot — and explicitly contrasts it with the closely named sibling simulate_repository by noting no stored decision plan is created. This makes the tool distinguishable without opening schemas.

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?

It gives an explicit usage directive: verify a working-tree patch mid-run. It also names the alternative and the condition that selects it: use simulate_repository when a stored DecisionPlan already exists.

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