Skip to main content
Glama

polish_diff

Read-onlyIdempotent

Review added UI-code lines and return a unified diff with deterministic DESIGN.md token substitutions. Apply the patch on top of the reviewed diff; judgment-heavy findings stay in manual.

Instructions

Review added UI-code lines and propose deterministic DESIGN.md token substitutions without writing files. The returned unified patch applies on top of the reviewed diff's post-image; applying it is an explicit, separate step by the caller. Re-verifies the hypothetical polished lines and leaves judgment-heavy findings in manual.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
diffYesUnified diff to review and polish (maximum 400KB).
projectNoProject directory used to resolve DESIGN.md and match decision scopes. Omit when design_md is supplied and no project hint is needed.
design_mdNoInline DESIGN.md content. Overrides project file lookup when supplied.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv2.2.9

TDQS

A4.4/5.0
Behavior5/5

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

Annotations already provide readOnlyHint=true and destructiveHint=false, but the description adds substantial detail beyond them: the returned artifact applies on top of the diff's post-image, applying is a separate caller responsibility, and judgment-heavy findings are deferred to manual. It also discloses determinism and internal re-verification behavior. No annotation contradiction.

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?

Three sentences, with the core purpose front-loaded in sentence one, followed by output semantics and verification behavior. Each sentence earns its place, though the second is dense and the third contains a minor grammatical issue ('a judgment-heavy findings'), keeping it from a 5.

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?

There is no output schema, so the description correctly carries the return contract: the tool yields a unified patch with explicit post-image semantics and a caller-side apply step. It covers the verification-behavior and the scope of the tool well enough for an agent to invoke it safely.

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 diff, project, and design_md already carry detailed structured descriptions. The tool description itself adds no extra parameter-level nuance beyond what the schema states. Baseline 3 applies because the schema does the heavy lifting.

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 uses specific verbs ('Review', 'propose') and a precise resource: added UI-code lines and deterministic DESIGN.md token substitutions. It clearly states what the tool does NOT do ('without writing files'), which implicitly distinguishes it from write-focused siblings like update_design_md. The purpose is unmistakable even without naming sibling tools.

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 description gives clear workflow context: the tool produces a unified patch that the caller must apply as a separate step, and it re-verifies the proposed lines. However, it never explicitly names an alternative (e.g., review_diff) or states when-not-to-use, so the exclusion guidance is implicit rather than spelled out.

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

Install Server

Other Tools