Skip to main content
Glama
r-huijts

OpenTK Model Context Protocol Server

by r-huijts

get_photo

Retrieve official portrait photographs of Dutch Members of Parliament for use in reports, presentations, or profiles. Input the MP's unique ID to receive the image as a binary resource.

Instructions

Retrieves the official portrait photograph of a Member of Parliament. Returns the image as a binary resource that can be displayed or saved. Use this when you need to include a visual representation of an MP in reports, presentations, or profiles.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
personIdYesMP's numeric ID - the unique identifier for the Member of Parliament whose photo you want to retrieve

Implementation Reference

  • The complete handler and registration for the 'get_photo' MCP tool. Fetches the MP's portrait image as binary data from the API endpoint `/personphoto/{personId}`, encodes it to base64, and returns it as an image/jpeg resource. Includes input schema validation with Zod and error handling.
    mcp.tool(
      "get_photo",
      "Retrieves the official portrait photograph of a Member of Parliament. Returns the image as a binary resource that can be displayed or saved. Use this when you need to include a visual representation of an MP in reports, presentations, or profiles.",
      { personId: z.string().describe("MP's numeric ID - the unique identifier for the Member of Parliament whose photo you want to retrieve") },
      async ({ personId }) => {
        try {
          const { data } = await apiService.fetchBinary(`/personphoto/${encodeURIComponent(personId)}`);
          const base64 = Buffer.from(data).toString("base64");
          return {
            content: [
              {
                type: "resource",
                resource: {
                  uri: `photo://${personId}`,
                  blob: base64,
                  mimeType: "image/jpeg"
                }
              }
            ]
          };
        } catch (error: any) {
          return {
            content: [{
              type: "text",
              text: `Error fetching MP photo: ${error.message || 'Unknown error'}`
            }]
          };
        }
      }
    );
Behavior3/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. It discloses that the tool returns a binary resource for display or saving, which is useful behavioral context. However, it lacks details on potential errors (e.g., if no photo exists), rate limits, or authentication needs, leaving gaps for a read operation.

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 front-loaded with the core purpose in the first sentence, followed by usage guidance. Every sentence earns its place by adding value—no redundant or vague language. It's efficiently structured and appropriately sized for the tool's complexity.

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 low complexity (1 parameter, no output schema, no annotations), the description is mostly complete. It covers purpose, usage, and output format. However, without annotations or output schema, it could benefit from more behavioral details (e.g., error handling), but it's adequate for a simple retrieval tool.

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%, with the parameter 'personId' fully documented in the schema as 'MP's numeric ID - the unique identifier for the Member of Parliament whose photo you want to retrieve.' The description adds no additional parameter information beyond this, so it meets the baseline for high schema coverage without compensating further.

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 specific action ('Retrieves'), resource ('official portrait photograph of a Member of Parliament'), and output format ('binary resource'). It distinguishes this tool from siblings like 'list_persons' (which lists MPs) or 'get_document_content' (which retrieves documents), making the purpose unambiguous.

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?

It explicitly states when to use this tool: 'when you need to include a visual representation of an MP in reports, presentations, or profiles.' This provides clear context for usage, helping the agent choose this over alternatives like textual data tools. No exclusions are mentioned, but the guidance is sufficient for decision-making.

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