Skip to main content
Glama

Analyse a reference ad

analyze_reference
Idempotent

Analyze an MP4, Instagram, or TikTok reference ad to extract beats, graphics, captions, pacing, and a timed transcript; use data mode for insights only.

Instructions

Input: the same fields as quote_analysis. Read a reference ad into a reference_profile (beats, graphics, captions, pacing, timed transcript); mode "data" answers only the data. Pass asset_id of an MP4 asset, at most 120 s and 100 MiB, or source_url of an Instagram reel or post or a TikTok video. A YouTube link is refused: upload its MP4 with create_asset. Charged once it succeeds; a failed analysis costs nothing. 10 new full and 60 new data analyses per hour. The same asset or full link in the same mode answers the same analysis free unless it failed; one made before frames and speakers existed is redone free once. Poll get_reference_analysis with wait_seconds: 50. Price: 70 credits per call; data mode: 10 credits per call. Quote first with quote_analysis.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "analyze_reference"
  }
}

Input Schema

NameRequiredDescriptionDefault
modeNo
asset_idNo
source_urlNo
max_creditsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv0.73.0
    • removedInput schema / properties / source_url / format
      Removed value: -"starts_with"
    • addedInput schema / properties / source_url / pattern
      Added value: +"^https:\\/\\/.*"
  2. Changed1 schema field changedv0.61.0
    • addedInput schema / properties / max_credits
      Added value: +{
      +  "type": "integer"
      +}
  3. Changed8 schema fields changedv0.39.0
    • removedInput schema / $schema
      Removed value: -"http://json-schema.org/draft-07/schema#"
    • removedInput schema / properties / asset_id / description
      Removed value: -"asset_id of an MP4 asset of this account, at most 120 s and 100 MiB"
    • removedInput schema / properties / asset_id / pattern
      Removed value: -"^ast_[a-f0-9]{32}$"
    • removedInput schema / properties / mode / description
      Removed value: -"full (default, 70 credits): the reference_profile. data (10 credits): duration, size, timed transcript, hook and a 3×3 frame sheet, without the vision pass"
    • removedInput schema / properties / mode / enum
      Removed value: -[
      -  "full",
      -  "data"
      -]
    • removedInput schema / properties / source_url / description
      Removed value: -"instead of asset_id: an Instagram reel or post link (instagram.com/reel/<code>, /reels/<code>, /p/<code>) or a TikTok video link (tiktok.com/@<user>/video/<id>, vm.tiktok.com/<code>); YouTube is refused"
    • removedInput schema / properties / source_url / maxLength
      Removed value: -2048
    • removedInput schema / properties / source_url / pattern
      Removed value: -"^https:\\/\\/.*"
  4. Changed3 schema fields changedv0.36.0
    • addedInput schema / properties / mode
      Added value: +{
      +  "description": "full (default, 70 credits): the reference_profile. data (10 credits): duration, size, timed transcript, hook and a 3×3 frame sheet, without the vision pass",
      +  "enum": [
      +    "full",
      +    "data"
      +  ],
      +  "type": "string"
      +}
    • addedInput schema / properties / source_url
      Added value: +{
      +  "description": "instead of asset_id: an Instagram reel or post link (instagram.com/reel/<code>, /reels/<code>, /p/<code>) or a TikTok video link (tiktok.com/@<user>/video/<id>, vm.tiktok.com/<code>); YouTube is refused",
      +  "format": "starts_with",
      +  "maxLength": 2048,
      +  "pattern": "^https:\\/\\/.*",
      +  "type": "string"
      +}
    • removedInput schema / required
      Removed value: -[
      -  "asset_id"
      -]
  5. Addedv0.35.0

TDQS

A4.7/5.0
Behavior5/5

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

Goes far beyond the annotations by disclosing billing semantics ('Charged once it succeeds; a failed analysis costs nothing'), concrete pricing (70 credits full, 10 credits data), rate limits (10 new full and 60 new data analyses per hour), and caching/dedup rules including the free redo for analyses made before frames and speakers existed. The stated dedup behavior is consistent with idempotentHint=true, and the credit charge is consistent with readOnlyHint=false, so nothing conflicts.

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?

Dense and front-loaded with the core purpose and constraints, with essentially every clause carrying operational value (limits, cost, rate limits, alternatives). It is a single run-on block with no structural separation between purpose, inputs, and cost, and the opener 'the same fields as quote_analysis' is an indirect cross-reference that adds little given the fields are enumerated elsewhere.

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 an async, credit-charging analysis tool with no output schema, the description covers cost, failure handling, rate limits, input constraints, dedup, and the polling handoff — everything needed to invoke it safely. The remaining gaps are the unexplained max_credits parameter and any hint about when results become available beyond polling with a 50 s wait.

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?

With 0% schema description coverage, the description carries the burden and does so for three of four parameters: it defines mode via the 'data' variant, bounds asset_id (MP4, ≤120 s, ≤100 MiB), and constrains source_url to Instagram reel/post or TikTok video. max_credits is never explained, leaving one parameter — presumably a spend cap — entirely undocumented in both schema and description.

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 and resource — 'Read a reference ad into a reference_profile' — and enumerates the produced artifacts (beats, graphics, captions, pacing, timed transcript). It also distinguishes the two modes ('mode "data" answers only the data'), so the agent knows exactly which operation it is selecting versus polling with get_reference_analysis.

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?

Explicit routing: 'Quote first with quote_analysis', 'Poll get_reference_analysis with wait_seconds: 50', and 'A YouTube link is refused: upload its MP4 with create_asset.' It also names the accepted source types per parameter (MP4 asset vs Instagram reel/post or TikTok video), giving the agent concrete when-to-use and when-not-to-use conditions.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.