Skip to main content
Glama

Replace a knowledge base

replace_knowledge_base
DestructiveIdempotent

Replace a knowledge base

Replaces the name and content; tags change only when sent. A knowledge base can be shared by several agents and the change reaches all of them, so it is refused (403 shared_with_other_agents) unless the key can act on every agent using it. The answer's message_weight says what the agent now reads (Main Instructions, active knowledge, active attachments' text, in characters) and what one of its replies costs; when it has a notice, pass it on to the user.

Input Schema

NameRequiredDescriptionDefault
nameYes
tagsNo
contentYesStored and given to the AI exactly as sent; send plain text. The dashboard shows content as rich text, so text shaped like an HTML tag, such as a placeholder in angle brackets, does not appear there and is lost if someone edits the entry in the dashboard.
agent_idYesThe agent the resource belongs to. Another company's agent, or the nil UUID, is `404 agent_not_found`; an agent outside the key's agent list is `403 agent_not_authorized`.
knowledge_base_idYesA knowledge base linked to the agent. One that is not is `404 not_found`.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.3/5.0
Behavior5/5

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

Annotations already declare destructiveHint=true and idempotentHint=true, but the description adds the blast radius (a shared knowledge base changes for every agent using it), the exact authorization refusal and error code, and the response contract including `message_weight` and the instruction to relay any `notice` to the user. Since there is no output schema, that return-shape detail is genuine added value.

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 replacement scope is front-loaded in the first clause, followed by the sharing/permission risk and then the response semantics — a sensible risk-first ordering. The `message_weight` sentence is dense and parenthetical but earns its place because no output schema exists to carry it.

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 destructive, idempotent write with five parameters and no output schema, the description covers what is replaced, what is not, the failure mode, the authorization precondition, and the meaning of the response fields. An agent has enough to call it correctly and to relay results to the user without further inference.

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 60%, with `name` and `tags` undocumented in the schema. The description compensates for the most consequential gap by explaining that omitting `tags` leaves them unchanged while `name` and `content` are replaced — a distinction an agent cannot infer from the schema alone. The `content` caveat is already in the schema, so nothing further is added there.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a specific verb and resource and immediately narrows the scope: "Replaces the name and content; `tags` change only when sent." That distinguishes it from create_knowledge_base and delete_knowledge_base by implication (it is the update path), though no sibling is named explicitly, which keeps it below a 5.

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 gives a concrete operating condition — the shared-by-several-agents case is refused with `403 shared_with_other_agents` unless the key can act on every agent using it — which tells the agent both when it will fail and why. It also clarifies partial-update semantics for `tags`. It stops short of naming alternatives or listing when not to use it, so not a 5.

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