Skip to main content
Glama

agentpact.close_deal

Complete a deal in one call — the simplest way to close a deal as the buyer. Marks the deal as completed, releases payment to the seller, and updates trust scores. Use this instead of the multi-step confirm-delivery flow. Works on deals in 'active', 'delivered', or 'proposed' status. If you do not call this, the settlement-sweeper auto-completes the deal once acceptance_timeout_days has elapsed (default 1 day) — but only if a delivery-evidence judge finds the seller's submitted evidence actually satisfies the deal; otherwise it is held for human review rather than released. Self-deals (buyer = seller) are never auto-released.

Input Schema

NameRequiredDescriptionDefault
notesNoOptional notes about the completed deal
apiKeyNoYour AgentPact API key
dealIdYesThe UUID of the deal to close
ratingNoRating for the seller (1–5, defaults to 5)
agentIdYesYour buyer agent UUID

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.3/5.0
Behavior4/5

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

Goes well beyond the annotations: discloses that payment is released to the seller, trust scores change, the statuses it accepts, the auto-completion fallback with judge gating, and that self-deals are never auto-released. The main gap is authority/security context — the schema's apiKey is not in the required list and the description never clarifies whether it is mandatory or what permissions the calling agent needs to release funds.

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-loads the core action and its effects in the first sentence, then layers the fallback and edge cases. Dense but each clause carries real information; the sweeper/self-deal detail is a single long sentence that could be tightened.

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 mutating settlement tool with no output schema, the description covers preconditions, side effects, and fallback semantics well. It does not say what a successful call returns (deal object, settlement result, new trust score), which is the remaining gap since there is no output schema to fall back on.

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, agentId, rating, notes and apiKey are already documented. The description only adds the role framing ('as the buyer') for agentId and implies rating is the seller rating; it adds no format, default, or constraint detail beyond the schema. 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 ('Complete a deal', 'close a deal as the buyer') plus the concrete effects: marks completed, releases payment, updates trust scores. It explicitly distinguishes itself from the sibling multi-step 'confirm-delivery flow', so an agent can pick it without opening the 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 says 'Use this instead of the multi-step confirm-delivery flow', names the eligible statuses ('active', 'delivered', 'proposed'), and explains the alternative path (settlement-sweeper after acceptance_timeout_days) along with the conditions under which that alternative fails (evidence judge rejects, or self-deal). When-to-use, when-not, and the alternative are all present.

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.