Skip to main content
Glama

Get Document

get_doc
Read-onlyIdempotent

Retrieve a document's metadata, including title, summary, public state, roles, and timestamps. Use for document-level details; for block content, use the read_doc tool.

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

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

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
idNo
valueNo
Behavior4/5

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

Annotations already indicate this is a read-only, idempotent, non-destructive operation. The description adds behavioral context by specifying the type of data returned (GraphQL metadata, not block content) and the specific fields included, going beyond what the annotations convey. It does not discuss error conditions or rate limits, but the added field-level detail earns a 4.

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 tightly written sentences with no filler. The primary purpose is front-loaded in the first sentence, and the second sentence efficiently directs to a sibling tool. Every word earns its place.

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?

For a straightforward metadata read tool with two well-documented parameters, strong annotations, and an output schema, the description is complete. It covers the core function, key data fields, and provides a clear alternative when block content is needed. No critical information is missing.

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%, so the schema already fully explains the docId and workspaceId parameters. The description adds no additional parameter semantics beyond the schema, which is acceptable per the baseline of 3 when schema coverage is high.

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 clearly states a specific action ('Read GraphQL metadata for one document') and lists concrete examples of the metadata (title, summary, public state, roles, timestamps). It directly distinguishes itself from the sibling tool read_doc by stating when to use the alternative, making the purpose unambiguous.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description explicitly provides usage guidance by saying 'Use read_doc when you need block content,' which implies get_doc is for metadata-only retrieval. This direct comparison with an alternative tool gives clear when-to-use and when-not-to-use context.

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