Skip to main content
Glama

Token Add

token_add

Add a manually configured token to a campaign map as a DM. Specify name, image, position, and size; optionally link a character sheet or set visibility.

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. visible and controlled_by govern display/control subject to server permissions. 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

TableJSON 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

TableJSON 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?

Annotations already indicate this is a non-readonly, non-idempotent operation, and the description builds on that with valuable nuance: persistence does not confirm broadcast, clients should inspect events_poll or the VTT for visibility, upstream validates bounds/layer, and server permissions can restrict visible/controlled_by. It also clearly flags non-idempotency for repeated calls.

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 description is dense but not bloated. It front-loads the core purpose and sibling routing before parameter behavior and return semantics. Each sentence contributes useful information, though a few points (width/height ranges, visible/controlled_by) restate schema details and could be trimmed without losing value.

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?

For a tool with 11 parameters, 5 required fields, an output schema, and asynchronous broadcast behavior, the description covers all essential context: DM-only access, tool alternatives, parameter semantics, validation behavior, non-idempotency, broadcast uncertainty, and error return conventions. Nothing needed for correct invocation is missing.

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 the baseline is 3; the description adds worthwhile operational context beyond the schema by noting position uses map units subject to upstream bounds/layer checks, width/height are 1..10 integers, and visible/controlled_by are subject to server permissions. It also clarifies that character_id optionally links an existing sheet.

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?

The description names a specific verb ('Create'), a precise object ('a manually configured token on a campaign map'), and adds a scope restriction ('DM only'). It explicitly distinguishes this tool from sibling tools token_place_creature, token_move, and character_create, making its purpose unambiguous.

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?

The description gives explicit routing guidance: use token_place_creature when a library template's name/image is needed, token_move for an existing token, and character_create when a new sheet is needed. It also clarifies what this tool does NOT do ('This creates only a token'), which prevents misuse.

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