Skip to main content
Glama

get_legal_institutions

Retrieve comprehensive listings of Polish legal institutions, including ministries, authorities, and organizations involved in creating or implementing laws.

Instructions

Get list of all institutions involved in Polish legal acts (ministries, authorities, organizations that issue or are affected by laws).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • app.py:766-770 (registration)
    Registers the 'get_legal_institutions' tool using the @app.tool decorator, specifying name, description, and tags.
    @app.tool(
        name="get_legal_institutions",
        description="Get list of all institutions involved in Polish legal acts (ministries, authorities, organizations that issue or are affected by laws).",
        tags={"metadata", "institutions", "reference", "legal-analysis"}
    )
  • app.py:771-805 (handler)
    The handler function 'get_institutions_list' that executes the tool logic, fetching the list of legal institutions from the Sejm API.
    def get_institutions_list() -> list[str]:
        """Fetches a list of all institutions involved in legal acts.
    
        Retrieves the complete list of institutions, ministries, authorities, and organizations
        that are involved in creating, issuing, or being affected by Polish legal acts. This
        includes government bodies, ministries, regulatory authorities, and other entities.
    
        Returns:
            list[str]: List of institution names in Polish, representing all entities involved
                       in the legal process. Returns empty list if request fails.
    
        Examples:
            User asks: "What institutions are involved in legal acts?":
                Returns: ['MIN. SPRAWIEDLIWOŚCI', 'MIN. FINANSÓW', 'MIN. ZDROWIA', 'SEJM', ...]
            User asks: "Show me all institutions that create laws":
                Returns: ['Prezydent', 'Rada Ministrów', 'Ministerstwa', 'Sejm', ...]
            User asks: "What organizations issue legal documents?":
                Returns: ['MIN. EDUKACJI NARODOWEJ', 'MIN. OBRONY NARODOWEJ', 'NBP', ...]
            User asks: "List all authorities involved in Polish legislation":
                Returns: ['Sejm RP', 'Senat RP', 'Prezydent RP', 'Rada Ministrów', ...]
            User asks: "What bodies can pass laws in Poland?":
                Returns: ['PARLAMENT', 'PREZYDENT', 'RADA MINISTRÓW', 'MINISTERSTWA', ...]
        """
        logger.debug("get_institutions_list called")
        try:
            url = "https://api.sejm.gov.pl/eli/institutions"
            response = requests.get(url, headers={"Accept": "application/json"})
            response.raise_for_status()
    
            data = response.json()
            logger.info(f"get_institutions_list retrieved {len(data)} institutions")
            return data
        except Exception as e:
            logger.error(f"Error: {e}")
            return []
Behavior2/5

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

No annotations are provided, so the description carries the full burden. It states this is a 'Get list' operation, implying a read-only, non-destructive action, but doesn't disclose behavioral traits like rate limits, authentication needs, pagination, or response format. For a tool with zero annotation coverage, this is inadequate.

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 a single, efficient sentence that front-loads the purpose ('Get list of all institutions...') and includes clarifying examples. There's no wasted text, and it's appropriately sized for a simple list-retrieval tool.

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 simplicity (0 parameters, output schema exists), the description is minimally complete. It explains what the tool returns (institutions involved in Polish legal acts) but lacks behavioral context due to no annotations. The output schema should cover return values, so the description doesn't need to detail those.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 0 parameters with 100% coverage, so the schema fully documents the lack of inputs. The description doesn't need to add parameter details, and it correctly implies no filtering or arguments by stating 'all institutions.' This meets the baseline for tools with no parameters.

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 verb ('Get list of') and resource ('all institutions involved in Polish legal acts'), with specific examples (ministries, authorities, organizations). It distinguishes from siblings like get_legal_publishers or get_legal_types by focusing on institutions rather than publishers, types, or keywords. However, it doesn't explicitly contrast with all siblings, so it's not a perfect 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 doesn't mention prerequisites, exclusions, or compare to sibling tools like get_legal_publishers or get_legal_statuses, leaving the agent to infer usage context. This is a significant gap in a server with many legal-related tools.

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/numikel/law-scrapper-mcp'

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