Skip to main content
Glama

Transaction Preview

transaction-preview
Read-onlyIdempotent

Inspect staged transaction changes against the captured baseline before committing, returning state, changed documents, mutation provenance, and optional per-document diffs.

Instructions

Inspects the active transaction against its captured baseline before committing, returning transaction state, changed documents and mutation provenance. Available in mutation modes that do not require a review receipt; approval-required mode exposes transaction-review instead. includeDiff defaults to false; set it to true and supply document for a detailed diff of that document, with contextLines defaulting to 3 unchanged lines per hunk. The document selector controls the detailed diff, not the overall changed-document summary. This read-only preview does not authorise or persist changes. Inspect it, then use transaction-commit to write the staged changes or transaction-rollback to discard them.

Input Schema

NameRequiredDescriptionDefault
documentNoDocument whose detailed diff should be returned; provide it when includeDiff is true.
workspaceNoProvide workspaceId, alias, path, or any combination.
includeDiffNoWhether to include a detailed diff.
contextLinesNoNumber of unchanged context lines around each diff hunk when includeDiff is true.

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv1.0.6

TDQS

A4.8/5.0
Behavior5/5

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

Annotations already declare readOnly/idempotent/non-destructive, and the description adds context beyond them: mode-gated availability, the fact that it neither authorises nor persists changes, and the defaults for includeDiff and contextLines. It also explains what is returned, which is useful context even though an output schema exists.

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?

Front-loaded with purpose and return contents, then mode gating, then parameter behaviour, then workflow routing. Dense but nearly every sentence carries information; the one slightly redundant line is 'This read-only preview does not authorise or persist changes', which partly restates readOnlyHint.

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?

For a workflow-stage tool with sibling alternatives and mode gating, the description covers availability conditions, output contents, parameter coupling, safety semantics, and next steps. With an output schema present, nothing further is needed for correct invocation.

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, but the description adds a genuinely clarifying rule not in the schema: 'the document selector controls the detailed diff, not the overall changed-document summary', plus the coupling of includeDiff=true with supplying document. It repeats the documented defaults, which earns no extra credit.

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 ('Inspects the active transaction against its captured baseline') plus the return contents (transaction state, changed documents, mutation provenance). This clearly separates it from transaction-commit, transaction-rollback and transaction-review without needing 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?

Explicitly states the mode condition under which it applies ('mutation modes that do not require a review receipt') and names the alternative that takes over in approval-required mode (transaction-review). It also gives the follow-up path: inspect, then transaction-commit to write or transaction-rollback to discard.

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