Skip to main content
Glama

Create an image template

create_template

Create a JSXImage template from JSX source code and get a link to it. The link opens the template in the JSXImage playground with a live preview, and works for 7 days. No account is needed to create or open it.

You write the whole template as source code: a default-exported React function component styled with Tailwind classes in the class attribute (not className), plus export const options = { width, height, format }. export const props (every input and its default) is required. No imports, no hooks. To show live data from a public API (GitHub, Shopify products, npm, PyPI, Wikipedia, weather...), add export async function data(props), which can fetch and returns props. See the server instructions for the complete rules and an example. The code is checked before it is stored: if it fails, you get the error back and should fix the code and call again.

Design it like a senior designer, with none of the habits that make an image look AI-generated: one font family (two at most); aim for ONE text size for all text plus ONE big display size for the hero (a number or a headline), with hierarchy only from weight, color and spacing (three sizes at the very most); no small uppercase labels; no boxes around everything (one at most); a flat background, never a decorative gradient, glow or vignette, and no emoji (a fade behind text on a photo is the one gradient allowed); never text straight on a photo (darken it with an overlay or a fade at the bottom); Geist (built in) unless the brand has its own font, no thin weights, and tighter letter-spacing and line-height as text grows; double the whitespace you think you need, with outer margins at least as large as the gaps inside; colors taken from the brand's own site (its CSS, buttons or logo), never a default palette such as navy or slate with an orange accent, cream with terracotta, or black with acid green, and one accent used sparingly; a clear grid with generous margins; the brand's real logo when you have it; nothing under about 24px on a phone-sized image. These rules give way only when the user explicitly asks for something they forbid (a gradient, uppercase labels, a given color): then do what the user asked. The tool's reply flags these if it finds them: fix them with modify_template before giving the user the link, except what the user explicitly asked for.

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": {
      "name": "<name>",
      "code": "<code>"
    },
    "name": "create_template"
  }
}

Input Schema

NameRequiredDescriptionDefault
codeYesThe complete template source: JSX with `export const props` (required: every input and its default), `type Props = typeof props`, `export default function Component(props: Props)` and `export const options = { width, height, format }`. Use `class`, not `className`. No imports, no hooks.
nameYesA short title for the template, for example "Blog post cover". Up to 80 characters.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4/5.0
Behavior4/5

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

Annotations only declare safety hints (readOnlyHint false, destructiveHint false, idempotentHint false), so the description adds genuine value: the code is validated before storage, errors come back for a retry, the returned link expires after 7 days, and no account is required. It doesn't cover persistence beyond the link lifetime or any rate limits, which keeps it from a 5.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Purpose and mechanics are front-loaded and the writing is tight per sentence. However, roughly two-thirds of the description is a long prose list of design rules that it already points to the server instructions for; that bulk belongs there, not in the tool definition the agent reads on every call.

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?

With no output schema, the description correctly explains what comes back — a preview link, its 7-day lifetime, and error feedback that flags design-rule violations. Combined with the annotated safety profile and fully documented parameters, an agent has what it needs to call it, though the inline rule list is incomplete relative to the referenced server instructions.

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 coverage is 100% and both parameters are fully described in the schema, so the baseline is 3. The description restates the code contract (default-exported component, required `export const props`, `class` not `className`, no imports or hooks) and adds the optional async `data(props)` escape hatch, but mostly duplicates schema text.

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?

Opens with a specific verb and resource — "Create a JSXImage template from JSX source code and get a link to it" — and immediately describes what the link does (opens the playground with a live preview, valid 7 days, no account). An agent can distinguish this from modify_template because the description explicitly routes fixes to modify_template.

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?

Gives clear conditions: create here, fix flagged issues with modify_template before handing over the link, and retry this tool after correcting code that fails validation. It doesn't spell out when *not* to create a template (e.g., editing an existing one first), but the modify_template handoff covers the main alternative.

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