Skip to main content
Glama

Generate image

generate_image

Generate a custom image for the page and return a hosted WebP URL to drop straight into an src. Pass the EXACT pixel size the layout needs — the image is rendered and resized to it, so the page ships no oversized bytes. Use for hero art, backgrounds, illustrations and abstract visuals. Prefer the user's own imagery when they have it (logos, product shots, team photos convert better); prefer CSS for plain gradients or geometric shapes, which need no image at all.

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": {
      "prompt": "<prompt>",
      "width": "<width>",
      "height": "<height>"
    },
    "name": "generate_image"
  }
}

Input Schema

NameRequiredDescriptionDefault
widthYesDelivered width in CSS pixels (32–2048). Use the size the layout actually renders at — for a full-width hero, 1600 is plenty.
heightYesDelivered height in CSS pixels (32–2048). Together with width this sets the aspect ratio, so pass the real slot size (e.g. 1600x900 for a hero, 800x800 for a square card).
promptYesWhat to render: subject + style + composition + palette + lighting + mood. Mention the brand accent colour for cohesion. For text-free art say "no text, no words, no letters" — rendered text is usually malformed.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.6/5.0
Behavior4/5

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

Annotations declare readOnlyHint=false and openWorldHint=true, so the description is not carrying the full burden, but it still adds real value: it discloses that the render is produced at the requested pixel size and resized so no oversized bytes ship, that the return is a hosted WebP URL, and that rendered text is usually malformed. It omits that generation is non-deterministic (annotations mark idempotentHint=false but the description never says repeat calls yield different images) and says nothing about latency or cost.

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 sentences with zero filler: output contract first, the sizing constraint second, eligibility and alternatives third. Front-loaded with the result the caller cares about rather than preamble.

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?

The output schema is absent, but the description covers the return value precisely (hosted WebP URL usable as an img src) and the sizing contract, which are the two things an agent must know to call it correctly. For a generative tool, the missing pieces are non-determinism, whether the URL is permanent, and any rate limit or cost caveat.

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 description coverage is 100% so the baseline is 3, and the description earns above that by explaining why the size parameters matter ('the image is rendered and resized to it, so the page ships no oversized bytes'), which is rationale the schema does not state. The prompt guidance is duplicated from the schema rather than extended, which keeps it short of a 5.

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?

Specific verb ('Generate') plus resource ('a custom image') and an explicit output artifact ('a hosted WebP URL to drop straight into an <img> src'). The scope line ('hero art, backgrounds, illustrations and abstract visuals') further separates it from sibling tools like upload_asset and search_icons without needing to open a 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 both positive triggers (hero art, backgrounds, illustrations, abstract visuals) and explicit exclusions with the alternative named for each: the user's own imagery (logos, product shots, team photos) and CSS for plain gradients or geometric shapes. That is when-to-use, when-not-to-use, and the substitute in a single paragraph.

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.