Skip to main content
Glama

Get Document

get_doc
Read-onlyIdempotent

Retrieves GraphQL metadata for an AFFiNE document—title, summary, public state, roles, and timestamps—so you can inspect document properties without loading block content.

Instructions

Read GraphQL metadata for one document, such as title, summary, public state, roles, and timestamps. Use read_doc when you need block content.

Input Schema

NameRequiredDescriptionDefault
docIdYesAFFiNE document id.
workspaceIdNoAFFiNE workspace id. Omit only when AFFINE_WORKSPACE_ID is configured.

Output Schema

NameRequiredDescriptionDefault
idNo
okNo
codeNo
errorNo
valueNo
detailsNo
causeCodeNo
retryableNo
recoveryGuidanceNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv3.10.2

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint, and destructiveHint=false, so safety is covered. The description adds genuinely useful context beyond that: this returns metadata only, not document body, which is the key behavioral fact an agent could otherwise get wrong by calling it expecting content.

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 short sentences, the capability stated first and the disambiguation second. No filler, no restatement of the title, and every clause carries information the agent needs.

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?

An output schema is present, so return values needn't be explained, and annotations cover the safety profile. What remains is a minor gap: nothing about error behavior for an invalid or inaccessible docId, or cross-workspace lookup constraints, but for a simple two-parameter read tool this is close to complete.

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% and both parameters carry their own descriptions, including the workspaceId omission rule tied to AFFINE_WORKSPACE_ID. The description says 'one document' but adds no syntax, format, or edge-case detail for docId beyond what the schema already states, so the 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?

States a specific verb and resource ('Read GraphQL metadata for one document') and enumerates the fields returned (title, summary, public state, roles, timestamps), which precisely delimits the tool from content access. It also explicitly contrasts with read_doc, so an agent can distinguish it from siblings without opening a schema.

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?

It gives a clear routing rule: 'Use read_doc when you need block content,' which tells the agent exactly when to pick the sibling instead. It does not address related discovery or permission siblings like list_docs, search_docs, or get_capabilities, but the primary use/avoid split is stated outright rather than implied.

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