Skip to main content
Glama

Embers: Tabletop RPG Toolkit

Attach a companion to a character

vault_attach_companion

Attach a buddy (animal companion, hireling, follower, granted NPC, stock monster) to a Main character the user owns. The row appears in the sheet's Companions section. Mode is decided by ownership: 'owned' for a character the user already owns (its values are then edited on its own document via vault_update_character — the row is a live window, no copy is made, no character slot is used); 'link' for a character someone else owns (the source is never written; track its hit points and uses via vault_update_companion_state). The same source may be attached more than once — each row is independent. Response is { companion, companions, updatedAt }; ADOPT the returned updatedAt as the Main character's fresh stamp for any follow-up write.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesMongo `_id` of the Main character (owned by the calling user) the companion is attached to.
modeYes'owned' when the calling user owns the companion character (edits then write through to that character's own document; vault answers 403 if the user does not own it). 'link' for a character someone else owns — stock monsters, a GM's NPC — tracked via a local overlay that never writes to the source. To get a fully-editable copy of a creature the user does NOT own, vault_clone_character it first, then attach the copy with mode 'owned'.
characterIdYesMongo `_id` of the character to attach as the companion.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.8/5.0
Behavior5/5

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

Annotations are all false, so the description carries the burden. It clearly discloses that no copy is made, no character slot is used, the source is never written in link mode, rows are independent, and that the returned updatedAt must be adopted as a fresh stamp. No contradiction with annotations.

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 fairly long but every sentence carries essential information: purpose, mode behavior, side effects, and response handling. It is front-loaded with the main action and results. Minor redundancy (e.g., restating the mode in the schema) but overall efficient and well-structured.

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 moderate-complexity tool with three parameters and an output schema (mentioned but not shown), the description covers the operation, side effects, cross-tool usage, and how to handle the response. Nothing an agent needs to call it correctly 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 schema already documents all three parameters. The description adds value by reinforcing the mode semantics (403 if not owned, cloning path) and by explaining the response's updatedAt significance. This goes beyond the schema, though it doesn't add new syntax details for id/characterId.

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 states a specific verb ('Attach') and resource ('buddy... to a Main character'), and clarifies the result (row in Companions section). It distinguishes from siblings by referencing vault_update_character, vault_update_companion_state, and vault_clone_character, so an agent can easily tell it apart.

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?

It explicitly defines when to use 'owned' vs 'link' based on ownership, explains the prerequisite of cloning for non-owned creatures, and notes that the same source may be attached multiple times. This is precise and directly guides tool selection and mode.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources