Skip to main content
Glama

get_parliament_members

Retrieve Swiss Parliament members from the National Council and Council of States. Filter results by canton, political party, or active status to find specific representatives.

Instructions

List current or past Swiss Parliament members (National Council and Council of States). Filter by canton or party.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
cantonNoCanton name in German to filter by (e.g. 'Zürich', 'Bern', 'Genf', 'Waadt')
partyNoParty name or abbreviation to search (e.g. 'SVP', 'SP', 'FDP', 'Grüne', 'Mitte')
activeNoOnly active (currently seated) members (default: true)
limitNoMax results (default: 10, max: 50)

Implementation Reference

  • The implementation of the get_parliament_members tool handler function.
    async function getParliamentMembers(args: {
      canton?: string;
      party?: string;
      active?: boolean;
      limit?: number;
    }): Promise<string> {
      const limit = Math.min(args.limit ?? 10, 50);
      const active = args.active !== false;
    
      const params: Record<string, string | number | boolean | undefined> = {
        body_key: "CHE",
        active,
        lang: "de",
        lang_format: "flat",
        limit,
      };
    
      // Filter by canton using electoral_district_de (German canton name)
      if (args.canton) {
        params.electoral_district_de = args.canton;
      }
    
      // Filter by party using search
      if (args.party) {
        params.search = args.party;
      }
    
      const url = buildUrl("/persons/", params);
      const resp = await apiFetch<PersonRecord>(url);
    
      const members = resp.data.map((p) => ({
        id: p.id,
        name: p.fullname,
        party: p.party_de,
        partyFull: p.party_harmonized_de,
        canton: p.electoral_district_de,
        council: p.parliament_sector,
        group: p.parliamentary_group_name_de,
        occupation: p.occupation_de,
        gender: p.gender,
        active: p.active,
        url: p.website_parliament_url_de,
      }));
    
      return truncate(
        JSON.stringify({
          count: members.length,
          total: resp.meta.total_records,
          members,
        })
      );
    }
    
    interface VotingRecord {
      id: number;
      affair_id: number;
      meaning_yes_de: string;
      meaning_no_de: string;
      total_yes: number;
      total_no: number;
  • The tool definition and schema registration for get_parliament_members.
    name: "get_parliament_members",
    description:
      "List current or past Swiss Parliament members (National Council and Council of States). Filter by canton or party.",
    inputSchema: {
      type: "object" as const,
      properties: {
        canton: {
          type: "string",
          description:
            "Canton name in German to filter by (e.g. 'Zürich', 'Bern', 'Genf', 'Waadt')",
        },
        party: {
          type: "string",
          description:
            "Party name or abbreviation to search (e.g. 'SVP', 'SP', 'FDP', 'Grüne', 'Mitte')",
        },
        active: {
          type: "boolean",
          description: "Only active (currently seated) members (default: true)",
        },
        limit: {
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It states the tool lists members with filtering, but doesn't mention whether it's a read-only operation, potential rate limits, authentication needs, pagination behavior, or what the output format looks like. For a tool with 4 parameters and no output schema, this is a significant gap in transparency.

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?

The description is a single, efficient sentence that states the core purpose upfront. It wastes no words and is appropriately sized for the tool's complexity. However, it could be slightly more structured by separating filtering details into a second sentence for clarity.

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

Completeness2/5

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

Given the tool has 4 parameters, no annotations, and no output schema, the description is incomplete. It doesn't explain what the output contains (e.g., member details, pagination info) or behavioral aspects like error handling. For a data retrieval tool with filtering, more context is needed to guide effective use.

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?

The schema description coverage is 100%, so the schema already documents all parameters thoroughly. The description adds minimal value by mentioning filtering by canton or party, but doesn't provide additional context beyond what's in the schema. This meets the baseline for high schema coverage.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/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: 'List current or past Swiss Parliament members (National Council and Council of States).' It specifies the resource (Parliament members) and scope (Swiss, both chambers), and includes the verb 'List' with filtering capabilities. However, it doesn't explicitly differentiate from sibling tools like 'get_politician_interests' or 'get_parliament_votes', which reduces the score from a 5.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It mentions filtering options but doesn't specify prerequisites, exclusions, or compare it to related tools such as 'get_politician_interests' or 'search_parliament_business'. This leaves the agent without context for tool selection.

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

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/vikramgorla/mcp-swiss'

If you have feedback or need assistance with the MCP directory API, please join our Discord server