Skip to main content
Glama

update

Merge a prop patch into a wireframe node; use null to delete a key and annotation to set or remove the node annotation.

Instructions

Merge a prop patch; null deletes a key and annotation sets/removes the node annotation. Props: every node accepts w=hug|fill|integer and h=hug|fill|integer. Containers are stack,layer,card,navbar,sidebar,modal,drawer,list,list_item,tabs and accept dir=v|h, gap, pad, align=start|center|end, justify=start|center|end|between, fill=none|faint|light|dark. A layer overlaps children; its direct children may use anchor=stretch|top_start|top|top_end|start|center|end|bottom_start|bottom|bottom_end. A drawer{title,side=left|right|bottom,open} is layer-only; list accepts only list_item children; tabs accept container panels; modal is overlay-only; sidebar is desktop-only. navbar{title,back}; modal{title,dismiss}; list{dividers}; list_item{title,subtitle,leading,trailing,to}; tabs{active}; text{text,variant=h1|h2|h3|body|caption|label,muted,align,to}; button{text,label,variant=primary|secondary|ghost|danger|fab,icon,pressed,to}; input{label,placeholder,value,kind=text|email|password|number|search,error}; textarea{label,placeholder,rows}; select/radio_group{label,options,value}; checkbox{label,checked}; toggle{label,on}; image{label,aspect=16:9|1:1|4:3}; icon{icon,size,to}; avatar{label,size}; badge{text,tone=neutral|success|warn|danger}; table{columns=string array,rows=0..100 integer placeholder-row count}. Icon names: menu,close,search,back,chevron_right,chevron_down,plus,minus,check,user,settings,home,bell,heart,star,trash,edit,filter,calendar,upload,download,more,cart,info,warning,compass,locate,play,stop. Example: {"screen":"checkout","id":"pay_btn","props":{"variant":"primary","annotation":"Disabled until valid"}}.

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": {
      "screen": "<screen>",
      "id": "<id>",
      "props": "<props>"
    },
    "name": "update"
  }
}

Input Schema

NameRequiredDescriptionDefault
idYesLowercase identifier matching [a-z][a-z0-9_]{0,31}
propsYesType-specific prop patch; null removes an existing prop. annotation is also accepted here.
screenYesLowercase identifier matching [a-z][a-z0-9_]{0,31}

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.5/5.0
Behavior3/5

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

With no annotations, the description carries the full burden and does disclose key mutation semantics: merge behavior, that null deletes a key, and that 'annotation' sets/removes a node annotation. It also documents structural validity constraints (drawer is layer-only, list accepts only list_item children, sidebar is desktop-only). What is missing is failure behavior — what happens if the id or screen does not exist, whether invalid props are rejected or dropped, and any permission or atomicity notes.

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?

The first sentence is front-loaded with the operation, the null-delete rule, and the annotation special case, so the critical semantics come first. The remainder is a dense but largely non-redundant reference catalogue; the main flaw is that it is delivered as one unstructured run-on block rather than being grouped or pushed into the schema where enumerations belong.

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 mutation tool with no annotations and no output schema, the definition explains inputs thoroughly but says nothing about the return value (updated node? tree? acknowledgement) or error cases such as unknown screen/id or invalid prop keys. Complete on the 'what can I set' axis, incomplete on the 'what do I get back and what can fail' axis.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the baseline would be 3, but the schema's 'props' is an unconstrained additionalProperties object with no detail whatsoever. The description supplies the entire prop vocabulary: universal w/h rules, per-container dir/gap/pad/align/justify/fill enums, anchor values for layer children, allowed children per container, per-node-type prop lists, and the full icon-name set. This is meaning the schema cannot provide and goes well beyond baseline.

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?

The opening clause 'Merge a prop patch' names a specific operation, and the example makes clear it targets a node via screen+id. It is distinguishable from siblings like add/remove/move, though the definition never explicitly states the add-vs-update boundary or that the node must already exist.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

There is no when-to-use guidance at all: nothing says when to prefer this over add, remove, batch, or move, and no preconditions (node must exist, document must be open) are stated. The reader must infer the update-vs-create boundary from the word 'patch' alone.

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