Skip to main content
Glama
hashcott

Meta Ads MCP Server

by hashcott

Compute Meta Ad Image Crops

meta_ads_compute_image_crops
Read-onlyIdempotent

Compute image crop coordinates for ad creative formats. Returns the largest centered region matching each requested aspect ratio, ready for ad creation.

Instructions

Compute image_crops coordinates for a source image. For each requested key, returns the largest centered region that fits the source while matching that key's aspect ratio (equivalent to Meta's "Original" crop — no content cut beyond the ratio).

Valid keys (Meta accepts only these 6): 100x100 — 1:1 square (Feed, Marketplace) 100x72 — ~1.39:1 horizontal (Marketplace) 400x500 — 4:5 portrait (Feed mobile, Stories fallback) 400x150 — ~2.67:1 banner (Audience Network) 600x360 — ~1.67:1 horizontal (Right column) 90x160 — 9:16 portrait (Stories)

Pass the returned image_crops dict to meta_ads_create_ad_creative.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
image_widthYes
image_heightYes
crop_keysNo
Behavior4/5

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

Annotations indicate readOnlyHint=true, destructiveHint=false, idempotentHint=true. The description adds detail that it returns the largest centered region fitting the source while matching aspect ratio, equivalent to Meta's "Original" crop with no content cut beyond the ratio. This enriches understanding beyond annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is concise (~150 words), well-structured with bullet points for valid keys, and front-loaded with the main purpose. Every sentence adds value, no redundancy.

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?

Given the simplicity of the tool (3 parameters, no output schema), the description covers the key aspects: what it computes, valid inputs, and downstream use. It could optionally detail the return dict structure, but the information provided is sufficient for correct invocation.

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 0%, so description must compensate. It provides a list of valid crop_keys with aspect ratios and placements, adding meaning beyond the schema. However, it does not explain the numeric parameters (image_width, image_height) beyond their role as source dimensions, leaving some ambiguity.

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 clearly states it computes image_crops coordinates for a source image, identifies the specific resource (image crops), and uses a specific verb "compute". It distinguishes from sibling tools by focusing on coordinate computation rather than estimation, fetching, or listing.

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?

The description explicitly directs the user to pass the returned image_crops dict to meta_ads_create_ad_creative, providing clear downstream usage. It does not explicitly state when not to use this tool, but the context is clear for this computational task.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/hashcott/meta-ads-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server