Skip to main content
Glama

Derived Knowledge

manage_knowledge
Destructive

Build and query an in-memory semantic index and typed knowledge graph for a Novel source: check status, rank searches, and read one-hop relations. Rebuild after source edits; reads don't modify state.

Instructions

Manage derived, in-memory knowledge over Novel sources: a semantic index for advisory text ranking and a typed knowledge graph. index_build and graph_build are audited, replace the prior projection in one step, and do not persist a separate copy; both are safe to rebuild from the authoritative Novel file, which is never modified. Search and neighbor reads require the matching build and return one hop of edges or ranked candidates (limit defaults to 5); rebuild after editing or restoring the Novel. The read actions never mutate state. Use when: building or rebuilding the index or graph, checking staleness, ranking indexed items, or reading relations and graph structure. Do NOT use when: searching a bound ruleset's index — use manage_ruleset (action: search); recording knowledge — use manage_corpus; recording beliefs or perceptions — use manage_belief.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "action": "<action>"
    },
    "name": "manage_knowledge"
  }
}

Input Schema

NameRequiredDescriptionDefault
limitNoMaximum candidates to return (index_search; default 5).
queryNoQuery text to rank candidates against (index_search).
actionYesindex_* actions operate the semantic index; graph_* actions operate the knowledge graph.
item_idNoIndexed item id to filter relations (index_relations).
node_idNoGraph node id (graph_neighbors).

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. Addedv1.0.4

TDQS

A4.4/5.0
Behavior4/5

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

Beyond the annotations it discloses that builds are audited, replace the prior projection in a single step, store no separate copy, and are safe to rebuild because the authoritative Novel file is never modified — this materially scopes the destructiveHint=true flag. It also states reads never mutate state and that a rebuild is required after editing or restoring the Novel. The only slight gap is that idempotentHint=false is not reconciled with 'safe to rebuild'.

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?

Front-loaded with purpose, then build semantics, then read semantics, then explicit use/exclusion lists — a sensible ordering with no filler sentences. It is dense, and the build clause ('are audited, replace the prior projection in one step, and do not persist a separate copy') packs several ideas into one hard-to-parse sentence, which keeps it from 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 an eleven-action tool with mixed read and rebuild behaviors, the description covers what each action family does, the rebuild prerequisite, mutation safety, and alternatives; an output schema already exists so return shapes need not be restated. Nothing an agent needs to invoke it correctly appears to be missing.

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 coverage is 100%, so the schema already documents all five parameters and their action scoping, making 3 the baseline. The description adds some meaning the schema lacks, notably that reads return one hop of edges or ranked candidates and that limit defaults to 5, but it does not clarify query semantics or how item_id/node_id filtering behaves in practice.

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 names the resource precisely (derived in-memory knowledge over Novel sources) and splits it into its two concrete artifacts, a semantic index for advisory text ranking and a typed knowledge graph. The 'index_*' vs 'graph_*' grouping plus the explicit routing to manage_ruleset/manage_corpus/manage_belief makes it unmistakable among the many 'manage_*' siblings.

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 provides an explicit 'Use when' list (build/rebuild, check staleness, rank indexed items, read relations and graph structure) and a 'Do NOT use when' list that names three concrete alternative tools with their actions. The prerequisite rule that search/neighbor reads require the matching build is stated outright, leaving nothing to infer.

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