Skip to main content
Glama

Set an agent's knowledge

set_agent_knowledge
DestructiveIdempotent

Choose which knowledge an AI agent may use. Send the full list of ids from list_knowledge; an empty list lets it use everything. The next call uses the change. Admins only. Ask the user to confirm before calling this tool.

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": {
      "agent_id": "<agent_id>",
      "knowledge_ids": "<knowledge_ids>"
    },
    "name": "set_agent_knowledge"
  }
}

Input Schema

NameRequiredDescriptionDefault
agent_idYesAgent id from list_agents
workspace_idNoLeave empty to act in the connected organization, which is the usual case. Set it only when the user names another store or location: its id from list_workspaces or create_workspace.
knowledge_idsYesEvery knowledge id the agent should use; empty for everything

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / workspace_id / description
      Previous value: -"Act in one of this organization's workspaces (id from list_workspaces or create_workspace). Leave empty to act in the connected organization."New value: +"Leave empty to act in the connected organization, which is the usual case. Set it only when the user names another store or location: its id from list_workspaces or create_workspace."
  2. Added

TDQS

A4.1/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 earns credit by explaining exactly what the destruction is: the full list replaces prior selections and an empty list grants access to everything. It also discloses that changes take effect on the next call and that the caller must be an admin and confirm with the user — real behavioral context the annotations cannot convey.

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?

Five short sentences, front-loaded with the core decision, then sourcing, effect timing, authorization, and confirmation in descending priority. Nothing is padded and every clause carries operational information.

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 set operation with no output schema, the description covers the replacement contract, empty-list edge case, effect timing, permission requirement, and confirmation protocol. An agent has everything needed to call it safely and 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 coverage is 100% and the schema already documents knowledge_ids as 'Every knowledge id the agent should use; empty for everything', so the description's empty-list explanation largely restates structured data. It reinforces replacement semantics but adds no format, ordering, or workspace nuance beyond the schema.

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?

Names a specific verb-plus-resource ('Choose which knowledge an AI agent may use') and implies replacement of the agent's knowledge set rather than enumerating it. It does not explicitly contrast with get_agent_knowledge or the add_knowledge_* siblings, so an agent must infer that this sets rather than reads or appends, but the core purpose is unmistakable.

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?

Gives concrete pre-call guidance: source ids from list_knowledge, send the complete list, and ask the user to confirm first, plus an admin-only prerequisite. It stops short of naming a when-not case or the sibling to use for adding individual knowledge items, so it is clear context without full routing.

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