Skip to main content
Glama

Add knowledge media

add_knowledge_media
Idempotent

Attach a media file as a knowledge source on an agent (RAG). Media and agent must be in the same space. Get ids from list_agents / list_media.

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": {
      "spaceId": "<spaceId>",
      "agentId": "<agentId>",
      "mediaId": "<mediaId>"
    },
    "name": "add_knowledge_media"
  }
}

Input Schema

NameRequiredDescriptionDefault
agentIdYesAgent ID from `list_agents`
mediaIdYesMedia ID from `list_media`
spaceIdYesSpace ID

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.8/5.0
Behavior3/5

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

Annotations already declare that this is a non-read-only, non-destructive, idempotent, closed-world mutation. The description usefully adds the same-space precondition that would cause failure. It does not disclose behavior on conflict beyond idempotency, nor the response shape, but the annotation coverage limits how much more it needs to say.

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 short sentences with no wasted words: the action comes first, then the constraint, then the ID sources. Nothing is buried or redundant.

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 simple three-required-parameter mutation with full schema coverage and annotations, the description covers purpose, precondition, and ID sourcing. Return behavior is not needed because there is no output schema and the tool is idempotent.

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 the provenance of agentId and mediaId, so the description repeats what the structured fields provide. The same-space constraint is the only semantics added beyond the schema, which is why this earns the baseline score.

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: 'Attach a media file as a knowledge source on an agent (RAG)'. This makes clear what it does, and the parenthetical clarifies the effect. Sibling add_knowledge_project is not named, so the agent must infer that this tool is the agent-scoped variant rather than the project-scoped one.

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 a clear precondition that 'Media and agent must be in the same space' and tells the caller where to get IDs, pointing to list_agents and list_media. It offers no explicit exclusion about when to choose add_knowledge_project instead, but the context of the call is unambiguous.

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.