Skip to main content
Glama

Check an element against a placement safe area

check_safe_area
Read-onlyIdempotent

Check whether a rectangle (a caption, logo or button, in px on the placement's own frame, origin top-left) stays inside the placement's safe area, and by how many px it intrudes past each edge if not. Use this to validate a layout before export; use get_social_media_placement for the raw insets. Returns verdict "inside", "intrudes" or "unknown"; "unknown" means the platform publishes no fixed safe area (TikTok) and comes with the reason instead of a guess. Errors on an unknown placement id or a box with non-positive size.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "placementId": "<placementId>",
      "x": "<x>",
      "y": "<y>",
      "width": "<width>",
      "height": "<height>"
    },
    "name": "check_safe_area"
  }
}

Input Schema

NameRequiredDescriptionDefault
xYesElement's left edge in px from the frame's left edge.
yYesElement's top edge in px from the frame's top edge.
widthYesElement width in px.
heightYesElement height in px.
placementIdYesPlacement id, camelCase or kebab-case, e.g. instagram-reels.

Output Schema

NameRequiredDescriptionDefault
boxYes
frameYes
verdictYes
safeRectPxYes
intrusionPxYes
placementIdYes
withinFrameYes
safeAreaKindYes
referenceToolUrlYes
unpublishedReasonYes
firstPartySourceUrlYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • changedInput schema / properties / placementId / enum
      Previous value: -[
      -  "instagramReels",
      -  "instagramStory",
      -  "instagramFeedTall",
      -  "instagramFeedPortrait",
      -  "instagramFeedSquare",
      -  "instagramFeedLandscape",
      -  "tiktokInFeed",
      -  "tiktokSquare",
      -  "tiktokLandscape",
      -  "youtubeShorts",
      -  "youtubeLandscape",
      -  "youtubeThumbnail",
      -  "youtubeBanner",
      -  "facebookReels",
      -  "facebookFeed",
      -  "linkedinFeedSquare",
      -  "linkedinFeedLandscape",
      -  "xFeedLandscape",
      -  "xFeedPortrait",
      -  "instagram-reels",
      -  "instagram-story",
      -  "instagram-feed-tall",
      -  "instagram-feed-portrait",
      -  "instagram-feed-square",
      -  "instagram-feed-landscape",
      -  "tiktok-video",
      -  "tiktok-in-feed",
      -  "tiktok-square",
      -  "tiktok-landscape",
      -  "youtube-shorts",
      -  "youtube-video",
      -  "youtube-landscape",
      -  "youtube-thumbnail",
      -  "youtube-channel-banner",
      -  "youtube-banner",
      -  "facebook-reels",
      -  "facebook-feed",
      -  "linkedin-video",
      -  "linkedin-feed-square",
      -  "linkedin-feed-landscape",
      -  "x-video",
      -  "x-feed-landscape",
      -  "x-feed-portrait"
      -]New value: +[
      +  "instagramReels",
      +  "instagramStory",
      +  "instagramFeedTall",
      +  "instagramFeedPortrait",
      +  "instagramFeedSquare",
      +  "instagramFeedLandscape",
      +  "tiktokInFeed",
      +  "tiktokSquare",
      +  "tiktokLandscape",
      +  "youtubeShorts",
      +  "youtubeLandscape",
      +  "youtubeThumbnail",
      +  "youtubeBanner",
      +  "facebookReels",
      +  "facebookFeed",
      +  "facebookProfile",
      +  "facebookCover",
      +  "linkedinFeedSquare",
      +  "linkedinFeedLandscape",
      +  "linkedinLinkImage",
      +  "linkedinProfilePhoto",
      +  "linkedinProfileCover",
      +  "linkedinPageLogo",
      +  "linkedinPageCover",
      +  "xFeedLandscape",
      +  "xFeedPortrait",
      +  "xProfile",
      +  "xHeader",
      +  "pinterestPin",
      +  "instagram-reels",
      +  "instagram-story",
      +  "instagram-feed-tall",
      +  "instagram-feed-portrait",
      +  "instagram-feed-square",
      +  "instagram-feed-landscape",
      +  "tiktok-video",
      +  "tiktok-in-feed",
      +  "tiktok-square",
      +  "tiktok-landscape",
      +  "youtube-shorts",
      +  "youtube-video",
      +  "youtube-landscape",
      +  "youtube-thumbnail",
      +  "youtube-channel-banner",
      +  "youtube-banner",
      +  "facebook-reels",
      +  "facebook-feed",
      +  "linkedin-video",
      +  "linkedin-feed-square",
      +  "linkedin-feed-landscape",
      +  "x-video",
      +  "x-feed-landscape",
      +  "x-feed-portrait"
      +]
    • changedOutput schema / properties / safeAreaKind / enum
      Previous value: -[
      -  "published",
      -  "unpublished",
      -  "noOverlay",
      -  "region"
      -]New value: +[
      +  "published",
      +  "unpublished",
      +  "noOverlay",
      +  "region",
      +  "circle"
      +]
  2. First observed

TDQS

A4.7/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, non-destructive and closed-world, so safety is covered. The description still adds real behavioral detail: the coordinate frame and origin, failure on unknown placement id or non-positive box, and the meaning of the 'unknown' verdict for platforms like TikTok that publish no fixed safe area. Only missing piece is pagination-like output detail, which the output schema covers.

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?

Three dense sentences, front-loaded with the core check and unit, then usage routing, then return and error semantics. No filler and nothing repeated from structured fields.

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 5-required-param read-only validator with a full output schema, the description covers scope, coordinate frame, alternative tool, verdict vocabulary, and error conditions—nothing an agent needs in order to call it correctly is absent.

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, but the description adds interpretive context the schema lacks: the box is expressed in px on the placement's own frame and reports intrusion per edge, which tells the agent how x/y/width/height relate to the result. Enum values and sizes are left to the schema, appropriately.

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 (check whether a rectangle stays inside the placement's safe area) plus the exact output unit (px of intrusion past each edge). It explicitly separates itself from the sibling that returns raw insets, so an agent can choose without opening either 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?

Gives an explicit when-to-use (validate a layout before export) and names the alternative with its condition (get_social_media_placement for the raw insets). No exclusion is left to inference.

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.