Skip to main content
Glama
algoyandreina1236-web

Meta Ads MCP

compute_image_crops

Compute image_crops coordinates for any source image size, returning a dict ready to use in Meta Ads creative calls. Provides largest centered crops for all standard aspect ratios.

Instructions

Compute image_crops coordinates for a source image of the given dimensions.

Returns the image_crops dict ready to pass directly to create_ad_creative or bulk_create_ad_creatives. For each crop key the result is the largest centered region that fits within the source image while matching the key's aspect ratio — equivalent to "Original" crop (no content is cut off beyond what the ratio requires).

Args: image_width: Width of the source image in pixels (e.g. 1080). image_height: Height of the source image in pixels (e.g. 1080). crop_keys: Optional list of specific crop keys to compute. Defaults to all 6 keys accepted by Meta's API: "100x100" — 1:1 square (Feed, Marketplace, Search) "100x72" — ~1.39:1 horizontal (Marketplace, some placements) "400x500" — 4:5 portrait (Feed on mobile, Stories fallback) "400x150" — ~2.67:1 wide banner (Audience Network) "600x360" — ~1.67:1 horizontal (Right column, some placements) "90x160" — 9:16 tall portrait (Stories)

Returns: JSON with the image_crops dict (ready for copy-paste into create_ad_creative), plus validation notes for any invalid keys requested.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
crop_keysNo
image_widthYes
image_heightYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

No annotations are provided, so the description carries the full burden. It discloses the algorithm (largest centered region, equivalent to 'Original' crop) and validation notes for invalid keys. It does not explicitly state read-only nature or absence of API calls, but 'compute' implies a pure function with no side effects.

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 well-structured with Args and Returns sections, front-loading the purpose. It is appropriately sized for the complexity, and every line, including the crop key list, adds necessary value without redundancy.

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?

Despite lacking annotations, the description fully covers purpose, usage, parameter details, output format, and validation behavior. It is complete enough for an agent to select and invoke the tool correctly, even with the output schema.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description fully compensates by explaining each parameter with examples and enumerating all crop_keys options, including aspect ratios and placements. This goes well beyond the schema's simple field titles.

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 of given dimensions, with a specific verb and resource. It also explains the output's direct use in create_ad_creative, distinguishing it from sibling tools focused on account, campaign, and creative management.

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 provides context by stating the result is ready to pass directly to create_ad_creative or bulk_create_ad_creatives, indicating when to use it. It does not explicitly list exclusions or alternatives, but the unique purpose among siblings makes the use case clear.

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/algoyandreina1236-web/meta-ads-mcp-pwm'

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