Skip to main content
Glama

decode_ad

Idempotent

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

TableJSON 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

TableJSON 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. Added

TDQS

A4.6/5.0
Behavior5/5

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

Adds substantial context beyond annotations: credits are charged only on success, a previously decoded ad returns its stored result at no cost (consistent with idempotentHint), and it spells out two concrete authentication paths (OAuth or an Authorization bearer key). This is exactly the billing, idempotency, and auth detail an agent needs to call it safely.

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, then pricing, then auth in a logical order; every sentence carries operational weight. The sign-in block is slightly verbose boilerplate but is genuinely actionable, keeping it from a full 5.

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?

With an output schema present there is no need to describe return values, and the description covers the remaining critical gaps: prerequisites, billing behavior, idempotency, and authentication. Nothing an agent needs to invoke this tool correctly is missing.

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 baseline is 3; the description adds value by clarifying that quote_id must be a kind 'decode' flat-price quote from estimate_ad_cost, tying the parameter to a specific upstream tool. It does not add syntax detail for ad_id beyond the schema, so it is not a full 5.

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') and enumerates the concrete outputs (hook, script, scenes, audio, CTA, style, recreation prompt). An agent can distinguish this from siblings like save_competitor_ad and get_saved_ad without opening the schema.

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?

Explicitly gates usage on a quote_id from estimate_ad_cost with kind 'decode', establishing the prerequisite workflow step. It does not name when-not-to-use or a sibling alternative, so it stops short of a 5, but the triggering condition 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.