Skip to main content
Glama

Add or replace an image preset

codex_preset_set

Create a named preset for recurring image subjects to avoid restating details. It persists across restarts and replaces any existing preset with the same name.

Instructions

Define a named preset for a subject drawn repeatedly, so later calls name it instead of restating the description. Written to the presets file, so it survives a restart, and usable immediately. Replaces a preset of the same name outright rather than merging, so a field can be removed.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesName callers will pass as "preset". Replaces an existing preset of the same name.
sizeNoRequested size as WIDTHxHEIGHT, e.g. "1024x1024", "1536x1024", "3840x2160".
styleNoStyle or medium, e.g. "pixel art 16-bit, limited palette".
subjectNoThe recurring subject, prepended to every prompt using this preset. This is the field that earns a preset.
use_caseNoTaxonomy slug steering the style. One of: product-mockup, ui-mockup, logo-brand, illustration-story, infographic-diagram, photorealistic-natural, stylized-concept, ads-marketing.
constraintsNoWhat images from this preset must avoid, e.g. "no watermark".
transparentNoAsk for a transparent background by default.
reference_imagesNoReference art for this subject. Each must sit inside the server allowlist.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.0.7

TDQS

A4.7/5.0
Behavior5/5

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

The description adds material behavioral detail beyond the annotations: it persists to the presets file, survives restart, is usable immediately, and replaces same-name presets outright so fields can be removed. This replacement/removal behavior is exactly the kind of side effect an agent needs to know.

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 no filler: purpose first, then persistence and overwrite semantics. It does not repeat schema details and every sentence contributes critical selection or invocation information.

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?

For an 8-parameter tool with complete schema coverage and no output schema, the description covers purpose, file persistence, immediate usability, and replace-not-merge behavior. An agent has enough information to decide whether to call it and what to expect when it does.

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?

All eight parameters already have schema descriptions, so the baseline is 3. The description adds value by tying the two central parameters together—'name' is the handle used in later calls, and the 'subject' is the recurring content being preset—clarifying their relationship beyond the individual schema entries.

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?

The description opens with a specific action—'Define a named preset for a subject drawn repeatedly'—and names the resource and purpose: to let later calls use the preset name instead of restating the subject. It also distinguishes this from update-style siblings by stating it 'Replaces a preset of the same name outright rather than merging.'

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?

The description gives a clear use context: use this when a subject is drawn repeatedly and you want a reusable named preset. It also conveys when not to rely on it, since replacement is outright rather than a merge, implying partial updates are not performed here.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.