Skip to main content
Glama

amend_contract

Destructive

Amend a contract with an RFC 7396 merge patch to create the next version, applying consent rules and returning affected tasks and contract markdown.

Instructions

Amend a contract with an RFC 7396 merge patch (objects merge, arrays replace, null deletes) to produce v(N+1). Only its orchestrator may. A draft gets a new proposal; a frozen contract is amended in force: removed tasks are cancelled and the agents of affected tasks get a directive to re-read it. from_session (an archived replan or ultraplan) first replaces the structure with that session's roundtable-tasks block (pass patch: {}). id, version, status, consent, frozen, the scope's orchestrator, repository, base commit and parent, and the goal's original_prompt cannot change. Consent counts only for the version it was given on. A draft amendment needs every participant's consent again before a freeze: consent: true asks them all, and an objector who now agrees has the objection resolved by the amendment. On a frozen contract, a run-wide change (budget, scope, sandbox, authority, validation, workers, connectors, goal, dissents) needs consent: true (everyone is asked about it first, and it applies only if all agree) or override_consent: true (audited); other changes apply at once, and consent: true then asks the personas of affected tasks. patch: {} with consent: true just asks everyone without an agreement on the current version. Returns the affected tasks, the consent outcome and the contract markdown.

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": {
      "contract_id": "<contract_id>",
      "patch": "<patch>",
      "reason": "<reason>",
      "orchestrator": "<orchestrator>"
    },
    "name": "amend_contract"
  }
}

Input Schema

NameRequiredDescriptionDefault
modelNoModel id. Defaults: claude-sonnet-5-5 (anthropic), gpt-5.6-luna (openai), zai-org/GLM-5.3 (together), qwen/qwen3-235b-a22b-instruct-2507 (replicate), qwen3:14b (ollama), default (openai_compatible). Model aliases: "opus" (claude-opus-5-5), "sonnet" (claude-sonnet-5-5), "haiku" (claude-haiku-5-5). Replicate accepts owner/name, owner/name:version, or a https://replicate.com/owner/name URL.
patchYesRFC 7396 merge patch over the latest version, e.g. {"budget": {"usd": 40}} or {"tasks": [...the full new task list...]}.
reasonYesWhy the contract changes; recorded and sent to affected agents.
consentNoDefault false. True: ask participants about the new version: everyone for a draft or a run-wide change, the personas of affected tasks otherwise.
base_urlNoOnly with provider "openai_compatible": base URL of an OpenAI-compatible /v1 endpoint (e.g. http://localhost:1234/v1). Overrides OPENAI_COMPATIBLE_BASE_URL. OPENAI_COMPATIBLE_API_KEY, if set, is sent only to the OPENAI_COMPATIBLE_BASE_URL origin or one listed in ROUNDTABLE_OPENAI_COMPATIBLE_TRUSTED_ORIGINS; any other base URL gets no Authorization header and must be https (http only to loopback, or to private addresses with ROUNDTABLE_ALLOW_PRIVATE_BASE_URLS=1), never a cloud metadata or (without that setting) private address.
providerNoLLM provider. Default: anthropic. Options: anthropic, openai, together, replicate, ollama (local, when reachable), openai_compatible (set OPENAI_COMPATIBLE_BASE_URL or pass base_url).
contract_idYesThe contract id (ctr-<6 characters>-<n>) from propose_contract.
from_sessionNoId of an archived replan or ultraplan whose roundtable-tasks block replaces the tasks, commands and interfaces, or of an archived duel (duel-<id>): its winning decision and dissents are added to the contract (tasks untouched, repeats skipped; dissents are run-wide on a frozen contract).
orchestratorYesYour name as this contract's orchestrator (e.g. main). Only the orchestrator that proposed a contract can amend or freeze it.
override_consentNoFrozen contracts only, default false: apply a run-wide change (budget, scope, sandbox, authority, validation, workers, connectors, goal) without everyone's consent. Audited.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv2.0.0

TDQS

A4.8/5.0
Behavior5/5

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

Goes far beyond the annotations (destructive/openWorld/not-idempotent) by disclosing side effects: removed tasks are cancelled, affected agents receive a directive to re-read, run-wide changes block on unanimous consent while others apply immediately, override_consent is audited, and consent is version-scoped. It also enumerates the immutable fields (id, version, status, consent, frozen, orchestrator, repository, base commit, parent, original_prompt), which the annotations cannot convey.

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 the purpose and mechanism, and virtually every clause carries operational meaning. However, the prose is a dense wall of semicolon-chained rules without lists or line breaks, which makes the consent branches harder to parse than necessary.

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?

Despite a 10-parameter nested schema and no output schema, the description states what is returned (affected tasks, consent outcome, contract markdown), covers immutability constraints, and handles the draft/frozen split and the from_session special case. Nothing an agent needs 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.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so a baseline of 3 is warranted, but the description adds real meaning: merge-patch semantics (objects merge, arrays replace, null deletes), the distinction between a draft amendment and an in-force amendment, and how consent/override_consent interact with from_session and patch: {}. It does not explain model/provider/base_url, but those are peripheral to the core operation.

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 ("Amend a contract") plus the exact mechanism (RFC 7396 merge patch) and the outcome ("produce v(N+1)"). An agent can distinguish this from propose_contract and freeze_contract from the first sentence alone.

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 separates draft vs frozen behavior, states when to use from_session ("first replaces the structure with that session's roundtable-tasks block (pass patch: {})"), when consent: true is required vs when a change applies at once, and when override_consent applies. Alternatives and exclusion conditions are named, not implied.

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