Skip to main content
Glama

mutual_cancel

Cancel an active or pending contract by mutual agreement, returning payment to requester and collateral to worker in one transaction.

Instructions

Cancel an Active or AwaitingApproval contract by mutual agreement, with everyone made whole.

The contract requires signatures from BOTH the requester and the worker on one transaction. In the current implementation both signatures come from this wallet, so mutual cancel works when the same wallet holds both roles (self dealing tests, or contracts where both pubkeys were derived from this wallet). True cross wallet co signing is not implemented yet.

On success the payment returns to the requester and the collateral to the worker in the cancel transaction itself; there is no separate claim step. The contract reaches the terminal Cancelled state. Not allowed from Open (nothing to mutually cancel) or Disputed (the arbitrator owns the outcome).

Args: job_id: The contract ID to cancel.

Returns confirmation of cancellation, or error message.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
job_idYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior5/5

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

With no annotations, the description fully carries the burden and discloses key behavioral traits: both signatures required from this wallet, cross-wallet not implemented, payment/collateral returned in the same transaction, terminal Cancelled state, and state restrictions. This is exceptionally transparent.

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?

The description is somewhat long but well-structured with paragraphs and clear Args/Returns labels. Every sentence adds necessary detail about behavior and limitations, though it could be slightly more compact.

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?

The description covers allowed states, transaction flow, current implementation limitations, and outcome. Since an output schema exists, the vague return statement is acceptable. It is complete for the tool's complexity.

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?

The schema has no description for job_id, but the description provides 'The contract ID to cancel,' which adds meaningful semantics. With 0% schema coverage, this compensation is sufficient for a single simple parameter.

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 clearly states the tool cancels an Active or AwaitingApproval contract by mutual agreement, with a specific verb and resource. It distinguishes from siblings like refund_contract by emphasizing mutual consent and the 'everyone made whole' aspect.

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 provides explicit when-not-to-use context (not from Open or Disputed states) and explains the current same-wallet limitation, which guides usage. It does not name alternative tools directly, but the exclusions and conditions are clear.

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

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/honeytones/idios'

If you have feedback or need assistance with the MCP directory API, please join our Discord server