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.

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. First observed

TDQS

A4.3/5.0
Behavior5/5

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

Goes well past the annotations: annotations only say not read-only, idempotent, open-world. The description discloses the payment branch, that failure returns isError with an x402 PaymentRequired object containing the exact price, that an anonymous call mints an account and returns api_key exactly once, and that the ad then enters review. It even explains the intended meaning of idempotentHint (only for replaying a lost call).

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, then the two payment branches, then the account-key consequence, then the post-call step. Dense but no filler sentences. A few clauses are compressed to the point of awkwardness ("the result is isError with the x402 PaymentRequired object"), which costs it a point.

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?

No output schema exists, yet the description covers the meaningful return shapes an agent must handle: the paid-success path with a one-time api_key, the isError PaymentRequired path with a signable object, and the review state. For a mutating, money-moving, account-creating tool this is complete enough to call correctly on the first try.

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 75%, so the baseline is 3, but the description adds cross-parameter semantics the schema does not: payment can arrive via _meta["x402/payment"] or payment_signature, the retry must reuse the same order, and idempotency_key belongs only on a repeat call. The nested order object's fields are largely left to the schema, which keeps this from a 5.

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?

Opens with a specific verb and resource ("Places an ad order") and the schema confirms the resource is an ad order object. What is missing is a contrast against adjacent siblings such as quote_ad or buy_ad_credit, so an agent has no in-description signal for why it would pick this tool over a quoting step.

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?

Gives clear conditional guidance: paid from balance when the key covers the price, otherwise sign the x402 PaymentRequired object and re-call with the same order plus payment. It also tells the agent to poll get_ad afterward and to omit idempotency_key for a new call. It stops short of naming when NOT to use it or pointing at quote_ad/list_ad_formats as prerequisite paths.

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