Skip to main content
Glama

get_publisher_details

Retrieve detailed information about Polish legal publishers, including act counts and publication timelines, for legal research and analysis.

Instructions

Get detailed information about a specific legal publisher including act counts and publication timeline.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
publisherYesPublisher code (DU for Dziennik Ustaw, MP for Monitor Polski)

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • app.py:368-372 (registration)
    Registration of the 'get_publisher_details' tool using the @app.tool decorator, specifying name, description, and tags.
    @app.tool(
        name="get_publisher_details",
        description="Get detailed information about a specific legal publisher including act counts and publication timeline.",
        tags={"metadata", "publishers", "reference", "sources"}
    )
  • app.py:373-414 (handler)
    The handler function 'get_publisher_info' that executes the tool logic: takes publisher code, fetches detailed info (acts count, years, etc.) from Sejm API endpoint https://api.sejm.gov.pl/eli/acts/{publisher}, handles errors by returning empty dict.
    def get_publisher_info(
        publisher: Annotated[str, "Publisher code (DU for Dziennik Ustaw, MP for Monitor Polski)"]
    ) -> dict:
        """Fetches detailed information about a specific legal act publisher.
    
        Provides comprehensive metadata about a legal publisher including publication
        statistics, available years, and document counts. This information is useful
        for understanding the scope and coverage of different legal gazettes.
    
        Args:
            publisher: Publisher code (e.g., 'DU' for Dziennik Ustaw, 'MP' for Monitor Polski).
    
        Returns:
            dict: Detailed information about the publisher containing code, name, shortName,
                  actsCount, and years array. Returns empty dict if publisher not found or error.
    
        Examples:
            User asks: "Tell me about DU publisher":
                Parameters: publisher = 'DU'
                Returns: {'code': 'DU', 'name': 'Dziennik Ustaw', 'shortName': 'Dz.U.', 'actsCount': 96086, 'years': [1918, 1919, ...]}
            User asks: "What is the Dziennik Ustaw?":
                Parameters: publisher = 'DU'
            User asks: "Give me details about Monitor Polski":
                Parameters: publisher = 'MP'
            User asks: "How many acts are in DU?":
                Parameters: publisher = 'DU'
            User asks: "What years are covered by MP?":
                Parameters: publisher = 'MP'
        """
        logger.debug(f"get_publisher_info called with publisher: {publisher}")
        try:
            url = f"https://api.sejm.gov.pl/eli/acts/{publisher}"
            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_publisher_info retrieved details for publisher: {publisher}")
            return data
        except Exception as e:
            logger.error(f"Error: {e}")
            return {}
  • Input schema definition using Annotated type hint for the 'publisher' parameter (string, e.g., 'DU' or 'MP').
    publisher: Annotated[str, "Publisher code (DU for Dziennik Ustaw, MP for Monitor Polski)"]
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 of behavioral disclosure. It states it 'gets' information, implying a read-only operation, but doesn't clarify if it requires authentication, has rate limits, returns paginated results, or what happens on invalid input. For a tool with no annotations, this leaves significant behavioral gaps.

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 core purpose ('Get detailed information about a specific legal publisher') and adds specific details ('including act counts and publication timeline'). There is no wasted text, and it's appropriately sized for the tool's complexity.

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 an output schema (which handles return values), a simple input schema with full coverage, and no annotations, the description is reasonably complete. It specifies the resource and key details returned. However, it could improve by addressing behavioral aspects like error handling or usage context, especially with no annotations.

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?

The input schema has 100% description coverage, with the 'publisher' parameter fully documented in the schema (including examples like 'DU' and 'MP'). The description adds no additional parameter semantics beyond what the schema provides, such as format details or constraints. With high schema coverage, the baseline is 3.

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') and resource ('detailed information about a specific legal publisher') with specific details about what information is included ('act counts and publication timeline'). It distinguishes from sibling tools like 'get_legal_publishers' (likely a list) by focusing on details for a specific publisher. However, it doesn't explicitly contrast with 'get_publisher_year_acts', which might be related.

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 when to choose this over 'get_legal_publishers' (for a list) or 'get_publisher_year_acts' (for year-specific acts), nor does it specify prerequisites or exclusions. Usage is implied by the purpose but not explicitly stated.

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