Skip to main content
Glama

get_legal_publishers

Retrieve metadata and publication years for Polish legal act publishers like Dziennik Ustaw and Monitor Polski to support legal research.

Instructions

Get list of all legal act publishers (Dziennik Ustaw, Monitor Polski) with their metadata and publication years.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • app.py:331-367 (handler)
    The handler function `get_publishers_list` that implements the core logic of fetching the list of legal publishers from the Sejm API endpoint https://api.sejm.gov.pl/eli/acts. It returns a list of publisher metadata or empty list on error.
    def get_publishers_list() -> list:
        """Fetches a list of all available legal act publishers (journals) from the Sejm API.
    
        Publishers are the official gazettes where legal acts are published in Poland.
        The main publishers are Dziennik Ustaw (DU) and Monitor Polski (MP), each containing
        different types of legal documents with their own numbering systems.
    
        Returns:
            list: A list of publisher objects containing code, name, shortName, actsCount, and years.
                  Returns empty list if request fails.
    
        Examples:
            User asks: "What publishers are available?":
                Returns: [{'code': 'DU', 'name': 'Dziennik Ustaw', 'actsCount': 96086}, {'code': 'MP', 'name': 'Monitor Polski', 'actsCount': 65485}]
            User asks: "Show me all legal act publishers":
                Returns: [{'code': 'DU', 'name': 'Dziennik Ustaw', 'actsCount': 96086}, ...]
            User asks: "What journals publish Polish law acts?":
                Returns: [{'code': 'DU', 'name': 'Dziennik Ustaw', 'actsCount': 96086}, {'code': 'MP', 'name': 'Monitor Polski', 'actsCount': 65485}]
            User asks: "List all available publishers":
                Returns: [{'code': 'DU', 'name': 'Dziennik Ustaw', 'actsCount': 96086}, {'code': 'MP', 'name': 'Monitor Polski', 'actsCount': 65485}]
            User asks: "What sources contain Polish legal acts?":
                Returns: [{'code': 'DU', 'name': 'Dziennik Ustaw', 'actsCount': 96086}, {'code': 'MP', 'name': 'Monitor Polski', 'actsCount': 65485}]
        """
        logger.debug("get_publishers_list called")
        try:
            url = "https://api.sejm.gov.pl/eli/acts"
            logger.debug(f"Making GET request to: {url}")
            response = requests.get(url, headers={"Accept": "application/json"})
            response.raise_for_status()
    
            data = response.json()
            logger.info(f"get_publishers_list retrieved {len(data)} publishers")
            return data
        except Exception as e:
            logger.error(f"Error: {e}")
            return []
  • app.py:326-330 (registration)
    The FastMCP tool registration decorator that registers the `get_legal_publishers` tool with name, description, and tags.
    @app.tool(
        name="get_legal_publishers",
        description="Get list of all legal act publishers (Dziennik Ustaw, Monitor Polski) with their metadata and publication years.",
        tags={"metadata", "publishers", "reference", "sources"}
    )
Behavior3/5

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

With no annotations provided, the description carries the full burden. It discloses the tool returns a list with metadata and publication years, which is useful behavioral context. However, it doesn't mention pagination, rate limits, authentication needs, or whether the list is sorted/filtered. For a zero-parameter read tool, this is adequate but minimal.

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?

Single sentence that efficiently states the action, resource, scope ('all'), and output details (metadata and publication years). No wasted words, and the information is front-loaded with the core purpose.

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

Completeness4/5

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

Given the tool has zero parameters, no annotations, but an output schema exists, the description is reasonably complete. It explains what the tool does and what it returns, which complements the output schema. For a simple list-fetching tool, this covers the essentials, though more behavioral context (e.g., sorting) could enhance it.

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 tool has zero parameters (schema coverage 100%), so there are no parameters to document. The description appropriately doesn't discuss parameters, focusing instead on what the tool returns. Baseline for zero parameters is 4, as the description adds value about the output without unnecessary parameter details.

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 verb 'Get' and the resource 'list of all legal act publishers' with specific examples (Dziennik Ustaw, Monitor Polski). It distinguishes from siblings like get_publisher_details (which likely gets details for a specific publisher) and get_publisher_year_acts (which likely gets acts for a specific publisher/year).

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 when needing a comprehensive list of publishers with metadata and publication years, but doesn't explicitly state when to use this vs. alternatives like get_publisher_details or get_legal_institutions. No explicit exclusions or prerequisites are mentioned.

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