Skip to main content
Glama

get_politician_interests

Retrieve declared interests and mandates for Swiss parliament members, including board memberships, consulting roles, and organizational affiliations.

Instructions

Get declared interests and mandates of a Swiss parliament member — board memberships, consulting roles, organizations.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
person_idYesOpenParlData person ID (get from get_parliament_members results)

Implementation Reference

  • The `getPoliticianInterests` function fetches and parses interests of a Swiss parliament member from OpenParlData.
    async function getPoliticianInterests(args: {
      person_id: number;
    }): Promise<string> {
      const url = buildUrl(`/persons/${args.person_id}/interests`, {
        lang: "de",
        lang_format: "flat",
      });
      const resp = await apiFetch<InterestRecord>(url);
    
      const interests = resp.data.map((i) => ({
        id: i.id,
        name: i.name_de,
        type: i.type_de,
        role: i.role_name_de,
        payment: i.type_payment_de,
        category: i.group_de,
        url: i.url,
      }));
    
      return truncate(
        JSON.stringify({
          count: interests.length,
          personId: args.person_id,
          interests,
        })
      );
    }
  • The input schema definition for the `get_politician_interests` tool.
      name: "get_politician_interests",
      description:
        "Get declared interests and mandates of a Swiss parliament member — board memberships, consulting roles, organizations.",
      inputSchema: {
        type: "object" as const,
        required: ["person_id"],
        properties: {
          person_id: {
            type: "number",
            description:
              "OpenParlData person ID (get from get_parliament_members results)",
          },
        },
      },
    },
  • The tool registration and dispatch logic for `get_politician_interests` in the `handleParliament` function.
    case "get_politician_interests":
      return getPoliticianInterests(args as { person_id: number });

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