Skip to main content
Glama

memory_get_document

Retrieve a stored document and its fragments by document key, with options to filter by fragment type, version, and content mode (preview or full).

Instructions

Retrieve a stored document and its fragments by document key.

Args: document_key: The document identifier used during storage content_mode: "preview" (default) or "full" for fragment content preview_chars: Max chars for preview mode (default: 120) node_kinds: Optional filter — e.g. ["claim", "plan_item"] for specific fragment types version: Optional version filter. If omitted, returns the latest version.

Returns: {root: {...}, fragments: [...] ordered by ordinal, document_key, version}

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
document_keyYes
content_modeNopreview
preview_charsNo
node_kindsNo
versionNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

No annotations are provided, so the description carries full behavioral burden. It explains the return structure (root and fragments) and behavior of optional parameters (e.g., version defaults to latest). It does not disclose side effects or permissions, but for a read operation this is adequate.

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 a well-structured docstring with Args and Returns sections. Every sentence provides necessary information without redundancy. It is concise and front-loaded with the core purpose.

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 output schema exists, the description complements it by detailing parameter semantics and the layout of returned data. No critical information is missing for an agent to use the tool correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 0% description coverage, but the description thoroughly explains each parameter: document_key is the identifier, content_mode has 'preview' or 'full', preview_chars max characters, node_kinds filters fragment types, version is optional. This fully compensates for the missing schema descriptions.

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 'Retrieve a stored document and its fragments by document key,' which is a specific verb and resource. The purpose is unambiguous and distinct from sibling tools like memory_store_document (store) and memory_get (which retrieves individual entries).

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 provides clear context on when to use the tool (retrieve a document by key) but does not explicitly mention when not to use it or list alternatives. However, the purpose and parameter details are sufficient for an agent to decide.

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/agentic-box/memora'

If you have feedback or need assistance with the MCP directory API, please join our Discord server