Skip to main content
Glama

commit_context_patch

Applies a proposed ContextPatch as a new immutable Context version after revalidating its base, rejecting stale patches and preserving cited evidence for an atomic commit.

Instructions

Apply a proposed ContextPatch as a new Context version. The base version is revalidated first, so a patch whose base_context_version is no longer current is rejected; the commit is atomic and keeps the cited evidence. Call it only after reading the diff from propose_context_patch. Committed versions are immutable; read them with get_context_history.

Input Schema

NameRequiredDescriptionDefault
patch_idYesId returned by propose_context_patch, for example PATCH-0123abcd.
project_idYesRegistered project id, as returned by list_projects.

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv0.1.3
    • addedInput schema / properties / patch_id / description
      Added value: +"Id returned by propose_context_patch, for example PATCH-0123abcd."
    • addedInput schema / properties / project_id / description
      Added value: +"Registered project id, as returned by list_projects."
  2. First observedv0.1.0

TDQS

A4.7/5.0
Behavior5/5

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

Annotations only declare readOnly=false, destructive=false, openWorld=false. The description goes well beyond them, disclosing base-version revalidation, rejection semantics for stale bases, atomicity of the commit, evidence retention, and immutability of committed versions — precisely the failure modes an agent needs before mutating state.

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?

Front-loads the action, then layers precondition, failure mode, and follow-up path in a tight sequence with no redundant sentences. Every clause carries operational information.

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?

Given a simple two-parameter mutation with full schema coverage, annotations, and an output schema, the description supplies the remaining essentials: ordering with respect to propose_context_patch, atomicity, staleness rejection, and immutability. Nothing needed to invoke it correctly is missing.

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%, with both patch_id and project_id documented including the producing tool for each ID. The description adds no further parameter-level meaning (for instance, it never explains how base_context_version relates to the call, since that field is not a parameter here), so the baseline 3 applies.

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 ('Apply a proposed ContextPatch as a new Context version') and implicitly separates itself from the sibling that produces patches, propose_context_patch, and from the reader, get_context_history. An agent can identify the operation without opening 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?

Gives an explicit precondition ('Call it only after reading the diff from propose_context_patch') and an explicit route to the alternative for inspecting results ('read them with get_context_history'). The rejection condition for stale base versions is also named, so the agent knows when the call will fail.

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