Skip to main content
Glama

Add Doc To Collection

add_doc_to_collection

Adds an existing document ID to an AFFiNE collection allow-list so specific docs become members; use rule-based updates instead when membership should follow rules.

Instructions

Add an existing document id to an AFFiNE collection allow-list. Use update_collection_rules instead when membership should be rule-driven.

Input Schema

NameRequiredDescriptionDefault
docIdYesAFFiNE document id.
workspaceIdNoAFFiNE workspace id. Omit only when AFFINE_WORKSPACE_ID is configured.
collectionIdYesAFFiNE collection id from list_collections or create_collection.

Output Schema

NameRequiredDescriptionDefault
idNo
okNo
codeNo
nameNo
errorNo
rulesNo
detailsNo
allowListNo
causeCodeNo
retryableNo
recoveryGuidanceNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv3.10.2

TDQS

A4/5.0
Behavior3/5

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

Annotations already declare write (readOnlyHint=false), non-idempotent, non-destructive, open-world behavior, so the safety profile is covered. The description adds the useful 'allow-list' framing that clarifies this is explicit membership granting, but it does not address the non-idempotent hint — what happens on re-adding an existing member — or any permission requirements.

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 sentences, zero filler, with the core action first and the disambiguation second. Every clause earns its place.

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?

An output schema exists so return values need no explanation, and annotations cover safety. For a mutation with openWorldHint and non-idempotent semantics, a note on duplicate-membership behavior would close the remaining gap.

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 100% with only 3 parameters, so collectionId, docId, and workspaceId are already fully documented in the schema. The description mentions the doc id and collection concept but adds no format, ordering, or fallback detail beyond the schema.

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?

States a specific verb and resource ('Add an existing document id to an AFFiNE collection allow-list') and names the sibling that covers the other membership model. An agent can distinguish this from update_collection_rules without opening either schema.

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?

Explicitly routes the agent: use update_collection_rules instead when membership should be rule-driven. That is a clear when-to-use-alternative signal, but it gives no prerequisites for this tool itself (e.g. doc must exist, collection must exist, what happens if the doc is already a member).

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

Deploy Server

Other Tools