Skip to main content
Glama

Upsert view variant

upsert_view_variant
Idempotent

Add a variant to a screen view. Name exactly one source: text_content for a stage-1 sketch (stored as TEXT, so it survives the document being overwritten), mockup_id to take a rendering from support-ai-ze (brings its image, HTML source, AI flag and creation time), or image_id for an image already in this Mappe — that last one is how an existing loose image is attached to a view afterwards. set_effective marks it as the one that goes into a submission; without it the fallback order decides.

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": {
      "view_id": "<view_id>",
      "stage": "<stage>"
    },
    "name": "upsert_view_variant"
  }
}

Input Schema

NameRequiredDescriptionDefault
is_aiNo
labelNoTells two variants of the same stage apart, e.g. "schematic" vs "OSM basis".
stageYes1 = sketch in characters, 2 = rendered HTML, 3 = designed image.
view_idYes
image_idNo
mockup_idNo
captured_atNoWhen it was CREATED, ISO. Defaults to the mockup's provenance or the image row.
html_sourceNo
text_contentNoThe sketch. Stage 1 only.
set_effectiveNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.9/5.0
Behavior4/5

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

Annotations cover the safety profile (non-destructive, idempotent, closed-world), and the description adds real behavior beyond them: text is stored as TEXT so it survives document overwrite, mockup_id copies image/HTML/AI flag/creation time, and without set_effective a fallback order decides effectivity. What is still undisclosed is what "upsert" does to an existing variant — merge, overwrite, or replace.

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

Conciseness4/5

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

Front-loaded with the action, then a single parallel clause set for the three mutually exclusive sources, ending with the effectivity note. Dense but nearly every clause carries information; the support-ai-ze parenthetical is slightly over-explained.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 10-parameter mutation tool the source-selection story is complete, but the identity/upsert semantics (what key replaces what, and whether stage changes create or overwrite) are missing, and no output schema exists to fill that in. Adequate, not complete.

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 only 40%, and the description compensates well: it gives semantics for image_id, mockup_id and set_effective (none of which the schema explains) and clarifies when text_content applies. Undocumented remainders are view_id, is_ai and html_source, which are left to the caller to guess.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

Names a specific verb and resource ("Add a variant to a screen view") and immediately disambiguates the three ways a variant can be sourced. It does not, however, explain the "upsert" half of the name (that an existing variant for the same view/stage may be replaced) nor distinguish itself from the sibling set_effective_view_variant.

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?

Explicitly maps each source parameter to a situation: text_content for a stage-1 sketch, mockup_id to pull a rendering from support-ai-ze, image_id to attach an existing loose image afterwards. The gap is routing guidance — it never says whether to use the set_effective parameter here or the dedicated set_effective_view_variant tool.

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