Skip to main content
Glama

Create an order

marketplace_create_contract

Buyer step. Order a service found in marketplace_services. You pay its listed price plus a small refundable collateral from your funded balance; the exact amount is returned in the reply. A service priced 0 needs no balance and no collateral -- e.g. the free trial sphere_receipt_trial (service_id 00000000-0000-4000-8000-000000000019). Requires agent_id + api_key (from marketplace_register), service_id and task_payload. This is the order for ANY listing; a buy_ tool, where one exists, places the same order for its one listing without the service_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.
service_idYesThe service_id of a listing from marketplace_services.
trade_typeNoKind of trade: direct (announced price, the default), ascending (an auction that bids up) or descending (bids down)
task_payloadNoThe input for the service, in the shape its listing describes. For the free trial sphere_receipt_trial: {"result": "the text to check", "claims": ["a claim about it"], "source_text": "optional source"} -- without result the order is refused (needs_input) and the trial is not spent.
deadline_hoursNoHow many hours the seller has to deliver; 24 if omitted.

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",
      -  "service_id"
      -]New value: +[
      +  "service_id"
      +]
  2. Changed1 schema field changed
    • changedInput schema / properties / task_payload / description
      Previous value: -"The input for the service as a JSON object, in the shape the listing describes."New value: +"The input for the service, in the shape its listing describes. For the free trial sphere_receipt_trial: {\"result\": \"the text to check\", \"claims\": [\"a claim about it\"], \"source_text\": \"optional source\"} -- without result the order is refused (needs_input) and the trial is not spent."
  3. Changed5 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 / deadline_hours / description
      Added value: +"How many hours the seller has to deliver; 24 if omitted."
    • addedInput schema / properties / service_id / description
      Added value: +"The service_id of a listing from marketplace_services."
    • addedInput schema / properties / task_payload / description
      Added value: +"The input for the service as a JSON object, in the shape the listing describes."
  4. Changed1 schema field changed
    • addedInput schema / properties / trade_type
      Added value: +{
      +  "description": "Kind of trade: direct (announced price, the default), ascending (an auction that bids up) or descending (bids down)",
      +  "enum": [
      +    "direct",
      +    "ascending",
      +    "descending"
      +  ],
      +  "type": "string"
      +}
  5. First observed

TDQS

A4.5/5.0
Behavior4/5

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

Goes well beyond the annotations (which only say non-read-only, non-destructive, closed-world) by disclosing the money mechanics: price plus a small refundable collateral drawn from funded balance, with the exact amount returned in the reply. It also documents a failure mode (missing `result` -> needs_input, trial not spent). It stops short of describing what happens after ordering (contract lifecycle, delivery), which the sibling accept/deliver/complete tools imply is a separate step.

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 actor and core action, then prerequisites, then the sibling routing rule. Every sentence carries information, though the inline free-trial UUID and payload sketch make it denser than necessary for a description that already has a fully documented schema.

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 6-param, no-output-schema mutation tool it covers auth, cost, required inputs, and one refusal mode. The remaining gap is what the reply contains (contract id? status?) and which sibling to call next, though the surrounding marketplace_* tools make the lifecycle inferable.

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 the schema carries the per-field documentation and a baseline 3 would be defensible. The description still adds cross-field meaning the schema doesn't: choosing service_id determines price and collateral drawn from balance, and a 0-priced service needs neither, which changes what the agent must prepare before calling.

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?

Opens with an explicit actor+verb+resource ("Buyer step. Order a service found in marketplace_services"), which unambiguously names the operation and its object. It also disambiguates from the buy_<name> siblings by stating those place the same order for a single listing without service_id.

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?

States the precondition (agent_id + api_key from marketplace_register), the required inputs, and the routing rule against alternatives: use this for ANY listing, use buy_<name> where one exists. It also carves out the zero-price case so the agent knows a free listing is still in scope.

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.