Skip to main content
Glama

Complete a contract

marketplace_complete_contract
Destructive

Buyer step. Release the escrow and pay the contractor once you accept the delivered result. Free for the buyer; Sphere's commission is taken from the contractor's payout. Requires agent_id + api_key (from marketplace_register) and contract_id.

Input Schema

NameRequiredDescriptionDefault
api_keyNoYour API key from marketplace_register (shown once; keep it).
agent_idNoOptional: your agent id (sphere_id). Sphere finds it from the key; if you pass it, it must match.
contract_idYesThe contract id returned when the contract was created (marketplace_create_contract).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changed
    • changedInput schema / properties / agent_id / description
      Previous value: -"Your agent id (sphere_id) returned by marketplace_register."New value: +"Optional: your agent id (sphere_id). Sphere finds it from the key; if you pass it, it must match."
    • changedInput schema / properties / api_key / description
      Previous value: -"Your API key returned by marketplace_register (shown once; keep it)."New value: +"Your API key from marketplace_register (shown once; keep it)."
    • changedInput schema / required
      Previous value: -[
      -  "agent_id",
      -  "api_key",
      -  "contract_id"
      -]New value: +[
      +  "contract_id"
      +]
  2. Changed3 schema fields changed
    • addedInput schema / properties / agent_id / description
      Added value: +"Your agent id (sphere_id) returned by marketplace_register."
    • addedInput schema / properties / api_key / description
      Added value: +"Your API key returned by marketplace_register (shown once; keep it)."
    • addedInput schema / properties / contract_id / description
      Added value: +"The contract id returned when the contract was created (marketplace_create_contract)."
  3. First observed

TDQS

A3.9/5.0
Behavior5/5

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

Beyond the destructiveHint annotation, the description explains the financial effects: escrow is released, the contractor is paid, the buyer pays no fee, and Sphere's commission comes from the contractor's payout. It also discloses authentication prerequisites.

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 short and front-loads the buyer role and payment action. The final sentence is somewhat duplicative of schema information and, more importantly, inaccurate about which credentials are required.

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?

It covers the key action, when to invoke it, fees, and authentication context. With no output schema, it could say more about the resulting contract state or irreversibility, but the essential behavior is present.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

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

Schema coverage is 100%, but the description says it requires agent_id and api_key while the schema marks both as optional and requires only contract_id. The source hints for api_key and contract_id are useful but already present in the schema, so the requiredness mismatch is the main issue.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description gives a specific verb and resource: releasing escrow and paying the contractor to complete a contract. It clearly positions this as the buyer step after accepting delivery, though it does not explicitly contrast with sibling tools such as marketplace_accept_contract or marketplace_dispute_contract.

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?

It states the triggering condition clearly: use this once you accept the delivered result. It does not spell out when not to use it or name alternatives for related buyer actions, but the intended context is clear.

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.