Skip to main content
Glama

search_parliament_business

Search Swiss Parliament political affairs including bills, motions, and questions using OpenParlData.ch full-text search across the Federal Assembly.

Instructions

Search Swiss Parliament political affairs — bills, motions, interpellations, postulates, questions, and initiatives. Uses OpenParlData.ch full-text search across the Federal Assembly (Bundesversammlung).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYesSearch term (e.g. 'Klimaschutz', 'AHV', 'Neutralität')
limitNoMax results (default: 5, max: 20)

Implementation Reference

  • The implementation function for search_parliament_business.
    async function searchParliamentBusiness(args: {
      query: string;
      limit?: number;
    }): Promise<string> {
      const limit = Math.min(args.limit ?? 5, 20);
      const url = buildUrl("/affairs/", {
        search: args.query,
        body_key: "CHE",
        lang: "de",
        lang_format: "flat",
        sort_by: "-begin_date",
        limit,
      });
    
      const resp = await apiFetch<AffairRecord>(url);
    
      const affairs = resp.data.map((a) => ({
        id: a.id,
        number: a.number,
        title: a.title_de,
        type: a.type_name_de,
        typeCategory: a.type_harmonized_de,
        status: a.state_name_de,
        date: a.begin_date ? a.begin_date.split("T")[0] : null,
        url: a.url_external_de,
      }));
    
      return truncate(
        JSON.stringify({
          count: affairs.length,
          total: resp.meta.total_records,
          query: args.query,
          affairs,
        })
      );
    }
  • The tool registration logic that invokes the searchParliamentBusiness function.
    case "search_parliament_business":
      return searchParliamentBusiness(args as { query: string; limit?: number });
  • The MCP tool definition for search_parliament_business.
    export const parliamentTools = [
      {
        name: "search_parliament_business",
        description:
          "Search Swiss Parliament political affairs — bills, motions, interpellations, postulates, questions, and initiatives. Uses OpenParlData.ch full-text search across the Federal Assembly (Bundesversammlung).",
        inputSchema: {
          type: "object" as const,
          required: ["query"],
          properties: {
            query: {
              type: "string",
              description:
                "Search term (e.g. 'Klimaschutz', 'AHV', 'Neutralität')",
            },
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 mentions the data source and search scope but lacks details on behavioral traits such as rate limits, authentication needs, response format, or error handling, which are critical for a search tool.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

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

The description is appropriately sized and front-loaded, consisting of two efficient sentences that convey the tool's purpose and data source without unnecessary details or redundancy.

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 the tool's moderate complexity (2 parameters, no output schema, no annotations), the description is adequate but incomplete. It covers the purpose and source but lacks behavioral context and usage guidelines, leaving gaps for an AI agent to infer proper 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?

Schema description coverage is 100%, so the baseline is 3. The description does not add meaning beyond the schema, which already documents 'query' and 'limit' parameters clearly with examples and defaults.

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 tool's purpose with specific verbs ('Search Swiss Parliament political affairs') and resources ('bills, motions, interpellations, postulates, questions, and initiatives'), and distinguishes it from siblings by specifying the data source (OpenParlData.ch) and scope (Federal Assembly).

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?

No explicit guidance on when to use this tool versus alternatives is provided. While it mentions the data source, it does not specify use cases, prerequisites, or contrast with sibling tools like 'search_parliament_speeches' or 'get_parliamentary_documents'.

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