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")
          }]
        };
      }
    );
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the tool converts URLs and returns formatted links, but lacks details on error handling, rate limits, authentication needs, or what 'properly formatted' entails. For a tool with no annotations, this is insufficient behavioral context.

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 concise and front-loaded, with three sentences that each add value: the core function, input specifics, and usage context. There is no wasted text, and it efficiently communicates essential information.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given no annotations, no output schema, and 2 parameters with full schema coverage, the description is adequate but has gaps. It explains the tool's purpose and usage context well, but lacks details on behavioral traits (e.g., error handling) and return values. For a simple conversion tool, it's minimally viable but could be more complete.

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

Parameters3/5

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

Schema description coverage is 100%, so the schema already documents both parameters (pdfUrl, tkUrl) with clear descriptions. The description adds marginal value by mentioning the types of links accepted ('direct PDF link or a Tweede Kamer webpage link'), but doesn't provide additional syntax or format details beyond the schema. Baseline 3 is appropriate when schema does the heavy lifting.

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 ('converts', 'returns') and resources ('document URLs', 'clickable links'). It distinguishes from siblings by mentioning a specific workflow ('use this after get_document_details'), making its role in the toolset explicit.

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 ('after get_document_details') and what inputs it accepts ('direct PDF link or a Tweede Kamer webpage link'). However, it doesn't explicitly state when not to use it or name alternatives among siblings, though the workflow hint implies differentiation.

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