Skip to main content
Glama

Decode ad

decode_ad
DestructiveIdempotent

Decode a saved competitor ad into a reusable formula: hook, script, scenes, audio, call to action and style, plus a generation-ready recreation prompt. Requires a quote_id from estimate_ad_cost with kind "decode" (a flat price). Credits are charged only when the analysis succeeds; an ad decoded before returns its stored decode and charges nothing. SIGN-IN REQUIRED: connect this server with OAuth (the host prompts for it), or add an API key header "Authorization: Bearer acd_live_…" created at https://aicontentdrop.com/settings/integrations.

Input Schema

NameRequiredDescriptionDefault
ad_idYesA saved ad's id, from list_saved_ads or save_competitor_ad.
quote_idYesThe quote_id from estimate_ad_cost with kind "decode". Required.

Output Schema

NameRequiredDescriptionDefault
noteNoPresent only when the charge could not be applied to the account.
ad_idYes
cachedYesTrue when a stored decode was returned; nothing was charged.
decodeYesThe ad's formula, layer by layer, plus a generation-ready prompt.
replayedYesTrue when this quote_id had already been submitted and the original result was returned.
next_stepYes
credits_usedYesCredits charged: 0 for a stored decode or when the charge could not be applied (then note says so); null when the figure is not reported.
credits_quotedYesThe price fixed by the quote.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • removedOutput schema / properties / decode / properties / decodedAt
      Removed value: -{
      -  "type": "string"
      -}
    • changedOutput schema / properties / decode / required
      Previous value: -[
      -  "layers",
      -  "recreationPrompt",
      -  "confidence",
      -  "decodedAt"
      -]New value: +[
      +  "layers",
      +  "recreationPrompt",
      +  "confidence"
      +]
  2. Added

TDQS

A4.2/5.0
Behavior4/5

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

Adds substantial context beyond the annotations: a flat quoted price, credits charged only on success, cached results on repeat calls (consistent with idempotentHint), and full OAuth/API-key auth instructions with a key-creation URL. However, the destructiveHint=true and openWorldHint=true annotations are never addressed — the description doesn't say what, if anything, is mutated or removed, which leaves an agent-facing ambiguity for a tool nominally flagged destructive.

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 purpose and output contents, then billing/caching behavior, then the auth block — a sensible priority order. The auth sentence is dense and partially duplicative of what a host OAuth flow would surface, but it earns its place for API-key callers.

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?

Covers purpose, required inputs and their provenance, cost model, idempotency/caching, and authentication — all that an agent needs to invoke it correctly. Since an output schema exists, the description needn't detail return shapes, and the brief enumeration of decoded components is a bonus rather than a requirement.

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 coverage is 100%, so both parameters are already documented in-schema. The description largely restates the quote_id origin and adds only the 'flat price' characterization, which is marginal added meaning over the structured fields; baseline 3 is appropriate.

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 (decode) and resource (a saved competitor ad) plus the concrete artifacts produced: hook, script, scenes, audio, CTA, style, and a generation-ready recreation prompt. This clearly separates it from siblings like get_saved_ad (retrieval), estimate_ad_cost (pricing), and generate_ad (creation).

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?

Explains the prerequisite flow — a quote_id must come from estimate_ad_cost with kind "decode" — and states that a previously decoded ad returns its stored decode at no charge, which tells the agent when calling is cheap vs. billable. It does not explicitly say when to prefer get_saved_ad or ad_to_canvas_card instead, so it stops short of full alternative routing.

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.