Skip to main content
Glama

Add or update knowledge

kb_upsert
DestructiveIdempotent

Add source material for agents. Type URL crawls a page, TEXT stores pasted content. Three steps, and skipping either of the last two leaves the agent unchanged: add it here, attach it with kb_attach, then rebuild with agent_train. Storing material does not change how the agent writes — that is agent_upsert instructions. Requires the "Agents" permission on the plan.

Input Schema

NameRequiredDescriptionDefault
_idNoOmit to create a new entry.
urlNoRequired when type is URL.
typeYesFilter by type.
titleNoShort label.
contentNoRequired when type is TEXT.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.6/5.0
Behavior4/5

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

Annotations already declare destructiveHint=true and idempotentHint=true, so the description's add is context on top: it discloses the plan-level 'Agents' permission requirement and the workflow consequence of incomplete sequencing. It does not explain what overwriting via _id destroys, which is the one behavioral gap for a destructive upsert.

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

Conciseness5/5

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

Four short sentences, each doing distinct work: purpose, type semantics, workflow sequencing, intent boundary, and permission prerequisite. The most decision-relevant constraint, that material alone leaves the agent unchanged, is placed early.

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 five-parameter mutation tool with full schema coverage and no output schema, the description covers purpose, sequencing, prerequisites, and intent routing. The remaining gap is update semantics — whether supplying _id replaces prior content — which matters given destructiveHint=true.

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 baseline would be 3; the description earns above baseline by adding real meaning to the type enum — URL triggers a page crawl, TEXT stores pasted content — and by flagging the create-vs-update distinction implicit in _id. It stays silent on FILE, whose behavior is left entirely to the enum value.

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?

Specific verb+resource ('Add source material for agents') plus an explicit type breakdown (URL crawls a page, TEXT stores pasted content) tells the agent exactly what this tool does. It also carves out a boundary against the similarly named agent_upsert by stating that instructions are not stored here.

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?

The description lays out the required three-step sequence (add here, kb_attach, agent_train) and warns that skipping either of the last two leaves the agent unchanged — a concrete when/when-not statement naming both alternatives. It also names agent_upsert as the sibling for a different intent.

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