Skip to main content
Glama
3lehr
by 3lehr

knowledge_add

Add a knowledge node to a hierarchical store, requiring a parent path and a normative decision with reason to enforce provenance and prevent ambiguous facts.

Instructions

Add a new knowledge node to the tree. Specify parent_path to place it in the hierarchy. parent_path must already exist (or be '/'); an unknown parent_path is rejected with suggested nearby paths unless neuer_ast=True explicitly opens a new branch. source is required and rejected if empty -- e.g. "erzeugt aus /pfad/datei.md (Stand 2026-08-05T23:40:00+02:00)". norm_entscheidung is REQUIRED: 'keine_norm' (plain fact, no rank), 'norm_befristet' (norm with an end date) or 'norm_unbefristet' (norm without one). Omitting it, or combining it inconsistently with norm_rang/gilt_ab/gilt_bis, is rejected -- there is no default, because a silent default would recreate the exact ambiguity this field exists to remove (was a fact really decided to be non-normative, or did nobody look?). norm_rang/gilt_ab/gilt_bis stay optional inputs, but 'norm_befristet'/'norm_unbefristet' require norm_rang and gilt_ab to end up set (either given directly, or deterministically derived from source for directive/ADR imports -- ADR-034); 'norm_befristet' additionally requires gilt_bis, 'norm_unbefristet' requires gilt_bis stay unset. gilt_ab/gilt_bis must be ISO-8601 date or timestamp; gilt_bis before gilt_ab is rejected. Example -- raw material "Sozialtarif-Zuschlag entfaellt zum 01.03.2027 vollstaendig, loest die Uebergangsregelung von 2022 ab." -> {"parent_path": "/wissensnetz-pflegeverbund", "title": "Sozialtarif-Zuschlag entfaellt 01.03.2027", "summary": "Sozialtarif-Zuschlag entfaellt zum 01.03.2027, loest Regelung von 2022 ab.", "norm_rang": 2, "gilt_ab": "2027-03-01", "norm_entscheidung": "norm_unbefristet", "norm_entschieden_grund": "Uebergangsregelung 2022 laeuft aus, Nachfolgeregel greift direkt", "source": "erzeugt aus Rohmaterial (Beispiel)"}. norm_entschieden_grund is REQUIRED whenever norm_entscheidung is given (like grund on knowledge_zurueckziehen) -- a free-text reason for the decision. Who decided (norm_entschieden_von) is resolved automatically from your caller identity, not a separate input. When a rank-1/2 directive is the source, betreiber_weisung carries the exact quote and records the operator as decision-maker. anlass records what triggered this entry: 'selbst' (you wrote it unprompted) or 'betreiber' (an explicit human instruction, e.g. "merk dir das") are SELF-REPORTED -- only as reliable as the caller. 'hook' (the enforcing Stop-hook made you call this) and 'skript' (batch/migration/harvest run, no conversation) are objective in principle, but note the Stop-hook itself never calls this tool -- it only forces you to run /learn, which then calls this normally, so 'hook' is still self-reported by that skill, not verified by the server. Default 'unbekannt' if omitted. An unknown value is rejected with the allowed list, nothing is written. If up to 3 active nodes look content-similar (checked BEFORE writing), the response includes similar_node_hint -- a hint only, never auto-merged, no rejection either.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
kindNoKind of entry: 'arbeitsbestand' (working set, the default) or 'nachschlagewerk' (reference corpus -- may sit in the store as a distractor but is never the TARGET of a test case, see node 096669de). Set this for imported third-party material, otherwise it dilutes retrieval.arbeitsbestand
tagsNo
actorNoCalling agent identity; else BEGOD_KNOWLEDGE_ACTOR or unknown
kreisNoOptional: restrict this entry to one circle of people you belong to (BDW-E22). Empty (default) means everyone in your tenant. Set it AT CREATION -- narrowing it later already told everyone, via the hit count, that something exists.
modelNoCalling model; else BEGOD_KNOWLEDGE_MODEL or unknown
titleYes
sourceNoRequired unless abgeleitet_von is set (then it must be omitted -- the system generates it). Origin: file path, konsil ID, or research ID. Example: 'erzeugt aus /pfad/datei.md (Stand 2026-08-05T23:40:00+02:00)'
contentNoFull content (loaded only on read)
gilt_abNoOptional: ISO-8601 date/timestamp the norm takes effect
sessionNoStable session ID; else BEGOD_KNOWLEDGE_SESSION or unknown
summaryYes1-2 sentences summary (token-efficient)
gilt_bisNoOptional: ISO-8601 date/timestamp the norm expires; omit for indefinite. Must not be before gilt_ab.
occasionNoWhat triggered this entry -- selbst/betreiber self-reported, hook/skript objective in principle (see tool description). Default 'unbekannt'.unbekannt
neuer_astNoExplicitly allow creating a new top-level branch when parent_path doesn't exist yet
norm_rangNoOptional: rank of a norm (1=global directive, 2=hub directive, 3=ADR). Omit for plain facts.
project_idNoFree-form project slug (any app dir under <Verbundwurzel>/, e.g. 'fahrtenbuch', 'openlehr'), not a fixed set. Omit to derive it from a matching segment in parent_path (falls back to 'shared' if none matches); pass explicitly (including '') to override the derivation.
parent_pathYesParent node path, e.g. '/shared/arch' -- must exist
abgeleitet_vonNoOptional: id or path of an EXISTING source node. If set, source is generated by the system from the source node's kind (parent_path/norm_rang/tags, never its title/summary/content) -- giving your own source is rejected.
betreiber_weisungNoExact operator quote for a rank-1/2 instruction; at least 10 characters inside German opening and straight closing quotes.
norm_entscheidungYesREQUIRED (no default): keine_norm=plain fact/no rank, norm_befristet=norm with an end date, norm_unbefristet=norm without one. See tool description.
norm_entschieden_grundYesREQUIRED alongside norm_entscheidung: free-text reason for the decision (see tool description).

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. First observedv0.1.0

