Skip to main content
Glama

batch

Applies up to 100 add, update, move, or remove operations to a screen in one atomic call, letting you build or restructure a wireframe in a single step while referencing new nodes from earlier operations.

Instructions

Atomically apply 1..100 add/update/move/remove ops. Later id/parent fields may use $N for a preceding add operation index. 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","ops":[{"op":"add","parent":"root","type":"stack","name":"form"},{"op":"add","parent":"$0","type":"input","name":"email","props":{"label":"Email"}}]}.

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>",
      "ops": "<ops>"
    },
    "name": "batch"
  }
}

Input Schema

NameRequiredDescriptionDefault
opsYes
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.7/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 well: it discloses atomicity, the 100-op ceiling, the ordering dependency that later id/parent fields may reference a preceding add via $N, and structural constraints (drawer is layer-only, list accepts only list_item children, tabs accept container panels, modal is overlay-only, sidebar is desktop-only). It does not say what happens on partial failure beyond 'atomically', nor what the response contains (e.g., ids of newly created nodes), which is the main remaining gap for a mutation tool.

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?

The lead sentence is correctly front-loaded and the trailing example is genuinely useful. However, the middle is a dense telegraphic wall of prop grammar with no sections or line breaks, mixing container rules, per-type props, and icon names into one run-on paragraph, which makes scanning for a specific node type slow.

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 high-complexity batch mutation over 24 node types with no output schema and no annotations, the description is unusually complete on the node grammar, ordering semantics, and container constraints. It falls short on transactional behavior details (rollback/partial-failure outcome) and on return values or how an agent learns the ids assigned to added nodes.

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 50%, and the description compensates heavily for the free-form `props` object by enumerating per-type prop vocabularies and enum values (e.g., button variant=primary|secondary|ghost|danger|fab, badge tone=neutral|success|warn|danger, table rows=0..100) that the schema does not express at all. It also clarifies $N reference syntax for parent/id. The `screen` parameter is never explained — which screen the batch targets or whether it must exist — leaving one of two required params undefined in prose.

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 first clause states a specific verb and resource: atomically apply 1..100 add/update/move/remove ops. That clearly separates it from the single-op siblings (add, move, remove, update) by scope and atomicity, but those siblings are never named, so the differentiation is inferred rather than stated.

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

Usage Guidelines3/5

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

Usage is implied by 'Atomically apply 1..100 ops' — an agent can reason that multi-node edits belong here rather than in repeated single-op calls. There is no explicit when-to-use/when-not guidance, no note about preferring this over sequential add/move/update calls, and no prerequisite conditions such as whether the target screen must already exist.

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