Token Add
token_addAdd 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
| Name | Required | Description | Default |
|---|---|---|---|
| x | Yes | Horizontal position in map units; upstream requires 0 <= x < map width. | |
| y | Yes | Vertical position in map units; upstream requires 0 <= y < map height. | |
| name | Yes | Display label for the new token; upstream requires nonempty text. | |
| layer | No | Rendering layer: token (default) or spirit; upstream validates it and applies visibility rules. | token |
| width | No | Horizontal token size in map units, integer 1..10; defaults to 1. | |
| height | No | Vertical token size in map units, integer 1..10; defaults to 1. | |
| map_id | Yes | Destination map ID in this campaign; discover it and its dimensions with map_list. | |
| visible | No | True requests a visible token; false requests a hidden token. Layer and role may further restrict visibility. | |
| image_url | Yes | Token artwork URL passed upstream; empty text is accepted as a placeholder by v1.4.0, with older behavior unverified. | |
| character_id | No | Existing sheet ID to link; empty string creates a token without a character link. | |
| controlled_by | No | User ID allowed to control the token, subject to upstream checks; null omits explicit assignment. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||