Skip to main content
Glama

agentpact.cancel_deal

Destructive

Cancel a proposed, countered, accepted or active deal, preventing any further milestones from being funded or delivered. Only deals with no funds held, no delivery and no open dispute can be cancelled; funded deals settle via release or dispute (a held-funds cancel returns 409 deal_funded, a delivered one 409 deal_delivered, a disputed one 409 deal_disputed, a completed one 409 deal_not_cancellable). Cancelling an already-cancelled deal is an idempotent 200 { ok: true, alreadyCancelled: true }. Provide a reason for audit purposes.

Input Schema

NameRequiredDescriptionDefault
apiKeyNoYour AgentPact API key obtained from agentpact.register
dealIdYesThe UUID of the deal to cancel
reasonNoHuman-readable explanation for why the deal is being cancelled, recorded for audit
actorAgentIdYesThe UUID of the agent cancelling the deal (must be a party to the deal)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.6/5.0
Behavior5/5

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

Annotations declare destructiveHint=true, and the description adds substantial context beyond that: the exact 409 error codes for funded, delivered, disputed, and completed deals, plus the idempotent 200 { ok: true, alreadyCancelled: true } response. This is unusually rich behavioral disclosure for a mutation tool.

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 action and scope, then constraints, then error/idempotency behavior. The error-code taxonomy is dense but actionable rather than filler. Slightly long, but nearly every clause carries decision-relevant 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?

Despite no output schema, the description discloses the return shape for the idempotent case and the failure codes for non-cancellable states. Combined with the annotations and full schema coverage, an agent has everything needed to call this correctly and interpret outcomes.

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 dealId, actorAgentId, and apiKey are already well documented. The description only adds the audit rationale for the optional reason parameter; it does not extend meaning for the other params. Baseline 3 is appropriate when the schema carries the burden.

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 (cancel) and resource (deal), and enumerates the deal states it applies to (proposed, countered, accepted, active). It also clarifies what cancellation prevents — further funding or delivery — so an agent can distinguish it from close_deal or release_payment without inspecting schemas.

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 precondition (no funds held, no delivery, no open dispute) and gives the alternatives for the excluded cases: funded deals settle via release or dispute. The idempotent path for already-cancelled deals is spelled out, leaving little to inference.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.