Skip to main content
Glama

search_parliament_speeches

Retrieve parliamentary debate speeches and speaker details for specific Swiss affairs to analyze legislative discussions and contributions.

Instructions

Get debate speeches and contributions for a specific parliamentary affair. Returns speaker info and speech details.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
affair_idYesOpenParlData affair ID (get from search_parliament_business results)
limitNoMax speeches to return (default: 5, max: 20)

Implementation Reference

  • The handler function 'searchParliamentSpeeches' that fetches speeches for a parliamentary affair from the OpenParlData API.
    async function searchParliamentSpeeches(args: {
      affair_id: number;
      limit?: number;
    }): Promise<string> {
      const limit = Math.min(args.limit ?? 5, 20);
      const url = buildUrl(`/affairs/${args.affair_id}/speeches`, {
        lang: "de",
        lang_format: "flat",
        limit,
      });
      const resp = await apiFetch<SpeechRecord>(url);
    
      const speeches = resp.data.map((s) => ({
        id: s.id,
        speaker: s.person_fullname,
        personId: s.person_id,
        party: s.party_de,
        type: s.speech_type_de,
        text: s.text_de
          ? s.text_de.length > 500
            ? s.text_de.slice(0, 500) + "…"
            : s.text_de
          : null,
        time: s.begin_time,
        durationSeconds: s.duration_seconds,
      }));
    
      return truncate(
        JSON.stringify({
          count: speeches.length,
          total: resp.meta.total_records,
          affairId: args.affair_id,
          speeches,
        })
      );
    }
  • Tool schema definition for 'search_parliament_speeches' defining input properties such as affair_id and limit.
    {
      name: "search_parliament_speeches",
      description:
        "Get debate speeches and contributions for a specific parliamentary affair. Returns speaker info and speech details.",
      inputSchema: {
        type: "object" as const,
        required: ["affair_id"],
        properties: {
          affair_id: {
            type: "number",
            description:
              "OpenParlData affair ID (get from search_parliament_business results)",
          },
          limit: {
            type: "number",
            description: "Max speeches to return (default: 5, max: 20)",
          },
        },
      },
    },

Tool Definition Quality

Score is being calculated. Check back soon.

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