Skip to main content
Glama

List Documents

list_docs
Read-onlyIdempotent

List documents in an AFFiNE workspace with pagination, including trash status. Falls back to workspace metadata when GraphQL access is denied.

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

TableJSON 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

TableJSON Schema
NameRequiredDescriptionDefault
edgesYes
pageInfoYes
totalCountYes
Behavior5/5

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

Annotations already declare readOnlyHint, idempotentHint, and destructiveHint, but the description adds substantial behavior: fallback when GraphQL is denied, inTrash flag, null values in fallback, and non-interchangeable cursors. This goes well beyond 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?

Three dense sentences, front-loaded with the core purpose. Every sentence adds critical information: the operation, fallback behavior, output field nuances, and cursor handling. No filler or repetition.

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?

Given the schema fully documents parameters and an output schema exists, the description covers the essential behavioral context: fallback, flags, null semantics, and pagination restart. It is complete for a list tool with this complexity.

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 description coverage is 100%, so baseline is 3, but the description adds important pagination nuance about GraphQL and fallback cursors not being interchangeable and the need to restart pagination without 'after' on rejected cursors. This directly enhances the meaning of the 'after' parameter.

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 begins with a specific verb and resource: 'List documents in a workspace', clearly defining its scope and distinguishing it from siblings like list_workspaces, list_tags, and list_docs_by_tag. The mention of GraphQL and fallback behavior further clarifies the exact operation.

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?

The description clarifies when the tool is called with GraphQL and when it falls back to workspace metadata if GraphQL access is denied, giving clear context. It does not explicitly name alternatives or exclusions, but the usage context is well-defined.

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