Skip to main content
Glama

photo_add_border

Add Border — Add a solid-colour border around an image, keeping the format it arrived in. [category: photo]

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
fileYesJPG, PNG or WebP. Max 25 MB. The output keeps the input format. The type is read from the file's own bytes, not from its name.
sizeNoHow thick the border is, in pixels, on all four sides. Out-of-range values are pulled back to the nearest allowed value rather than refused. 0 adds no border, but it is NOT a pass-through: the picture is still decoded and written out again (a JPEG is re-encoded at quality 92), and an EXIF-rotated phone photo comes back physically rotated with its orientation tag cleared.
colorNoA hex colour (#rgb, #rgba, #rrggbb or #rrggbbaa) or one of these 35 names — a hand-picked set, not the whole CSS list, so lightblue and darkgreen are refused: black, silver, gray, grey, white, maroon, red, purple, fuchsia, green, lime, olive, yellow, navy, blue, teal, aqua, cyan, magenta, orange, pink, brown, beige, ivory, gold, tan, khaki, crimson, indigo, violet, salmon, turquoise, lavender, plus none and transparent, which still widen the picture by the border size on every side but fill those new pixels with see-through rather than a visible frame. Anything else is refused rather than quietly falling back. A see-through colour needs a PNG or WebP input — on a JPEG it is refused, because JPEG cannot hold transparency and the border would come out black.#000000

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changed
    • addedInput schema / properties / color / x-ui
      Added value: +{
      +  "draw": {
      +    "names": {
      +      "aqua": [
      +        0,
      +        255,
      +        255
      +      ],
      +      "beige": [
      +        245,
      +        245,
      +        220
      +      ],
      +      "black": [
      +        0,
      +        0,
      +        0
      +      ],
      +      "blue": [
      +        0,
      +        0,
      +        255
      +      ],
      +      "brown": [
      +        165,
      +        42,
      +        42
      +      ],
      +      "crimson": [
      +        220,
      +        20,
      +        60
      +      ],
      +      "cyan": [
      +        0,
      +        255,
      +        255
      +      ],
      +      "fuchsia": [
      +        255,
      +        0,
      +        255
      +      ],
      +      "gold": [
      +        255,
      +        215,
      +        0
      +      ],
      +      "gray": [
      +        128,
      +        128,
      +        128
      +      ],
      +      "green": [
      +        0,
      +        128,
      +        0
      +      ],
      +      "grey": [
      +        128,
      +        128,
      +        128
      +      ],
      +      "indigo": [
      +        75,
      +        0,
      +        130
      +      ],
      +      "ivory": [
      +        255,
      +        255,
      +        240
      +      ],
      +      "khaki": [
      +        240,
      +        230,
      +        140
      +      ],
      +      "lavender": [
      +        230,
      +        230,
      +        250
      +      ],
      +      "lime": [
      +        0,
      +        255,
      +        0
      +      ],
      +      "magenta": [
      +        255,
      +        0,
      +        255
      +      ],
      +      "maroon": [
      +        128,
      +        0,
      +        0
      +      ],
      +      "navy": [
      +        0,
      +        0,
      +        128
      +      ],
      +      "olive": [
      +        128,
      +        128,
      +        0
      +      ],
      +      "orange": [
      +        255,
      +        165,
      +        0
      +      ],
      +      "pink": [
      +        255,
      +        192,
      +        203
      +      ],
      +      "purple": [
      +        128,
      +        0,
      +        128
      +      ],
      +      "red": [
      +        255,
      +        0,
      +        0
      +      ],
      +      "salmon": [
      +        250,
      +        128,
      +        114
      +      ],
      +      "silver": [
      +        192,
      +        192,
      +        192
      +      ],
      +      "tan": [
      +        210,
      +        180,
      +        140
      +      ],
      +      "teal": [
      +        0,
      +        128,
      +        128
      +      ],
      +      "turquoise": [
      +        64,
      +        224,
      +        208
      +      ],
      +      "violet": [
      +        238,
      +        130,
      +        238
      +      ],
      +      "white": [
      +        255,
      +        255,
      +        255
      +      ],
      +      "yellow": [
      +        255,
      +        255,
      +        0
      +      ]
      +    },
      +    "of": "border",
      +    "role": "color"
      +  }
      +}
    • addedInput schema / properties / size / x-ui / draw
      Added value: +{
      +  "of": "border",
      +  "role": "thickness"
      +}
    • addedInput schema / x-draw
      Added value: +{
      +  "border": {
      +    "noun": "border",
      +    "shape": "border",
      +    "title": "The border"
      +  }
      +}
  2. Changed2 schema fields changed
    • changedInput schema / properties / color / description
      Previous value: -"A hex colour (#rgb, #rgba, #rrggbb or #rrggbbaa) or one of the 35 standard CSS colour names. Anything else is refused rather than quietly falling back. A see-through colour needs a PNG or WebP input — on a JPEG it is refused, because JPEG cannot hold transparency and the border would come out black."New value: +"A hex colour (#rgb, #rgba, #rrggbb or #rrggbbaa) or one of these 35 names — a hand-picked set, not the whole CSS list, so lightblue and darkgreen are refused: black, silver, gray, grey, white, maroon, red, purple, fuchsia, green, lime, olive, yellow, navy, blue, teal, aqua, cyan, magenta, orange, pink, brown, beige, ivory, gold, tan, khaki, crimson, indigo, violet, salmon, turquoise, lavender, plus none and transparent, which still widen the picture by the border size on every side but fill those new pixels with see-through rather than a visible frame. Anything else is refused rather than quietly falling back. A see-through colour needs a PNG or WebP input — on a JPEG it is refused, because JPEG cannot hold transparency and the border would come out black."
    • changedInput schema / properties / size / description
      Previous value: -"How thick the border is, in pixels, on all four sides. Out-of-range values are pulled back to the nearest allowed value rather than refused; 0 returns the picture untouched."New value: +"How thick the border is, in pixels, on all four sides. Out-of-range values are pulled back to the nearest allowed value rather than refused. 0 adds no border, but it is NOT a pass-through: the picture is still decoded and written out again (a JPEG is re-encoded at quality 92), and an EXIF-rotated phone photo comes back physically rotated with its orientation tag cleared."
  3. Added

TDQS

A3.5/5.0
Behavior3/5

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

Annotations already declare this is a non-read-only, non-destructive, closed-world transform, so the safety profile is covered. The description adds one behavioral fact — output format matches input format — but that same fact is already stated in the schema's `file` description, and it omits the more consequential behaviors (JPEG re-encode at quality 92, EXIF auto-rotation, transparency refusal on JPEG) that live only in the schema. No contradiction with annotations.

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?

A single front-loaded sentence plus a category tag — no padding, and the core action leads. Minor redundancy: "Add Border" repeats the tool title and name before restating the same action.

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 an exceptionally detailed input schema and annotations that cover the mutation/safety profile, the description is essentially complete for invocation: input types, size limits, colour syntax and output format are all documented elsewhere. Only the post-processing side effects (re-encoding quality, rotation normalization) are absent from the description, though they are recoverable from the schema.

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 description coverage is 100% and each of the three parameters carries a rich, edge-case-aware description (out-of-range clamping, size=0 still re-encoding, 35-name colour allow-list, transparency requiring PNG/WebP). The description text itself contributes no parameter meaning, so the 3 baseline applies.

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 ("Add a solid-colour border around an image") plus a distinguishing constraint ("keeping the format it arrived in"). The noun 'border' separates it from nearby siblings such as photo_rounded_corners, photo_shadow_adder and photo_watermark without needing to open any schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

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

The description gives no when-to-use or when-not-to-use guidance and names no alternative, even though the sibling list contains several closely related frame/edge tools (photo_rounded_corners, photo_shadow_adder, photo_watermark). Selection is left entirely to inference from the tool name.

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