Skip to main content
Glama

Token Add

token_add

Create a manually configured token on a campaign map (DM only). Use token_place_creature for a library template's name/image, token_move for an existing token, and character_create when a new sheet is needed.

Instructions

Create a manually configured token on a campaign map (DM only). Use token_place_creature for a library template's name/image, token_move for an existing token, and character_create when a new sheet is needed. This creates only a token; character_id optionally links an existing sheet. Position uses map units; upstream checks map bounds and layer. Width/height are integer sizes in 1..10. Newer servers require whole-square coordinates and clamp the token footprint; use returned coordinates and preserve server refusals instead of rounding input. visible and controlled_by govern display/control subject to server permissions. When controlled_by is omitted, v1.5.0 may autoassign the bound character owner; null means omit the wire field, not send null. Image access and campaign assignment remain upstream checks. REST returns persisted=true,broadcast_confirmed=false; inspect events_poll or the VTT for visibility, since persistence does not confirm a broadcast. Every accepted call creates another token, so repeated calls are not idempotent. Returns {ok:true,data} on success; tool-body failures return {ok:false,error} with optional diagnostic data. Argument-schema errors are MCP errors.

Input Schema

NameRequiredDescriptionDefault
xYesHorizontal position in map units; upstream requires 0 <= x < map width.
yYesVertical position in map units; upstream requires 0 <= y < map height.
nameYesDisplay label for the new token; upstream requires nonempty text.
layerNoRendering layer: token (default) or spirit; upstream validates it and applies visibility rules.token
widthNoHorizontal token size in map units, integer 1..10; defaults to 1.
heightNoVertical token size in map units, integer 1..10; defaults to 1.
map_idYesDestination map ID in this campaign; discover it and its dimensions with map_list.
visibleNoTrue requests a visible token; false requests a hidden token. Layer and role may further restrict visibility.
image_urlYesToken artwork URL passed upstream; empty text is accepted as a placeholder by v1.4.0, with older behavior unverified.
character_idNoExisting sheet ID to link; empty string creates a token without a character link.
controlled_byNoUser ID allowed to control the token, subject to upstream checks; null omits explicit assignment.

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed13 schema fields changedv0.3.0
    • addedInput schema / properties / character_id / description
      Added value: +"Existing sheet ID to link; empty string creates a token without a character link."
    • addedInput schema / properties / controlled_by
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "User ID allowed to control the token, subject to upstream checks; null omits explicit assignment."
      +}
    • addedInput schema / properties / height / description
      Added value: +"Vertical token size in map units, integer 1..10; defaults to 1."
    • changedInput schema / properties / height / type
      Previous value: -"number"New value: +"integer"
    • addedInput schema / properties / image_url / description
      Added value: +"Token artwork URL passed upstream; empty text is accepted as a placeholder by v1.4.0, with older behavior unverified."
    • addedInput schema / properties / layer / description
      Added value: +"Rendering layer: token (default) or spirit; upstream validates it and applies visibility rules."
    • addedInput schema / properties / map_id / description
      Added value: +"Destination map ID in this campaign; discover it and its dimensions with map_list."
    • addedInput schema / properties / name / description
      Added value: +"Display label for the new token; upstream requires nonempty text."
    • addedInput schema / properties / visible / description
      Added value: +"True requests a visible token; false requests a hidden token. Layer and role may further restrict visibility."
    • addedInput schema / properties / width / description
      Added value: +"Horizontal token size in map units, integer 1..10; defaults to 1."
    • changedInput schema / properties / width / type
      Previous value: -"number"New value: +"integer"
    • addedInput schema / properties / x / description
      Added value: +"Horizontal position in map units; upstream requires 0 <= x < map width."
    • addedInput schema / properties / y / description
      Added value: +"Vertical position in map units; upstream requires 0 <= y < map height."
  2. First observedv0.1.0

TDQS

A4.8/5.0
Behavior5/5

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

Goes far beyond annotations: explains non-idempotency ('every accepted call creates another token'), coordinate clamping and whole-square requirements on newer servers, the controlled_by autoassign/null-vs-omit distinction, REST persisted=true but broadcast_confirmed=false, and the recommendation to inspect events_poll or the VTT. Also describes upstream permission/bounds/image checks and the ok/error return shape. This is exactly the behavior an agent cannot infer from annotations alone.

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?

Dense but well structured, with purpose and alternatives first, then behavioral caveats, then return semantics. It is longer than typical but nearly every sentence carries operational value for an 11-parameter, version-sensitive mutation tool. Minor redundancy around persistence/broadcast could be tightened.

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

Completeness5/5

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

Output schema exists, yet the description still adds the important success/error distinction (tool-body {ok:false,error} versus MCP argument-schema errors) and the broadcast caveat. Combined with DM-only scope, upstream checks, and idempotency, an agent has what it needs to call this correctly and interpret ambiguous results.

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 100%, so baseline is 3; the description adds value by clarifying map-unit coordinates, integer 1..10 width/height, the controlled_by null-versus-omitted wire semantics, and what character_id linking does. It doesn't re-document every parameter, but the added semantics are meaningful beyond the schema.

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

Purpose5/5

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

States a specific verb, resource, scope, and audience: 'Create a manually configured token on a campaign map (DM only).' It immediately names the sibling tools it is not (token_place_creature, token_move, character_create), so an agent can select it without opening other schemas.

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

Usage Guidelines5/5

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

Explicit routing: use token_place_creature for library templates, token_move for existing tokens, character_create when a new sheet is needed, and this tool only for a manually configured token. That covers when to use and when not to use in a single front-loaded sentence.

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