Skip to main content
Glama

Place an ad

create_ad
Idempotent

Places an ad order. With an API key whose balance covers the price, it is paid from the balance. Otherwise the result is isError with the x402 PaymentRequired object for the exact price: sign it and call this tool again with the same order and the payment (in _meta["x402/payment"], or as payment_signature). Without an API key the paid result carries api_key, the key of the new account that owns the ad: store it, it is shown once. The ad goes to review; poll get_ad. (The ad of an account the network has marked as trusted is active in this answer.)

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "order": "<order>"
    },
    "name": "create_ad"
  }
}

Input Schema

NameRequiredDescriptionDefault
orderYes
api_keyNoThe API key of the account (can_live_...). Optional when this MCP connection sends it as the Authorization: Bearer header.
idempotency_keyNoOnly to REPEAT an earlier call of this tool (a lost answer, a payment still confirming): the idempotency_key that call returned. Leave it out for a new call; the server then makes a random one and returns it.
payment_signatureNoThe x402 PaymentPayload for the requirement an earlier call of this tool returned, as base64-encoded JSON (the value of an HTTP PAYMENT-SIGNATURE header). An x402-aware MCP client sends the payload in _meta["x402/payment"] instead and leaves this out.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • changedInput schema / properties / order / properties / pricing_model / enum
      Previous value: -[
      -  "CPC",
      -  "CPM"
      -]New value: +[
      +  "CPC",
      +  "CPM",
      +  "CPA",
      +  "REVSHARE",
      +  "CPA_REVSHARE"
      +]
    • changedInput schema / properties / order / properties / product / enum
      Previous value: -[
      -  "PTC",
      -  "Sponsored Listing",
      -  "Banner",
      -  "Native",
      -  "Paid Visits"
      -]New value: +[
      +  "PTC",
      +  "Sponsored Listing",
      +  "Banner",
      +  "Native",
      +  "Paid Visits",
      +  "Performance"
      +]
  2. First observed

TDQS

A4.8/5.0
Behavior5/5

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

Beyond the annotations (readOnlyHint=false, idempotentHint=true, openWorldHint=true), the description discloses the payment negotiation protocol, the exact retry contract, the one-time-disclosure of api_key, and the post-creation review state that makes the ad inactive until get_ad shows otherwise. These are consequential behaviors an agent cannot infer from the structured fields, and nothing contradicts the annotations.

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 action is front-loaded and every sentence carries operational payload, including the trailing parenthetical about trusted accounts skipping review. It is dense—long compound sentences with several inline parentheticals—so it costs some readability, but no sentence is expendable.

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 four-parameter nested-object creation tool with no output schema, this covers the hard parts: payment failure handling, credential issuance, idempotent retry, and the review lifecycle. It does not describe what the successful result otherwise contains (ad id, status fields) beyond implying get_ad is the follow-up, leaving a small gap for an agent parsing the response.

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

Parameters5/5

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

Schema coverage is 75%, and the description adds meaning the schema does not: that payment can arrive via _meta["x402/payment"] instead of payment_signature, that the retry must reuse the identical order, and that idempotency_key comes from a prior call's response rather than being invented. The api_key semantics relative to the Authorization header are also restated as an operational rule.

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 opening sentence names a specific verb and resource ("Places an ad order") and the rest of the definition scopes it against siblings: it creates the order, then routing to get_ad for review status, and the idempotency_key note separates a fresh call from a repeat call. An agent can distinguish this from quote_ad, update_ad, or buy_ad_credit without opening any schema.

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?

It spells out the conditional paths explicitly: with a funded API key the price is taken from balance; otherwise the call returns isError with an x402 PaymentRequired object that must be signed and passed back with the same order; without an API key the caller must store the returned api_key. It also states when to supply idempotency_key (only to repeat a lost answer or a still-confirming payment) and when to omit it, plus the follow-up action (poll get_ad).

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.

Resources