Skip to main content
Glama

request_source_patch_dev

Propose a DEV-only literal source patch for review in the local Owner GUI: show full content and diff, verify the SHA-256, and replace one exact anchor only after approval.

Instructions

DEV_ONLY cooperative literal source patch: reuse preview_source_patch, show the complete proposed content and diff to local Owner GUI, then recheck SHA before replacement. One exact anchor only; no fuzzy edit, job spawn or protected Broker acceptance. Never retry an UNKNOWN result.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "path": "<path>",
      "old_text": "<old_text>",
      "new_text": "<new_text>",
      "expected_sha256": "<expected_sha256>"
    },
    "name": "request_source_patch_dev"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathYesAbsolute existing source file within configured Owner roots; DEV_ONLY, never a protected Broker permission.
new_textYesLiteral replacement up to 4096 UTF-8 bytes; may contain secrets. Full proposed source is shown to local Owner before writing.
old_textYesExact literal anchor, one occurrence only, up to 4096 UTF-8 bytes; may contain secrets, avoid submitting them.
expected_sha256YesRequired lowercase SHA-256 of inspected current source; reverified after Owner review and immediately before replacement.

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.2

TDQS

A4.5/5.0
Behavior5/5

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

With no annotations supplied, the description carries the full burden and does so: it discloses the DEV_ONLY gating, the Owner-GUI review step, the SHA recheck immediately before replacement, single-anchor-only matching, and the no-retry-on-UNKNOWN rule. These are behaviorally significant constraints an agent could not infer from the signature alone.

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?

Two short sentences, front-loaded with the DEV_ONLY scoping and the required preview step, with constraints clustered in the second sentence. Dense jargon ('cooperative', 'Broker acceptance') costs a little readability but no sentence is filler.

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 four-parameter mutation tool with no annotations, the description plus full schema coverage and an output schema covers what an agent needs: scope, precondition, review step, and failure-retry policy. Residual gaps are minor, such as what a failed SHA mismatch returns and whether partial writes are possible.

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 coverage is 100%, so the baseline is 3; the description still adds meaning by tying 'one exact anchor only' to old_text and iterating that the SHA is rechecked after Owner review, which clarifies the sequencing rather than just restating types. Marginal but real value over 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?

States a specific verb and resource ('literal source patch' on a source file) plus its DEV_ONLY scope, and explicitly names the sibling (preview_source_patch) it builds on. An agent can distinguish this from create_file, preview_source_create, or a generic run_command without opening any schema.

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?

Gives an explicit prerequisite ('reuse preview_source_patch'), exclusion conditions ('no fuzzy edit, job spawn or protected Broker acceptance'), and a retry rule ('Never retry an UNKNOWN result'). It stops short of naming when to prefer preview_source_create or create_file instead, so the alternative-routing is not fully closed.

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