Skip to main content
Glama

Attach a knowledge file to the agent

add_agent_document

Upload a material the agent learns from (PDF, DOC, DOCX, TXT, XLS, XLSX, CSV, PPT, PPTX, KEY; ≤10 MB) from a public URL or base64. Used the next time the script is generated (generate_agent_script). Free.

Input Schema

NameRequiredDescriptionDefault
idYesAgent id (UUID) — from list_agents
file_urlNoPublic https URL of the file
filenameYesFile name with extension, e.g. "price-list.pdf"
file_base64NoBase64 content (use instead of file_url)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A3.9/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does well: it discloses the allowed formats, the 10 MB size cap, the two source modes (public URL or base64), the deferred effect at next script generation, and that the operation is free. It omits what the tool returns and whether there is a per-agent document limit.

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 tight sentences with the material/accepted-formats/size constraint front-loaded and the lifecycle note second. Nothing is redundant and nothing needs to be re-read.

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 4-parameter mutation tool with no annotations and no output schema, the description supplies formats, size limit, source modes, timing of effect, and cost — enough to call it correctly. Missing pieces are minor: response shape and any cap on attached documents.

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 the baseline is 3; the description still adds real constraints the schema does not state — the whitelist of file extensions and the 10 MB maximum — which directly govern how filename/file_url must be populated. The URL-vs-base64 exclusivity is already in the schema, so no extra credit there.

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?

Specific verb (upload) plus resource (a knowledge material the agent learns from), with the accepted file formats enumerated. It is clearly distinct from remove_agent_document, but it does not differentiate itself from the related sibling generate_knowledge_from_url, leaving some ambiguity about which ingestion path to pick.

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?

The phrase 'Used the next time the script is generated (generate_agent_script)' tells the agent when the effect takes hold, which is useful timing context. However, there is no explicit when-to-use/when-not guidance and no mention of the alternative knowledge-ingestion tool (generate_knowledge_from_url).

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