Skip to main content
Glama

Knowledge Corpus

manage_corpus
Destructive

Register, route, and control per-entity access to cold-reference corpus documents; record reads and inspect acquisitions for campaign knowledge.

Instructions

Manage the cold-reference knowledge corpus. corpus_register indexes a document; route derives its domain from a trusted source profile; grant and deny set per-entity access with the latest decision winning; consume records a read; access checks an entity against the recorded grants. Mutating actions persist access state and are audited; list, get, access, and acquisitions are read-only. Use when: registering, listing, reading, routing, granting/denying access, consuming, or inspecting acquisitions of corpus documents. Do NOT use when: writing Novel lore entries or secrets — use manage_lore. Revert the most recent mutation with manage_history (action: undo).

Input Schema

NameRequiredDescriptionDefault
actionYescorpus_register, corpus_list, corpus_get, corpus_route, corpus_grant, corpus_deny, corpus_access, corpus_consume, corpus_acquisitions.
corpus_bodyNoDocument reference text (corpus_register).
corpus_modeNoread, research, taught, or import (corpus_consume; default read).
corpus_titleNoDocument title (corpus_register).
corpus_deniesNoEntity ids explicitly denied access (corpus_register).
corpus_domainNoKnowledge domain (corpus_register/corpus_route/corpus_list).
corpus_grantsNoEntity ids explicitly granted access (corpus_register).
corpus_domainsNoKnowledge domains the entity may access (corpus_access).
corpus_entity_idNoEntity acquiring or inspected (corpus_consume/corpus_acquisitions/corpus_access/corpus_grant/corpus_deny).
corpus_document_idNoCorpus document id (corpus_get/corpus_route/corpus_grant/corpus_deny/corpus_consume).
corpus_access_publicNoWhether every entity may consume it (corpus_register; default false).
corpus_access_domainsNoKnowledge domains granted access (corpus_register).
corpus_source_profileNoTrusted source profile the domain is routed from (corpus_register; default manual).

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. Changed12 schema fields changedv2026.10.13
    • removedInput schema / properties / badge_scope
      Removed value: -{
      -  "description": "game_master or shared (set/update).",
      -  "enum": [
      -    "game_master",
      -    "shared"
      -  ],
      -  "type": "string"
      -}
    • removedInput schema / properties / content
      Removed value: -{
      -  "description": "Lore content (set/update).",
      -  "type": "string"
      -}
    • removedInput schema / properties / data
      Removed value: -{
      -  "description": "JSON or Markdown lorebook data (import).",
      -  "type": "string"
      -}
    • removedInput schema / properties / entity_id
      Removed value: -{
      -  "description": "Entity to reveal to / whose knowledge to read (reveal/knowledge).",
      -  "type": "string"
      -}
    • removedInput schema / properties / format
      Removed value: -{
      -  "description": "Optional output format (export).",
      -  "type": "string"
      -}
    • removedInput schema / properties / group
      Removed value: -{
      -  "anyOf": [
      -    {
      -      "type": "string"
      -    },
      -    {
      -      "type": "null"
      -    }
      -  ],
      -  "description": "Group name, or null to clear (set/update/group)."
      -}
    • removedInput schema / properties / key
      Removed value: -{
      -  "description": "Lore key (set/update/remove/toggle/group/get).",
      -  "type": "string"
      -}
    • removedInput schema / properties / mode
      Removed value: -{
      -  "description": "dry-run, merge, or replace (import).",
      -  "enum": [
      -    "dry-run",
      -    "merge",
      -    "replace"
      -  ],
      -  "type": "string"
      -}
    • removedInput schema / properties / priority
      Removed value: -{
      -  "description": "Optional priority (set/update).",
      -  "type": "number"
      -}
    • removedInput schema / properties / sticky
      Removed value: -{
      -  "description": "Optional sticky weight (set/update).",
      -  "type": "number"
      -}
    • removedInput schema / properties / triggers
      Removed value: -{
      -  "description": "Optional recall triggers (set/update).",
      -  "items": {
      -    "type": "string"
      -  },
      -  "type": "array"
      -}
    • removedInput schema / properties / world_target
      Removed value: -{
      -  "description": "Optional world-model target reference (set/set_secret).",
      -  "type": "string"
      -}
  2. Added
  3. Removedv1.0.5
  4. Addedv1.0.3

TDQS

A4.5/5.0
Behavior4/5

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

The annotations only say destructiveHint=true and readOnlyHint=false for the whole tool, so the description adds real value by partitioning the nine actions: list, get, access, and acquisitions are read-only while the rest persist state and are audited. It also discloses the conflict rule ('latest decision winning') and points to undo. It stops short of saying what a deny or unregister actually removes or whether access decisions are reversible outside manage_history.

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 opening purpose line is front-loaded and the use-when / do-not-use-when structure is easy to scan. The middle action-gloss sentence is dense but each clause carries distinct information; no filler or restated title.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 13-parameter, nine-action tool with full schema coverage, annotations, and an output schema, the description supplies the action semantics, the mutating/read-only split, and the sibling routing an agent needs. The remaining gap is the access-model detail (how per-entity grants, domains, and access_public combine), which the description only gestures at.

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, and the description genuinely adds meaning beyond the enum names: 'route derives its domain from a trusted source profile', 'consume records a read', 'access checks an entity against the recorded grants'. That clarifies the intent of corpus_route and corpus_access, which the schema only labels. It does not explain the grants/denies vs access_domains vs access_public interplay explicitly.

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 opens with a specific resource ('cold-reference knowledge corpus') and then enumerates what each of the nine actions does, so an agent can tell corpus operations apart from other 'manage_*' siblings without opening the schema. It explicitly contrasts itself with manage_lore for Novel lore/secrets, which pins down the boundary.

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 has an explicit 'Use when:' list covering all intended actions, an explicit 'Do NOT use when:' routing to manage_lore, and a third pointer to manage_history (action: undo) for reversals. Both the positive cases and the exclusion are stated, leaving nothing to inference.

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