Skip to main content
Glama

Add Doc To Collection

add_doc_to_collection

Add an existing document to an AFFiNE collection allow-list by providing its document ID and collection ID.

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

TableJSON 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

TableJSON Schema
NameRequiredDescriptionDefault
idYes
nameYes
rulesYes
allowListYes
Behavior3/5

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

Annotations already declare readOnlyHint=false, idempotentHint=false, and destructiveHint=false. The description adds the constraint that the document must already exist, but does not disclose behavior like duplicate handling, error conditions, or side effects. Adequate but not rich given annotation coverage.

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, action first, no redundant words. The first sentence states the purpose, the second gives usage guidance. Efficient and well-structured.

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?

The tool is simple, with rich schema descriptions, annotations, and an output schema present. The description provides enough context for selection and invocation, though it could mention duplicate behavior. Overall it is complete for its complexity.

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?

Input schema covers all three parameters with descriptions (100% coverage), including context for workspaceId and collectionId. The description does not add any additional parameter semantics beyond the schema, so baseline 3 applies.

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 uses a specific verb and resource: 'Add an existing document id to an AFFiNE collection allow-list.' It clearly distinguishes from sibling tools like update_collection_rules (rule-driven) and remove_doc_from_collection (removal).

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?

Explicitly states an alternative: 'Use update_collection_rules instead when membership should be rule-driven.' This gives clear when-not-to-use guidance and names the alternative tool.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/irfanhak123/affine-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server