Skip to main content
Glama

cutbolt_session_apply

Idempotent

Commit an atomic editing batch against a project's expected revision. Any failure commits nothing; conflicts return REVISION_CONFLICT so you can re-read and retry safely.

Instructions

Commit an atomic editing batch against expected_revision. Reuse request_id only with identical arguments after a lost response. On REVISION_CONFLICT read and reconsider; returns a receipt with semantic changes.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
operationsYesEditing operations applied in order as one atomic batch; any failure commits nothing.
project_idYesID of a project saved in store_root.
request_idYesCaller-chosen ID for this change, 1-128 bytes, unique within the project. Resend identical arguments with it to retry safely.
store_rootNoExisting local directory holding the session database (projects.sqlite3)
expected_revisionYesHead revision this change was prepared against; a different head fails with REVISION_CONFLICT.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already declare idempotentHint=true, destructiveHint=false, and openWorldHint=false. The description adds important behavioral context beyond those: atomicity of the batch, the exact condition for safely reusing request_id, and the required response to REVISION_CONFLICT. It does not clarify how the 'receipt with semantic changes' behaves or warn about potentially destructive operations present in the schema, which keeps it from a 5.

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?

Three tightly written sentences with the core purpose front-loaded, followed by retry guidance, conflict handling, and return note. Every sentence earns its place and avoids repetition.

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 complex atomic batch tool with revision control and many possible operations, the description covers atomicity, idempotent retry, conflict behavior, and the return type. It omits details about the receipt contents and does not point to cutbolt_session_receipt for inspecting results, but the essential operational guidance is present.

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%, so the schema already documents all five parameters thoroughly. The description reinforces expected_revision and request_id semantics but does not add new syntax, format, or constraint details beyond what the schema provides. Baseline 3 is appropriate.

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 ('Commit') and resource ('atomic editing batch') with the key concurrency precondition ('against expected_revision'). This clearly differentiates it from siblings like cutbolt_session_get, cutbolt_session_undo, and cutbolt_session_receipt.

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?

Provides explicit retry guidance ('Reuse request_id only with identical arguments after a lost response') and conflict handling ('On REVISION_CONFLICT read and reconsider'). It does not name alternatives such as cutbolt_timeline_check or cutbolt_run, but the operational context for when and how to use this tool is clear.

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