Skip to main content
Glama
r-huijts

OpenTK Model Context Protocol Server

by r-huijts

get_document_content

Extracts and retrieves text content from parliamentary documents by document ID, enabling analysis, summarization, or direct reference. Supports pagination for handling large documents efficiently.

Instructions

Downloads a parliamentary document and extracts its text content for use in the conversation. This tool retrieves the actual content of a document based on its ID, making it available for analysis, summarization, or direct reference in the conversation. The text is extracted from PDF or Word (DOCX) documents using professional libraries and returned in a readable format.

IMPORTANT: For longer documents, the content may be truncated. The response includes pagination information to help you retrieve the complete document:

  • isTruncated: Indicates whether there is more content available

  • totalLength: The total length of the document content

  • currentOffset: The starting position of the current content chunk

  • nextOffset: The starting position for the next content chunk (use this as the 'offset' parameter in your next call)

  • remainingLength: The amount of content remaining after the current chunk

To retrieve the complete document, you can make multiple calls to this tool, incrementing the offset each time:

Example usage:

  1. First call: get_document_content({docId: '2025D18220'})

  2. If the response shows isTruncated=true, call again with the nextOffset value: get_document_content({docId: '2025D18220', offset: 8000})

  3. Continue until isTruncated=false or you've retrieved all the content you need.

This pagination approach allows you to analyze even very long documents within the conversation context.

Use this tool when you need to analyze or discuss the specific content of a document rather than just its metadata.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
docIdYesDocument ID (e.g., '2024D39058') - the unique identifier for the parliamentary document you want to download and extract text from
offsetNoOptional starting position for text extraction (default: 0). Use this to retrieve additional content from a truncated document by setting it to the 'nextOffset' value from a previous response.
Behavior4/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It effectively describes key behaviors: content extraction from PDF/DOCX, potential truncation for long documents, pagination mechanism with detailed response fields, and the iterative calling pattern needed for complete retrieval. It doesn't mention rate limits or authentication needs, but covers the core operational behavior well.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is appropriately sized and front-loaded with the core purpose. Every sentence adds value: the first states the purpose, the second explains content extraction, the third warns about truncation, and the rest provide essential pagination details and usage guidelines. While somewhat detailed, all information is necessary for this complex tool.

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?

Given the tool's complexity (pagination, content extraction) and lack of both annotations and output schema, the description does an excellent job of completeness. It explains the truncation behavior, describes the response structure (isTruncated, totalLength, etc.), provides a step-by-step usage example, and clarifies when to use the tool. The main gap is no explicit mention of error conditions or rate limits.

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 the baseline is 3. The description adds significant value beyond the schema by explaining the pagination workflow: it clarifies how the 'offset' parameter interacts with the response fields (nextOffset), provides a concrete usage example with multiple calls, and explains the default behavior (offset=0). This contextual information helps the agent understand parameter usage in practice.

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 purpose with specific verbs ('downloads', 'extracts text content') and identifies the resource ('parliamentary document'). It distinguishes itself from sibling tools like 'get_document_details' (which likely provides metadata) by emphasizing content extraction for analysis rather than just metadata.

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 states when to use this tool ('when you need to analyze or discuss the specific content of a document rather than just its metadata') and provides a clear alternative (implied metadata tools like 'get_document_details'). It also includes detailed pagination guidance for handling long documents.

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

Related 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/r-huijts/opentk-mcp'

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