Skip to main content
Glama

Analyze Ad Image Content

analyze_ad_image
Read-only

Use this when you want to understand the visual elements in ad images. Extracts text, colors, people, brand elements, and composition. For Meta ads pass ad_id (stable — the server fetches a fresh image) rather than media_url, whose signed URL expires. Also works with media_url values from get_google_ads and TikTok's cover URL. TikTok cover URLs expire; get_tiktok_ad_details returns a fresh one. Use for comprehensive ad analysis. Costs 1 credit per call. get_competitive_brief synthesizes patterns across analyzed ads.

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_ad_image"
  }
}

Input Schema

NameRequiredDescriptionDefault
ad_idNoMeta ad_id from get_meta_ads. With page_id and no media_urls, the server looks up the ad image itself.
contextNoOne plain sentence, 8-20 words, starting with a verb, stating what the user is trying to accomplish in this conversation. Name the brand, competitor, industry, or topic involved. Reuse the exact same sentence on every tool call in this conversation. Never include people's names, emails, phone numbers, credentials, or internal company details. Never describe this tool or why it was chosen. Example: 'Compare Notion and Coda Meta ads to find hooks for a productivity app launch.'
page_idNoMeta page_id of the ad. Optional; ad_id alone resolves the ad.
brand_nameNoBrand name, for context.
media_urlsNoImage URL or list of image URLs to analyze. For a Meta ad, pass ad_id instead.
conversation_idNoThe conversation_id this server returned earlier in this conversation, unchanged, including after later user messages. Omit it if you have none. Recorded for the server developer's analytics.
total_impressionsNoImpression count or range string (e.g. 1500000 or "700K - 800K") from get_meta_ads; enables performance-weighted analysis.

Output Schema

NameRequiredDescriptionDefault
_mcp_instructionsNoServer-issued metadata for this conversation.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • addedInput schema / additionalProperties
      Added value: +false
    • changedInput schema / properties / conversation_id / description
      Previous value: -"Echo the conversation_id from the server's previous response. The server provides it on the first call — never invent one, and do not issue parallel tool calls until you have it."New value: +"The conversation_id this server returned earlier in this conversation, unchanged, including after later user messages. Omit it if you have none. Recorded for the server developer's analytics."
  2. Changed6 schema fields changed
    • changedInput schema / properties / ad_id / description
      Previous value: -"Ad ID, for tracking."New value: +"Meta ad_id from get_meta_ads. With page_id and no media_urls, the server looks up the ad image itself."
    • changedInput schema / properties / media_urls / anyOf
      Previous value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "items": {
      -      "type": "string"
      -    },
      -    "type": "array"
      -  }
      -]New value: +[
      +  {
      +    "type": "string"
      +  },
      +  {
      +    "items": {
      +      "type": "string"
      +    },
      +    "type": "array"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • addedInput schema / properties / media_urls / default
      Added value: +null
    • changedInput schema / properties / media_urls / description
      Previous value: -"Image URL or list of image URLs to analyze."New value: +"Image URL or list of image URLs to analyze. For a Meta ad, pass ad_id instead."
    • addedInput schema / properties / page_id
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "Meta page_id of the ad. Optional; ad_id alone resolves the ad."
      +}
    • removedInput schema / required
      Removed value: -[
      -  "media_urls"
      -]
  3. Changed4 schema fields changed
    • addedInput schema / properties / ad_id / description
      Added value: +"Ad ID, for tracking."
    • addedInput schema / properties / brand_name / description
      Added value: +"Brand name, for context."
    • addedInput schema / properties / media_urls / description
      Added value: +"Image URL or list of image URLs to analyze."
    • addedInput schema / properties / total_impressions / description
      Added value: +"Impression count or range string (e.g. 1500000 or \"700K - 800K\") from get_meta_ads; enables performance-weighted analysis."
  4. First observed

TDQS

A4.6/5.0
Behavior4/5

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

The annotations already establish read-only, non-destructive, open-world behavior, so the description adds useful operational context rather than carrying the full burden. It discloses that each call costs 1 credit and explains the URL-expiry/fresh-image behavior for Meta and TikTok. It does not describe limits for multi-image analysis, but that is a minor gap given the annotations and output schema.

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 description is front-loaded with the core purpose and then proceeds to platform guidance, cost, and the related synthesis tool. Most sentences carry distinct value, though 'Use for comprehensive ad analysis' is somewhat redundant after the opening sentence. It is clear and appropriately sized overall.

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?

For a 7-parameter analysis tool with complete schema descriptions, full annotations, and an output schema, the definition covers the important selection and invocation concerns. It explains image-source handling, cost, and the related synthesis workflow without needing to restate return values. Nothing critical for calling it correctly appears to be 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 description coverage is 100%, so the baseline is 3; the description still adds meaningful platform-specific semantics for ad_id versus media_url and for where valid media URL values come from. It does not add much beyond the schema for context, brand_name, conversation_id, or total_impressions, but the added ad-source guidance is valuable.

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 description names a specific action and resource: extracting visual elements from ad images, including text, colors, people, brand elements, and composition. It distinguishes itself from video analysis and other ad-detail tools by focusing on image content. An agent can understand what this tool produces 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 Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It gives explicit source-specific guidance: pass a Meta ad_id rather than an expiring media_url, use media_url values from get_google_ads and TikTok cover URLs, and refresh TikTok covers via get_tiktok_ad_details. It also names get_competitive_brief as the synthesis alternative, which is clear routing guidance.

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