Skip to main content
Glama

List Documents

list_docs
Read-onlyIdempotent

Lists documents in an AFFiNE workspace with pagination and a bounded metadata fallback when GraphQL document access is denied. Use it to browse workspace docs and identify trashed items.

Instructions

List documents in a workspace (GraphQL), falling back to bounded workspace metadata when GraphQL document access is denied. Each doc includes an inTrash flag; fallback summary, public, and defaultRole values are null. GraphQL and fallback cursors are not interchangeable; restart pagination without after if a cursor is rejected.

Input Schema

NameRequiredDescriptionDefault
afterNoCursor from pageInfo.endCursor for fetching the next page.
firstNoMaximum number of items to return from the AFFiNE pagination connection (1-200).
offsetNoZero-based offset used by AFFiNE pagination (maximum 1,000,000). Do not combine with after unless the AFFiNE API requires it.
workspaceIdNoAFFiNE workspace id. Omit only when AFFINE_WORKSPACE_ID is configured.

Output Schema

NameRequiredDescriptionDefault
okNo
codeNo
edgesNo
errorNo
detailsNo
pageInfoNo
causeCodeNo
retryableNo
totalCountNo
recoveryGuidanceNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv3.10.2

TDQS

A3.9/5.0
Behavior4/5

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

With readOnlyHint/idempotentHint already declared, the description still contributes genuine behavioral detail: it discloses that GraphQL denial triggers a degraded metadata-only fallback and that fallback fields (summary, public, defaultRole) come back null. That is exactly the kind of non-obvious degradation an agent needs. It does not mention rate limits or what the transition looks like to the caller, keeping it below a 5.

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?

Three dense sentences, front-loaded with the primary operation before the fallback and cursor caveat. Minor cost: the clause "fallback summary, public, and defaultRole values are null" references output fields not present in the schema or description context, so it's terse to the point of being slightly opaque.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/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 needn't be explained, and readOnly annotations cover the safety profile. For a paginated list tool with four optional parameters, the description covers the transport, the degraded path, the null-field consequence, and the cursor rule — nothing an agent needs in order to call it correctly is missing.

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 the baseline is 3; the description earns above baseline by warning that GraphQL and fallback cursors are not interchangeable and must not be reused across modes — a semantic constraint the schema cannot express. It adds no detail on first/offset interplay, which is already handled by schema text.

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?

States a specific verb+resource ("List documents in a workspace") and names the underlying transport (GraphQL) plus a degraded mode. Scope is clear enough to separate it from get_doc/read_doc, but it never contrasts itself with search_docs or find_doc_by_title, which are the closest siblings.

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?

The description explains the fallback path and gives actionable cursor guidance ("restart pagination without after if a cursor is rejected"), which is real usage help. However it never states when an agent should choose this over search_docs, find_doc_by_title, list_children, or list_workspace_tree — that choice is left to inference.

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