Skip to main content
Glama
r-huijts

OpenTK Model Context Protocol Server

by r-huijts

get_document_links

Converts PDF or Tweede Kamer webpage URLs into clickable links, enabling easy access to documents. Integrate this step after retrieving document details for streamlined navigation.

Instructions

Converts document URLs into clickable links. This tool takes either a direct PDF link or a Tweede Kamer webpage link and returns them as properly formatted clickable links. Use this after get_document_details to make the URLs clickable.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pdfUrlNoDirect link to the PDF document
tkUrlNoLink to the document page on Tweede Kamer website

Implementation Reference

  • The complete inline implementation of the get_document_links MCP tool. This includes the tool registration via mcp.tool(), the input schema using Zod (optional pdfUrl and tkUrl parameters), and the handler function that generates markdown-formatted clickable links for PDF downloads and Tweede Kamer website views. No external dependencies or helper functions are used; the logic is self-contained.
    /** Generate clickable document links */ mcp.tool( "get_document_links", "Converts document URLs into clickable markdown-formatted links. This tool takes either a direct PDF link or a Tweede Kamer webpage link and returns them as properly formatted clickable links.", { pdfUrl: z.string().optional().describe("Direct link to the PDF document"), tkUrl: z.string().optional().describe("Link to the document page on Tweede Kamer website") }, async ({ pdfUrl, tkUrl }) => { const links: string[] = []; if (pdfUrl) { links.push(`[Download PDF](${pdfUrl})`); } if (tkUrl) { // Remove any HTML entities from the URL const cleanTkUrl = tkUrl.replace(/&/g, '&'); links.push(`[View on Tweede Kamer website](${cleanTkUrl})`); } if (links.length === 0) { return { content: [{ type: "text", text: "No valid links provided" }] }; } return { content: [{ type: "text", text: links.join("\n") }] }; } );

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