Skip to main content
Glama
r-huijts

OpenTK Model Context Protocol Server

by r-huijts

get_committees

Retrieve a JSON array of all active parliamentary committees, including IDs, names, and URLs, via the OpenTK MCP server. Use this to explore committees by domain or initiate further analysis with 'get_committee_details'.

Instructions

Retrieves a list of all parliamentary committees with their IDs, names, and URLs. The response is a JSON array where each entry represents a committee with its unique identifier and name. Use this tool when a user asks about parliamentary committees, wants to know which committees exist, or needs to find committees related to specific policy areas. Committees are specialized groups of MPs that focus on specific domains like defense, healthcare, or finance. After getting the list of committees, you can use the 'get_committee_details' tool with a specific committee ID to retrieve more detailed information about that committee, including its members and recent activities. This tool takes no parameters as it returns all active committees.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • MCP tool registration and handler for 'get_committees'. Fetches HTML from /commissies.html via apiService, extracts committees using extractCommitteesFromHtml utility, and returns JSON array of committees or error message.
    /** Get committees */
    mcp.tool(
      "get_committees",
      "Retrieves a list of all parliamentary committees with their IDs, names, and URLs. The response is a JSON array where each entry represents a committee with its unique identifier and name. Committees are specialized groups of MPs that focus on specific domains like defense, healthcare, or finance. This tool takes no parameters as it returns all active committees.",
      {},
      async () => {
        try {
          const html = await apiService.fetchHtml("/commissies.html");
          const committees = extractCommitteesFromHtml(html, BASE_URL);
    
          if (committees.length === 0) {
            return {
              content: [{
                type: "text",
                text: "No committees found or there was an error retrieving the committee list. Please try again later."
              }]
            };
          }
    
          return { content: [{ type: "text", text: JSON.stringify(committees, null, 2) }] };
        } catch (error: any) {
          return {
            content: [{
              type: "text",
              text: `Error fetching committees: ${error.message || 'Unknown error'}`
            }]
          };
        }
      }
    );
  • Helper function that parses the HTML table from the committees page (/commissies.html) to extract an array of Committee objects, each with id, name, and resolved url.
    export function extractCommitteesFromHtml(html: string, baseUrl: string): Committee[] {
      if (!html) {
        return [];
      }
    
      const committees: Committee[] = [];
    
      // Extract the table containing committees
      const tableRegex = /<table[^>]*>[\s\S]*?<tbody>([\s\S]*?)<\/tbody>/i;
      const tableMatch = html.match(tableRegex);
    
      if (!tableMatch || !tableMatch[1]) {
        return [];
      }
    
      const tableContent = tableMatch[1];
    
      // Extract each row (committee) from the table
      const rowRegex = /<tr[^>]*>([\s\S]*?)<\/tr>/gi;
      let rowMatch;
    
      while ((rowMatch = rowRegex.exec(tableContent)) !== null) {
        if (!rowMatch[1]) continue;
    
        const rowContent = rowMatch[1];
    
        // Extract the committee ID and name from the link
        const linkRegex = /<a href="(commissie\.html\?id=([^"]+))">([^<]+)<\/a>/i;
        const linkMatch = rowContent.match(linkRegex);
    
        if (linkMatch && linkMatch[1] && linkMatch[2] && linkMatch[3]) {
          const id = linkMatch[2];
          const name = linkMatch[3].trim();
          const url = new URL(linkMatch[1], baseUrl).href;
    
          committees.push({
            id,
            name,
            url
          });
        }
      }
    
      return committees;
    }
  • TypeScript interface defining the structure of a Committee object used as output type for get_committees tool.
    interface Committee {
      id: string;
      name: string;
      url: string;
    }
Behavior4/5

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

With no annotations, the description carries full burden and does well: it discloses the response format (JSON array), scope (all active committees), and that it takes no parameters. However, it lacks details on potential limitations like pagination, rate limits, or error handling, which would be useful 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.

Conciseness4/5

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

Front-loaded with the core purpose, followed by usage guidelines and workflow. Sentences are efficient, but it could be slightly more concise by integrating some details (e.g., merging policy area examples into one phrase). Overall, well-structured with minimal waste.

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 0 parameters, no annotations, and no output schema, the description is largely complete: it explains purpose, usage, response format, and sibling relationship. However, it doesn't specify if the list is filtered (e.g., only active committees) or mention any authentication needs, leaving minor gaps for a read tool.

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?

The schema has 0 parameters with 100% coverage, so the baseline is 4. The description adds value by explicitly stating 'takes no parameters as it returns all active committees,' clarifying the absence of inputs and reinforcing the tool's behavior, which compensates for any minimal gaps.

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 verb ('retrieves') and resource ('parliamentary committees'), specifying what data is returned (IDs, names, URLs) and the format (JSON array). It distinguishes from sibling 'get_committee_details' by emphasizing this lists all committees without filtering, making the purpose specific and differentiated.

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?

Explicitly states when to use: when users ask about committees, want to know which exist, or need committees by policy areas. It provides a clear alternative ('get_committee_details' for detailed info) and explains the workflow (use this first, then details tool), offering comprehensive guidance on usage versus siblings.

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