Skip to main content
Glama

Get Document

get_doc
Read-onlyIdempotent

Retrieve document content from a URL with pagination support for large files. Use offset and limit to control chunk size, and has_more to continue fetching.

Instructions

Get document content with pagination support for large documents.

For documents larger than 50KB, use offset/limit to paginate through content. The response includes has_more=True if more content is available. For targeted retrieval, use get_doc_excerpt instead.

Args: url: The URL of the document (as returned by search_docs). offset: Start position in bytes (default: 0). limit: Max bytes to return per call (default: 50000, max: 100000).

Returns: Document with content chunk, pagination metadata (offset, length, total_length, has_more).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlYesThe URL of the document (as returned by search_docs)
limitNoMax bytes to return (default 50000, max 100000)
offsetNoStart position in bytes (for pagination)

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlYes
titleYes
lengthNo
offsetNo
sourceYes
contentYes
has_moreNo
source_urlYes
total_lengthNo
Behavior4/5

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

Annotations already declare readOnlyHint=true and idempotentHint=true, establishing the safe read-only nature. The description adds valuable behavioral context: pagination mechanics, the 50KB threshold, response includes has_more, and metadata fields (offset, length, total_length, has_more). It does not describe error behavior or rate limits, but the annotations cover the primary safety aspects.

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 well-structured: opening sentence states purpose, followed by concise usage guidance, a clear Args section, and a Returns section. Every sentence contributes necessary information without redundancy, and key details are front-loaded.

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?

The tool has moderate complexity with pagination. The description covers pagination triggers, parameter semantics, response format, and an alternative tool. It leaves no obvious gaps for a read-only fetch operation, especially given the existing annotations and output schema.

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 baseline is 3. The description adds semantics beyond individual parameter descriptions by explaining when to use offset/limit (documents >50KB) and what has_more indicates in the response. This contextual usage guidance enriches the parameter meaning.

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 the tool's function: 'Get document content' with pagination support. It distinguishes from the sibling tool get_doc_excerpt by noting 'For targeted retrieval, use get_doc_excerpt instead.'

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 provides explicit when-to-use guidance: 'For documents larger than 50KB, use offset/limit to paginate' and explicitly names the alternative for targeted retrieval. This gives clear context for choosing between tools.

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/bigbag/llmdoc'

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