Skip to main content
Glama

Update Collection Rules

update_collection_rules

Update a collection's rules to rebuild its allow-list and control which documents appear.

Instructions

Replace an AFFiNE collection's rules and rebuild its allow-list from current workspace documents. This can change which docs appear in the collection.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
rulesYesRule set used to rebuild the collection allow-list.
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
rulesYes
allowListYes
workspaceIdYes
collectionIdYes
matchedCountYes
matchedDocIdsYes
Behavior4/5

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

Annotations already indicate readOnlyHint=false and idempotentHint=false. Description adds that the operation rebuilds the allow-list from current workspace documents and can change which docs appear, giving useful context that membership will be recalculated. Could be more explicit about handling of manually-added docs but is satisfactory.

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, starts with action verb, no filler. 'This can change which docs appear' is informative but concise.

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?

With detailed schema and output schema, description covers the core behavior and caveat. It does not address interaction with manually-added docs or suggest when to prefer this over manual management, but overall adequate for a complex tool.

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 has full descriptions for all parameters including nested rules structure, match/filter operators. Description adds no further parameter meanings 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?

Description uses specific verb 'Replace' plus resource 'AFFiNE collection's rules' and outcome 'rebuild its allow-list from current workspace documents'. This clearly distinguishes it from sibling tools like add_doc_to_collection and update_collection.

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?

No explicit when-to-use or exclusions. It implies usage when wanting to change collection membership by replacing filter rules, but does not contrast with alternatives like manual doc add/remove. Thus only implied usage context is provided.

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