Skip to main content
Glama

Codex Library Management

manage_codex
Destructive

Manage the server-level codex library of reusable, cross-Novel content (NPCs, characters, scenes, encounters, lore, factions, rooms, things, templates, voice profiles, adventures).

Instructions

Manage the server-level codex library of reusable, cross-Novel content (NPCs, characters, scenes, encounters, lore, factions, rooms, things, templates, voice profiles, adventures). Entries persist to .holonovel-state/codex.json outside every Novel and survive restarts; mutations are audited. Out-of-play and badge-free: requires the Editor or Game Master badge, a Player mid-adventure gets [FORBIDDEN], and reads are not badge-filtered. When no Novel is active, the codex is the default store; import and capture require an active Novel. set needs kind + name (the id derives from them); merge=true shallow-merges content. Revert the most recent mutation with manage_history (action: undo). Use when: storing reusable content for later import, or enumerating/reading/deleting it. Do NOT use when: storing Novel-scoped content — use manage_lore (action: set) or manage_note (action: set).

Input Schema

NameRequiredDescriptionDefault
idNoEntry identifier or array of identifiers (for import/get/delete).
kindNoEntry kind (for set/list/capture).
nameNoEntry name (for set).
tagsNoOptional tags (for set).
mergeNoFor set: when true and the entry exists, shallow-merge the provided content into the stored content instead of replacing it.
actionYesset (create/update), list, get, capture (Novel artifact per kind), import (into active Novel), or delete.
contentNoEntry content (for set); when omitted on an existing entry, the stored content is preserved.
entry_idNoEntry identifier (for get/import/delete); alias of `id`.
entity_idNoEntity whose voice to capture (for capture, voice_profile kind).
source_idNoNovel artifact key/name/entity id to capture (for capture). Defaults per kind.
descriptionNoOptional description (for set).
update_sourceNoWhen true, update the source Codex entry in place (for capture).

Output Schema

NameRequiredDescriptionDefault
textNoHuman-readable text envelope mirroring the structured result (REQ-001, REQ-548a).
statusYesMachine-readable result status: OK, NEED_INPUT, WARNING, PARTIAL, or an error category (REQ-002, REQ-548c).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changedv1.0.5
    • changedInput schema / properties / content / description
      Previous value: -"Entry content (for set)."New value: +"Entry content (for set); when omitted on an existing entry, the stored content is preserved."
    • addedInput schema / properties / merge
      Added value: +{
      +  "description": "For set: when true and the entry exists, shallow-merge the provided content into the stored content instead of replacing it.",
      +  "type": "boolean"
      +}
    • removedInput schema / properties / visibility
      Removed value: -{
      -  "description": "library, shared, or private (for set).",
      -  "enum": [
      -    "library",
      -    "shared",
      -    "private"
      -  ],
      -  "type": "string"
      -}
  2. Addedv1.0.3

TDQS

A4.8/5.0
Behavior5/5

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

Annotations cover the mutation/destructive profile, and the description adds substantial context beyond them: persistence to .holonovel-state/codex.json, audit of mutations, the Editor/Game Master badge requirement, the [FORBIDDEN] outcome for an in-play Player, and the fact that reads are not badge-filtered. It also clarifies the default-store behavior when no Novel is active and the merge=true shallow-merge semantics.

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 front-loads the resource and scope before the badge/behavioral details and the use/don't-use routing. Every sentence carries load for a 12-parameter, multi-action tool; it is longer than ideal but not padded.

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?

Given the tool's complexity, an output schema is present (so return values need not be described), and the description supplies the missing scope, auth, persistence, and action-specific preconditions an agent needs to call it correctly. Nothing material is left out.

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, but the description adds value the schema lacks: that `set` requires `kind` + `name` and the id derives from them, plus how merge=true shallow-merges content. It does not attempt to explain the remaining 12 parameters, but the schema already documents those adequately.

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 (manage) plus the exact resource (the server-level codex library of reusable, cross-Novel content) and enumerates the entry kinds it holds. It explicitly distinguishes itself from siblings by naming manage_lore and manage_note as the tools for Novel-scoped content.

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?

Provides explicit 'Use when' (storing reusable content for later import, or enumerating/reading/deleting it) and 'Do NOT use when' (Novel-scoped content — use manage_lore or manage_note). It also preconditions import/capture on an active Novel and routes undo to manage_history.

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