Skip to main content
Glama

Add Text to Image API - caption, label or badge photos with outline & box

add_text_to_image
Read-onlyIdempotent

Render multi-line text onto any PNG, JPG or WebP image with configurable anchor position or exact (x%, y%), font style, size, colour, stroke outline, optional rounded background box and opacity. Runs on our server, files are deleted right after the call, nothing stored. Free: 5 calls/day per IP. Paid: Radar API key (from €15/mo at https://radarbg.com/pricing#starter via X-API-Key) or $0.002/call via x402 at https://radarbg.com/x402/add-text-to-image.

Example tool call

This call uses example arguments supplied in the tool’s input schema.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "size": 12,
      "text": "SAMPLE",
      "color": "white",
      "outline": "thin",
      "fileName": "sample.png",
      "position": "bc",
      "fileContent": "iVBORw0KGgoAAAANSUhEUgAAAHgAAABQCAIAAABd+SbeAAAA6klEQVR4nO3cQQ2DABAAwdKgg1cFVQIykIOEyqiIisFDKdsQZv6XXDb3vmFa3jeOd//3AlchdEToiNARoSNCR4SOCB0ROiJ0ROiI0BGhI0JHhI4IHRE6InRE6Mi4Z/jznH+0xmk8Xut3gy46InRE6IjQEaEjQkeEjggdEToidEToiNARoSNCR4SOCB0ROiJ0ROiI0BGhI0JHhI4IHRE6InRE6IjQEaEjQkeEjggdEToidEToiNARoSNCR4SOCB0ZPIFtuOiI0BGhI0JHhI4IHRE6InRE6IjQEaEjQkeEjggdEToidEToiNCRDexBBl0OjJSaAAAAAElFTkSuQmCC"
    },
    "name": "add_text_to_image"
  }
}

Input Schema

NameRequiredDescriptionDefault
xNoLeft edge % of width (when position=xy)
yNoTop edge % of height (when position=xy)
fontNoFont family: bold, regular, impact, serif or monobold
sizeNoFont size as % of image width (1-40)
textYesText to draw on the image (newlines supported, max 600 chars)
alignNoMulti-line alignment: left, center or rightcenter
colorNoText colour name or HEXwhite
filesNoOr several files: [{fileName, fileContent (base64)}] (up to 60 files, 20 MB total)
formatNoOutput format: same, jpg, png or webpsame
opacityNoText opacity % (5-100)
outlineNoOutline thickness: none, thin or thickthin
boxColorNoBackground box colour name or HEXblack
fileNameNoFile name with extension, e.g. report.pdf
positionNoAnchor: tl, tc, tr, ml, c, mr, bl, bc, br or xybc
boxOpacityNoBackground box opacity % (0-100)
fileContentNoThe file as base64 (a data: URI is fine; 20 MB total decoded limit per call)
outlineColorNoOutline colour name or HEXblack
backgroundBoxNoDraw rounded background box behind text

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changed
    • changedInput schema / properties / fileContent / description
      Previous value: -"The file as base64 (a data: URI is fine)"New value: +"The file as base64 (a data: URI is fine; 20 MB total decoded limit per call)"
    • changedInput schema / properties / files / description
      Previous value: -"Or several files: [{fileName, fileContent (base64)}]"New value: +"Or several files: [{fileName, fileContent (base64)}] (up to 60 files, 20 MB total)"
    • addedInput schema / properties / files / maxItems
      Added value: +60
  2. Added

TDQS

A3.8/5.0
Behavior5/5

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

Goes well beyond the annotations by disclosing that processing runs server-side, files are deleted right after the call with nothing stored, and that there is a 5 calls/day per-IP free quota with two paid paths (X-API-Key or x402 per call). Privacy handling, rate limits and auth requirements are all stated, which annotations like readOnlyHint/openWorldHint cannot convey.

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?

Two sentences, front-loaded with what the tool does and then the operational facts. Slightly dense — pricing and endpoint URLs are packed into the second sentence — but each clause carries actionable information.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For an 18-parameter tool with no output schema, the description covers capabilities, data handling, quota and auth well, but says nothing about what the call returns (image bytes, base64, URL?) or how the multi-file array response is shaped. An agent knows how to call it but not what to expect back.

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%, so every one of the 18 parameters is already documented with defaults, enums and ranges. The description restates the feature surface (anchor position or exact x%/y%, font style, size, colour, outline, box, opacity) but adds no format/syntax detail beyond what the schema provides, so the baseline of 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

Opens with a specific verb+resource: 'Render multi-line text onto any PNG, JPG or WebP image', then enumerates the controllable aspects (position, font, colour, outline, box, opacity). This is clearly distinguishable from siblings like image_to_text or fancy_text_generator, though it never names those siblings explicitly to draw the contrast.

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

Usage Guidelines3/5

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

Usage is implied by the title's 'caption, label or badge photos' framing, and the description adds access guidance (free tier, API key, x402), but there is no explicit when-to-use or when-not-to-use statement versus alternatives such as fancy_text_generator or image_compress. The agent must infer the overlap boundaries.

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