Skip to main content
Glama

add

Create a semantic UI node in a screen's scene graph by specifying its type, parent container, and props. Build layouts without absolute coordinates.

Instructions

Add one semantic node. parent is a container id, root, or overlay. 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","parent":"root","type":"button","name":"pay_btn","props":{"text":"Pay","w":"fill"}}.

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>",
      "parent": "<parent>",
      "type": "<type>"
    },
    "name": "add"
  }
}

Input Schema

NameRequiredDescriptionDefault
nameNoLowercase identifier matching [a-z][a-z0-9_]{0,31}
typeYes
indexNo
propsNoType-specific prop patch; null removes an existing prop. annotation is also accepted here.
parentYesLowercase identifier matching [a-z][a-z0-9_]{0,31}
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.9/5.0
Behavior4/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 substantive behavior: layer overlaps its children, anchors apply only to a layer's direct children, and several node types are placement-restricted. It does not state what happens on duplicate names, whether the node is undoable, what the call returns, or what errors occur on invalid nesting, which are notable gaps for a mutation tool with zero annotation coverage.

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?

Content is front-loaded correctly with purpose first, then parent semantics, then props, and almost every clause carries real information. But it is delivered as one dense run-on block mixing container rules, per-type props, icon enums, and an example, with no structure an agent can scan quickly.

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

Completeness4/5

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

For a 25-type node DSL with no annotations and no output schema, the description covers the domain thoroughly enough to construct a valid call, and the example anchors the shape. Outstanding gaps are the undocumented index parameter, uniqueness/error behavior, and any indication of what the call returns.

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?

The schema treats props as a free-form object with no per-type detail, so the description's exhaustive prop grammar (w/h, dir, gap, pad, align, justify, fill, per-type props, icon name list) is the only source of that meaning and is a major value-add. Coverage is incomplete, however: the index parameter is never mentioned anywhere, and the example is the only place screen and name usage is illustrated.

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?

Opens with a specific verb and resource: "Add one semantic node," which separates it from siblings like remove, update, and move. The remainder of the description is a prop grammar reference rather than sibling differentiation, so an agent must infer from names alone when to prefer batch or update instead of add.

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?

Gives clear contextual constraints: parent must be a container id, root, or overlay; drawer is layer-only; modal is overlay-only; sidebar is desktop-only; list accepts only list_item children; tabs accept container panels. These are real when/where rules, but there is no explicit statement of when to choose add versus batch or update, nor any exclusion or prerequisite (e.g., must the screen already exist).

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