Skip to main content
Glama

Create or Update Agent Knowledge

upsert_knowledge
Destructive

Create a new agent knowledge base entry, or update one when id is provided. Mirrors POST /api/v1/knowledge. Creating requires title, content, and content_type.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idNoKnowledge item ID to update (omit to create).
tagsNo
titleNo
contentNo
categoryNo
business_idNoBusiness ID. Required for create when the token can access multiple businesses.
content_typeNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
errorNoPresent when success is false
successYesWhether the tool completed successfully
knowledgeNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4/5.0
Behavior3/5

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

Annotations already declare destructiveHint=true, so the agent knows this is a mutating operation. The description adds that it mirrors POST /api/v1/knowledge and that creating requires specific fields, which is useful. However, it doesn't disclose what happens on update (e.g., partial vs full replacement), whether updates are reversible, or any side effects. With annotations covering the destructive nature, a 3 is appropriate.

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?

Three sentences with zero waste. The core create/update distinction is front-loaded, the HTTP endpoint reference is useful context, and the required-fields note is placed at the end. Every sentence earns its place.

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 7-parameter mutation tool with an output schema, the description covers the essential decision (create vs update) and the required fields. The output schema presumably documents return values, so that gap is covered. What's missing is any note about validation rules or behavior on conflicting data, but the description is largely complete for an agent to invoke it correctly.

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 description coverage is only 29%, so the description must compensate. It does explain the key semantic distinction for `id` (omit to create, provide to update) and lists the required fields for creation. However, it doesn't clarify the meaning of tags, category, content_type, or business_id beyond what the schema already says. The description adds some value but doesn't fully compensate for the 71% coverage gap.

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 clearly states the tool's dual function: create a new knowledge base entry or update one when `id` is provided. It also names the exact HTTP endpoint it mirrors (POST /api/v1/knowledge), which is a specific verb+resource. This distinguishes it from sibling tools like list_knowledge and upsert_lead/upsert_product.

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?

The description gives clear context for when to use this tool: create when no id, update when id is provided. It also states required fields for creation (title, content, content_type). However, it doesn't explicitly mention when NOT to use it or name alternatives like list_knowledge for reading, so it misses the explicit exclusion guidance that would earn 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.