Skip to main content
Glama

Set agent knowledge bases

set_agent_knowledge_bases
Destructive

Replace the list of knowledge bases an AI agent searches (at most 20; [] removes them all). Every base must be an active base of the agent's project; a refusal changes nothing.

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": {
      "project_id": "<project_id>",
      "agent_id": "<agent_id>",
      "knowledge_base_ids": "<knowledge_base_ids>"
    },
    "name": "set_agent_knowledge_bases"
  }
}

Input Schema

NameRequiredDescriptionDefault
agent_idYes
project_idYesThe workspace project the knowledge base belongs to.
organization_idNoOptional. Defaults to the authenticated workspace; when supplied it must be that workspace's id.
knowledge_base_idsYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already declare destructiveHint=true and readOnlyHint=false, so the mutation risk is known; the description goes further by disclosing replacement-not-append semantics, the 20-item cap, the empty-array clearing behavior, the constraint that each base must be active in the agent's project, and the all-or-nothing failure mode ("a refusal changes nothing"). That atomicity guarantee is genuinely valuable context an agent cannot get from the annotations. It does not explain what a refusal looks like or mention permission scope.

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?

Two short sentences with the operation and limits front-loaded before the failure-mode caveat. No filler, and every clause adds information.

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 destructive set-replacement tool with no output schema and no nested objects, the description covers bounds, clearing, validation constraints, and error atomicity. Only permission/authorization expectations and the shape of a refusal are absent.

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 50%: project_id and organization_id are documented in the schema, while agent_id and knowledge_base_ids have none. The description partly compensates for the latter by supplying the 20-item maximum and the `[]`-clears semantics, but it says nothing about agent_id, so half the parameters still rely solely on the schema. The baseline 3 fits.

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?

States a specific verb ("Replace") and a precisely scoped resource ("the list of knowledge bases an AI agent searches"), with the full-replacement semantics made explicit. It distinguishes itself from the read-side sibling get_agent_knowledge_bases by implication of "Replace" rather than naming an alternative, so it stops just short of 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 Guidelines3/5

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

Usage is implied through the operational bounds: at most 20 entries, and `[]` clears the set entirely, which tells an agent how to perform a full removal. There is, however, no explicit statement of when to reach for this versus get_agent_knowledge_bases or the knowledge-base creation tools, and no preconditions such as required permissions.

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.