Skip to main content
Glama

Update Collection Rules

update_collection_rules

Replace an AFFiNE collection's rules and rebuild its document allow-list from current workspace docs, changing which documents appear in the collection.

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

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

NameRequiredDescriptionDefault
okNo
codeNo
errorNo
rulesNo
detailsNo
allowListNo
causeCodeNo
retryableNo
workspaceIdNo
collectionIdNo
matchedCountNo
matchedDocIdsNo
recoveryGuidanceNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv3.10.2

TDQS

A3.6/5.0
Behavior4/5

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

The annotations already disclose that this is a non-readonly, open-world, non-idempotent mutation. The description adds meaningful context: rules are replaced and the allow-list is rebuilt from current workspace documents, which may change collection membership. It does not discuss permissions, reversibility, or what happens to the previous rules beyond the word 'Replace'.

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?

The description is two tight sentences, front-loads the action, and every sentence contributes useful information about behavior or effect.

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 an output schema present and fully described parameters, the description mainly needs to explain the mutation's effect. It does that well by noting the allow-list rebuild and possible membership changes, but it omits guidance about alternatives and prerequisites such as workspace configuration.

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%, including detailed nested filter semantics, so the schema carries the parameter explanation. The description does not add any parameter-level meaning beyond what the schema already provides.

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 specific verb and resource: it replaces an AFFiNE collection's rules and rebuilds the allow-list. This clearly distinguishes it from generic collection updates and manual doc membership tools, though it does not name the sibling alternatives explicitly.

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 guidance on when to use this tool versus add_doc_to_collection, remove_doc_from_collection, or update_collection. The second sentence warns about an effect but does not provide usage conditions or exclusions.

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