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 may edit (their own, or any for an admin with Admin Mode on). The row appears in the sheet's Companions section. Mode is decided by ownership: 'owned' for a character the Main character's owner 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

NameRequiredDescriptionDefault
idYesMongo `_id` of the Main character (owned by the calling user, or any character for an admin with Admin Mode on) the companion is attached to.
modeYes'owned' when the Main character's owner owns the companion character (edits then write through to that character's own document; vault answers 403 otherwise). 'link' for a character anyone 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

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • changedInput schema / properties / id / description
      Previous value: -"Mongo `_id` of the Main character (owned by the calling user) the companion is attached to."New value: +"Mongo `_id` of the Main character (owned by the calling user, or any character for an admin with Admin Mode on) the companion is attached to."
    • changedInput schema / properties / mode / description
      Previous value: -"'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'."New value: +"'owned' when the Main character's owner owns the companion character (edits then write through to that character's own document; vault answers 403 otherwise). 'link' for a character anyone 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'."
  2. First observed

TDQS

A4.6/5.0
Behavior5/5

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

Annotations only declare the generic mutability profile (readOnly false, idempotent false, destructive false); the description goes well beyond by disclosing that 'owned' rows write through with no copy and no character-slot consumption, that 'link' never writes the source, that the same source can be attached repeatedly as independent rows, and by telling the caller to adopt the returned updatedAt as the fresh stamp for follow-up writes.

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 purpose and mode rule are front-loaded in the first two sentences and each remaining sentence carries information (ownership rule, write-through behavior, response shape). It is dense and somewhat redundant with the schema's mode text, which keeps it short of a 5.

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 3-parameter mutation with an output schema, everything an agent needs is present: eligibility, mode selection, side effects on source documents, multiplicity semantics, and the follow-up-write stamp. Return values themselves are covered by the output schema, so no gap remains.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100% and the schema's own `mode` description is unusually thorough (enum semantics, 403 condition, clone-then-attach path), so the description largely restates rather than extends parameter meaning. The only added guidance, the updatedAt stamp, concerns the response rather than an input parameter, making the baseline 3 appropriate.

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 precise verb (attach) and resource (a buddy/companion of enumerated kinds) to a Main character, and immediately bounds who may edit that character (owner, or admin in Admin Mode). It also names the sibling operations an agent might otherwise confuse it with (vault_update_character, vault_update_companion_state, vault_clone_character).

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 gives an explicit decision rule for choosing between the two modes ('owned' by ownership vs 'link' for someone else's character), states the failure condition (403 otherwise), and names an alternative workflow for a case this tool does not serve ('To get a fully-editable copy ... vault_clone_character it first, then attach with mode owned').

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