Skip to main content
Glama

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
META_API_KEYYesMeta Model API key used when a tool makes a model call. The server starts and lists its tools without a key; the key is only needed when a tool makes a model call.

Instructions

Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.

This server publishes no instructions, or was last inspected before Glama recorded them.

Capabilities

Features and capabilities supported by this server

Protocol revision2025-11-25

CapabilityDetails
tools
{
  "listChanged": false
}
prompts
{
  "listChanged": false
}
resources
{
  "subscribe": false,
  "listChanged": false
}

Tools

Functions exposed to the LLM to take actions

NameDescription
drawA

Stage the real product into a generated scene. Fidelity Lock applies.

Args: asset: Asset handle (asset://) of the cut-out product layer produced by cut_out (kind foreground_png, chained to a source photo). Anything else is refused before any billing. scene_prompt: Scene preferences compiled into a versioned StageSpec. Only studio, concrete and warm selections are recognized; unmatched prose is dropped. The result discloses the compiled stage_spec and this limitation. Arbitrary rooms and source-camera matching are not supported by the fixed template. The scene text describes the environment only and must never name the product: before any spend it is screened against the cut concept (the scene guard, recorded on the receipt as scene_guard), and a prompt naming the product is refused with SCENE_NAMES_PRODUCT, because naming it makes the image model paint its own copy of the product into the scene.

The background plate is generated by muse-image-1.0 (billed through the spend-cap choke point at the per-image rate) and stored as a background_plate asset; deterministic code then fits the PLATE to the product's dimensions and composites the stored product layer onto it. The product layer is never regenerated, restyled, scaled, or "improved" by a model, and it is never sent to the image model. Returns the composite's asset handle, its fidelity receipt (source / foreground / mask / plate hashes, transformations, the measured changed-opaque-pixel count), and an image preview. The receipt is also persisted beside the composite in the asset store as <asset_id>.receipt.json, enriched with the billed cost and call attribution, so it survives a client dropping the return value and verify_receipt_from_disk can pick it up from the store alone. If the compositor ever measured changed opaque pixels, the tool returns a FIDELITY_VIOLATION error instead of presenting the composite under a false receipt.

Failures return a structured error: NOT_CONFIGURED (no META_API_KEY; checked before billing, so no ledger write), IMAGE_REFUSED / BAD_IMAGE_RESPONSE / IMAGE_CALL_FAILED (the plate call failed; its reservation stays counted as spend). A failed draw never falls back to regenerating the product, and in live mode it never silently substitutes the placeholder plate. Measurable plate rejection retries once; a horizon-placement mismatch goes straight to a disclosed studio-gray fallback without buying an identical second attempt.

Offline dev mode: with AGENTHAND_DRAW_PLACEHOLDER_PLATE=1 the plate is the deterministic local placeholder and no API call is made. That flag exists for tests and no-key demos only.

cut_outA

Cut the product out of its photo as a transparent PNG.

Args: image: The product photo — an asset handle (asset://), an http(s) URL, or a base64 data URI. It is ingested and normalized first. concept: Optional noun-phrase concept naming what to segment ("brown leather wallet"). When omitted, the identify planning step runs internally to produce the concept and alternates.

Calls SAM 3.1 with the concept phrase and decodes the returned mask (Meta's official parser, behind the sam_masks boundary). The mask is quality-checked — coverage sane (not empty, not ~the whole frame) and dominated by one connected region — and on a zero-match or a poor mask, all fixed identify phrases are evaluated and bounded phrase; every attempt is traced in the result. The foreground is the source pixels through the accepted mask, nothing regenerated. Storage is a lineage chain — mask parented to the source photo, foreground parented to the mask — so draw's fidelity receipt pins the exact mask asset the cut used. The input must be a source photo: handing cut_out a generated asset (a composite, a plate) is refused with NOT_A_SOURCE_PHOTO before any billing, because cutting generated pixels out would launder them into a protected foreground. Because a fidelity receipt can only vouch for the pixels a mask selected, the result also carries the selection's own review surface: mask_overlay_asset (the source photo with the mask's outline drawn on it) and mask_review (the mask's bounding box, fill, frame-edge contact, and any sanity warnings).

Failures return a structured error: NOT_CONFIGURED (no META_API_KEY; checked before billing, so no ledger write), NO_MATCH / POOR_MASK (no usable mask after the bounded attempts; the attempts' spend stays counted), BAD_MODEL_RESPONSE (SAM output unusable; spend counted). A planning failure inside the chain (concept omitted and identify failed) surfaces as that step's error code with plan_error attached.

identifyA

Plan the cut for a product photo (step inside the listing chain).

Args: image: The product photo — an asset handle (asset://), an http(s) URL, or a base64 data URI. It is ingested and normalized first.

Reads the photo with the vision model and returns the plan the chain consumes: a structured description, the noun-phrase concept suitable for text-prompted segmentation ("brown leather wallet") with at least two alternate phrasings the mask-recovery loop can retry with, plus listing copy (suggested_title, listing_bullets, condition_notes). When phrase hygiene had to change the model's own concept (a frame/medium phrase rewritten or promoted over), concept_rewritten_from names the phrase the model actually returned; it is None when the concept passed through intact. The call is billed through the spend-cap choke point and the result carries its actual cost and token usage.

Without META_API_KEY configured the tool returns a structured NOT_CONFIGURED error and makes no call (and no ledger entry). This tool exists to serve the chain; the sellable outputs are cut_out's transparent PNG and draw's staged composite with its fidelity receipt.

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

TDQS

A4.1/5.0

Scored across 3 tools

Disambiguation4/5

The three tools target distinct stages: identify plans/describes, cut_out segments to a transparent PNG, and draw stages the cut-out into a scene with a fidelity receipt. The main overlap is that cut_out can internally run identify when concept is omitted, so an agent may be unsure whether to call identify first, but the descriptions explicitly frame identify as a chain-serving step and name cut_out/draw as the sellable outputs.

Naming Consistency4/5

All names are lowercase imperative verbs (identify, cut_out, draw), which is a coherent verb-led convention. The only deviation is that cut_out is a verb-particle form while the others are single verbs, and 'draw' is a somewhat generic label for scene staging, but the set remains predictable and readable.

Tool Count4/5

Three tools map cleanly onto the photo-to-listing pipeline (identify -> cut_out -> draw), so each earns its place and the surface is well-scoped rather than bloated. identify is arguably an internal planning step that could be folded into cut_out, making the exposed surface slightly thinner than ideal.

Completeness3/5

The core lifecycle is covered end to end: plan the product, cut it out, and stage it with a fidelity receipt. However, draw references verify_receipt_from_disk as a way to recover receipts from the store, yet no such tool is exposed, and there is no tool for retrieving or listing assets, leaving notable gaps and a dead end for receipt verification.

Maintenance

ActivityMaintained
ResponsivenessNo recent community issues