Skip to main content
Glama

Modify a shared template

modify_template

Change a JSXImage template that the user shared with you as a link (a URL containing shared= or temp=, for example https://jsximage.com/playground?shared=...). Works in two steps:

  1. Call with only url: you get the template's current source code.

  2. Make the requested changes, then call again with the same url and the COMPLETE modified source in code: you get a link to the modified copy.

The original template is never changed; the result is a new link that works for 7 days. The same template rules as create_template apply (class not className, no imports, no hooks, export const options, a default for every prop). If the code fails the check, you get the error back: fix it and call again. If the link is not available, tell the user and ask for a new one.

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": {
      "url": "<url>"
    },
    "name": "modify_template"
  }
}

Input Schema

NameRequiredDescriptionDefault
urlYesThe JSXImage link the user gave you, for example https://jsximage.com/playground?shared=<token>. Pass it exactly as given.
codeNoLeave out to read the template's current source. To save a change, the COMPLETE modified template source (not a diff).
nameNoOptional title for the modified copy. Defaults to the original name plus "(modified)". Up to 80 characters.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.5/5.0
Behavior4/5

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

Annotations only say it is a non-idempotent, non-destructive write; the description adds the substantive behavior: the original is never mutated, a new copy link is returned, that link expires in 7 days, and validation failures come back as errors to fix and retry. That is real context beyond the annotations. It stops short of describing response shape or size limits on the source, which keeps it off 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?

Well front-loaded: purpose, then a numbered two-step list, then constraints, then the exception case. However, roughly half the text is a long design-rules monologue with some enumeration for its own sake (palette examples, gradient carve-outs), which inflates the definition and could be a linked reference instead. Structure is good; density is not.

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?

No output schema exists, and the description compensates by saying exactly what each call returns (current source code, then a modified-copy link) and what errors look like. For a 3-parameter mutation-by-copy tool with link expiry and a validation gate, nothing an agent needs in order to call it correctly is missing.

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 earns above that by assigning each parameter a role in the workflow (step 1 = `url` only, step 2 = same `url` plus the COMPLETE source in `code`) and by stressing 'Pass it exactly as given'. The `name` parameter is untouched in the prose, which the schema already covers.

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 ('Change a JSXImage template that the user shared with you as a link') and immediately pins down the resource by URL shape (`shared=` or `temp=`). It also names the sibling rule set ('same template rules as create_template apply'), so the agent can distinguish create from modify 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 two-step protocol (call with only `url` to read, then call with `url` + complete `code` to write) plus the fallback when the link is unavailable ('tell the user and ask for a new one') and the precedence rule when user requests override the design constraints. When-to-use and when-not-to-use are both covered.

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