Retrieves the content of a parliamentary document (PDF or DOCX). This tool supports three modes of operation depending on parameters provided:\n\n1. TARGETED RETRIEVAL (with offset): Provide docId + offset (+ optional maxLength, default 3000). Returns text centered around the offset position, ext...
AI agents call get_document_content to retrieve information from OpenTK Model Context Protocol Server without modifying anything — typically the context-gathering step in research, monitoring, and reporting workflows, before the agent takes action elsewhere.
This tool performs read-only operations on parliamentary documents—either extracting content around a specific offset or reading from the beginning. It retrieves data without side effects, aligns with the 'Read' category (search, list, get, fetch), and poses minimal risk. The data accessed is public parliamentary material, and the tool cannot create, modify, delete, or execute anything.
From the tool's definition Tool retrieves and queries document content from parliamentary records. Description states 'Retrieves the content of a parliamentary document' with options for targeted or sequential reading. No modification, deletion, or execution capabilities mentioned.
Documented attack patterns abuse exactly the kind of access get_document_content gives an agent:
PolicyLayer is an MCP gateway — it sits between your AI agents and OpenTK Model Context Protocol Server, and nothing reaches the server without passing your rules. This is the rule we recommend for get_document_content:
{
"version": "1",
"default": "deny",
"tools": {
"get_document_content": {}
}
} get_document_content is read-only, so it stays allowed — but everything else on the server is denied unless you say otherwise.
Free to start. No card required.
Retrieves the content of a parliamentary document (PDF or DOCX). This tool supports three modes of operation depending on parameters provided:\n\n1. TARGETED RETRIEVAL (with offset): Provide docId + offset (+ optional maxLength, default 3000). Returns text centered around the offset position, extracting approximately 1,500 chars before and 1,500 chars after the offset. Finds natural paragraph boundaries for clean extraction.\n\n2. SEQUENTIAL READING (with maxLength, no offset): Provide docId + maxLength (no offset). Returns first maxLength characters from document start. Includes nextOffset for pagination to continue reading.\n\n3. FULL DOCUMENT RETRIEVAL (no offset, no maxLength): Provide docId only. Returns complete document text (may be 100KB+). Note: May use significant context window space.\n\nPARAMETERS:\n- docId: Document ID to retrieve (required)\n- offset (optional): Character position to center extraction around. Can be obtained from find_person_in_document or from the nextOffset value in previous responses.\n- maxLength (optional): Maximum characters to return. Default is 3000 when offset is provided, no limit when offset is not provided.\n\nRESPONSE FORMAT:\n- text: Extracted document content\n- textLength: Length of returned text\n- offset: Starting position in full document\n- nextOffset: Position to continue reading (null if at end)\n- prevOffset: Position to read backwards (null if at start)\n- hasMoreBefore: Boolean indicating more content exists before\n- hasMoreAfter: Boolean indicating more content exists after\n- note: Instructions for retrieving more content. It is categorised as a Read tool in the OpenTK Model Context Protocol Server MCP Server, which means it retrieves data without modifying state.
Register the OpenTK Model Context Protocol Server MCP server in PolicyLayer and add a rule for get_document_content: allow, deny, rate-limit, or require approval. Point your MCP client at the PolicyLayer proxy URL and the rule is enforced on every call, before it reaches OpenTK Model Context Protocol Server. Nothing to install.
get_document_content is a Read tool with low risk. Read-only tools are generally safe to allow by default.
Yes. Add a rate_limit block to the get_document_content rule in your PolicyLayer policy. For example, setting max: 10 and window: 60 limits the tool to 10 calls per minute. Rate limits are tracked per agent session and reset automatically.
Set action: deny in the PolicyLayer policy for get_document_content. The AI agent will receive a policy violation error and cannot call the tool. You can also include a reason field to explain why the tool is blocked.
get_document_content is provided by the OpenTK Model Context Protocol Server MCP server (r-huijts/opentk-mcp). PolicyLayer sits as a proxy in front of this server to enforce policies before tool calls reach the server.
Start from OpenTK Model Context Protocol Server, add the rest of your stack, and see everything your agents can call. Then put policy on all of it.
Free to start. No card required.
17 OpenTK Model Context Protocol Server tools catalogued and risk-classified — across an index of 43,000+ MCP servers.