TDQS

A4.4/5.0
Behavior5/5

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

With no annotations, the description carries the full burden and does so thoroughly: it discloses rejection behaviors (unknown parent_path, empty source, inconsistent norm fields, unknown occasion values), confirms nothing is written on validation failure, states that similar-node hints are never auto-merged, and even flags the self-reported/unverified nature of 'hook'/'selbst' triggers. This goes far beyond what annotations could supply.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The content is dense and largely valuable, but it is delivered as one long unstructured paragraph with an embedded JSON example and a philosophical aside about why no default exists. It is front-loaded with the core purpose, but a structured format would make the many constraints easier to consume; not every sentence is strictly necessary.

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 21-parameter tool with no output schema and no annotations, the description covers an exceptional amount: required fields, validation, derivation, occasion semantics, similar-node hint behavior, and an end-to-end example. It is not a 5 because the general success return value is never described (only similar_node_hint is mentioned) and the anlass/occasion naming inconsistency creates ambiguity.

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 90%, so the baseline is 3; the description adds meaningful cross-field semantics — the norm_entscheidung consistency rules, requirement that norm_entschieden_grund is mandatory, gilt_bis/gilt_ab ordering, and the example of a full valid payload. It loses a point because it refers to the schema's 'occasion' parameter as 'anlass', which could cause an agent to pass the wrong key.

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 first sentence states a specific action and resource — adding a new knowledge node to the tree — and the rest confirms this is a creation tool. It clearly distinguishes itself from siblings like knowledge_update, knowledge_read, and knowledge_relation_add without needing their schemas.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It clearly frames when to call it (new node creation) and specifies strong preconditions: parent_path must exist or neuer_ast must be true, source must be non-empty, and norm_entscheidung/norm_entschieden_grund are mandatory with no default. It does not explicitly name sibling alternatives, so it falls short of a 5, but the context is much stronger than mere implication.

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

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/3lehr/brainlehr'

If you have feedback or need assistance with the MCP directory API, please join our Discord server