Skip to main content
Glama

add_document

Add text content or a public URL to a shared long-term memory so AI agents can search and answer questions from it. Reusing the same custom ID skips duplicates.

Instructions

Give the user's memory raw material to learn: content text or a public url. The same custom_id again is a no-op.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "add_document"
  }
}

Input Schema

NameRequiredDescriptionDefault
urlNo
titleNo
contentNo
custom_idNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.2/5.0
Behavior3/5

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

With no annotations, the description carries the full behavioral burden; it does disclose two real traits: the url must be public and re-submitting the same `custom_id` is an idempotent no-op. It does not say what happens if neither `content` nor `url` is supplied, what happens if both are, whether ingestion is synchronous or indexable immediately, or what permissions are needed for a write operation.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two short sentences with the payload options front-loaded and the idempotency caveat second; nothing is padding. The opening phrasing is slightly abstract ('raw material to learn') where a plain statement of what gets stored would be clearer.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

An output schema exists and no annotations are needed for return values, so the description is not obligated to explain responses. However, for a zero-annotation write tool with four undocumented parameters, the missing `title` semantics and the ambiguity around supplying zero versus two payload fields leave gaps an agent could stumble into.

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 0%, so the description must compensate, and it does explain `content`, `url`, and `custom_id` (as an idempotency key) meaningfully. It leaves `title` entirely unexplained and never clarifies the relationship between `content` and `url` despite neither being required in 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?

The description uses a concrete framing (giving the user's memory raw material) and names the two payload forms, `content` text or a public `url`, so an agent can tell this ingests source documents rather than querying them. It never states that a document object is created or persisted, and it does not distinguish the tool from siblings like add_memory or add_media, so it stops 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 Guidelines2/5

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

There is no explicit when-to-use or when-not-to-use guidance, and no mention of the alternatives (add_memory, add_media, list_documents) that an agent would weigh when deciding how to store information. Usage is only implied by the phrase 'give the user's memory raw material to learn'.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.