Skip to main content
Glama

Add Document to Collection

collection.add_document
Idempotent

Add an evidence bundle to a collection and trigger async vector indexing. Use after collection.create to populate a collection with documents. Once indexed, documents become searchable via collection.search and collection.ask. Indexing is async — poll job.status with the returned job_id until status is "complete". Also returns a signed action receipt (rcpt_...) binding this add call to the bundle manifest — list with receipt.list, verify with receipt.verify. PREREQUISITE: Bundle must have status "complete" (check with bundle.get). Collection must be owned by your API key. Returns: { collection_id, bundle_id, job_id (poll for indexing completion), receipt: ActionReceipt|null } Example prompts:

  • "Add my contract bundle ev_550e8400 to the Q4 Contracts collection."

  • "Put this evidence bundle into my Due Diligence Docs collection for search."

  • "Add document [bundle_id] to collection [col_id] with a title."

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
titleNoOptional display title for the document in this collection. Example: "Q4 2025 Financial Report"
bundle_idYesEvidence bundle ID (ev_...) to add. Bundle must have status "complete". Example: "ev_550e8400-e29b-41d4-a716-446655440000"
collection_idYesCollection ID (col_...) returned by collection.create. Example: "col_550e8400-e29b-41d4-a716-446655440000"

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
job_idYes
receiptYes
bundle_idYes
collection_idYes

TDQS

A4.5/5.0
Behavior4/5

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

Description adds beyond annotations by detailing async vector indexing, polling with job_id, and return of a signed receipt. Annotations already indicate idempotent and non-destructive, so description adds significant context without contradiction.

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?

The description is well-structured with clear sections (PREREQUISITE, Returns, Example prompts). Every sentence contributes useful information, though could be slightly trimmed for brevity.

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?

Given 3 parameters, output schema present, and complexity of async workflow, the description covers prerequisites, async behavior, polling, receipts, and relationships to sibling tools. It is sufficiently complete.

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 baseline is 3. Description adds value by explaining the purpose of each parameter (e.g., 'Optional display title', 'bundle_id' with example, 'collection_id' referencing collection.create).

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb and resource: 'Add an evidence bundle to a collection and trigger async vector indexing.' It distinguishes from sibling tools like collection.create and collection.search by specifying the action of populating a collection and triggering indexing.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

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

Explicit guidance: 'Use after collection.create to populate a collection with documents.' Prerequisites (bundle must have status 'complete', collection owned by API key) are stated. It explains post-usage (searchable via collection.search/ask) and polling via job.status.

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.

TDQS

A4.5/5.0
Disambiguation5/5

Each tool has a clearly distinct purpose, grouped by domain (account, bundle, collection, document, job, receipt, url). Descriptions and naming make it easy to differentiate between similar tools like url.extract vs document.extract_text or collection.search vs collection.ask.

Naming Consistency5/5

All tools follow the same prefix.group_action pattern in snake_case (e.g., account.quota, bundle.get, collection.create). No mixing of conventions, making the API predictable and easy to navigate.

Tool Count5/5

With 22 tools, the server covers a comprehensive set of operations for document and evidence management. Each tool serves a specific purpose, and the count feels well-scoped without being bloated or sparse.

Completeness3/5

The tool surface lacks explicit create and delete operations for bundles and collections. Bundles appear to be created externally, and there is no tool to remove a bundle or collection. This is a notable gap given the server's stated purpose.

Resources