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)",
          },
        },
      },
    },
Behavior2/5

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

No annotations are provided, so the description carries full burden. It states the tool 'Returns speaker info and speech details', which adds some behavioral context about output content. However, it doesn't disclose critical traits like whether this is a read-only operation, rate limits, authentication needs, pagination behavior (beyond the limit parameter), or error handling. For a tool with no annotations, this leaves significant gaps in understanding its behavior.

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 appropriately concise with two sentences that directly state the purpose and return values. It's front-loaded with the core function and avoids unnecessary words. However, it could be slightly more structured by explicitly separating purpose from output details.

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

Completeness3/5

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

Given 2 parameters with full schema coverage but no annotations and no output schema, the description provides basic purpose and output content but lacks completeness. It doesn't explain the return format structure, error conditions, or behavioral constraints needed for a tool that fetches parliamentary data. The context is adequate for simple use but incomplete for robust agent operation.

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 both parameters well-documented in the schema (affair_id as 'OpenParlData affair ID' with source hint, limit with default and max values). The description doesn't add any parameter semantics beyond what the schema already provides, so it meets the baseline of 3 where the schema does the heavy lifting.

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: 'Get debate speeches and contributions for a specific parliamentary affair' with the verb 'get' and resource 'debate speeches and contributions'. It distinguishes from siblings like 'search_parliament_business' by focusing on speeches rather than business listings, but doesn't explicitly differentiate from 'get_parliamentary_documents' or 'get_parliament_votes' which might overlap in parliamentary context.

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

Usage Guidelines3/5

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

The description implies usage context by mentioning 'for a specific parliamentary affair' and the input schema hints at dependency on 'search_parliament_business results' for the affair_id. However, it lacks explicit guidance on when to use this tool versus alternatives like 'get_parliamentary_documents' or 'get_parliament_votes', and doesn't mention prerequisites or exclusions.

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