Skip to main content
Glama

Polish Legal Acts API – Dziennik Ustaw & ELI

polish-legal-acts-eli
Read-onlyIdempotent

Search and monitor Polish legal acts via the official Sejm ELI API by year, date range, title, keywords, act type, and in-force status; optionally include details and extracted text.

Instructions

Lists Polish legal acts from the official Sejm ELI API (Dziennik Ustaw or Monitor Polski), filtered by year or date range, title stem, ELI keywords, act type and in-force status; each item is act metadata, with includeDetails adding keywords, references, issuing bodies and inForce, and includeText adding extracted HTML/PDF text (no OCR, charged at a higher rate). Use it for bulk lists or monitoring of acts; to read one act or article interactively use polish-law-mcp-server. Read-only: it only queries the public source and never writes to the registry; onlyNew merely keeps a stateKey memory in your own Apify account. Each call needs the APIFY_TOKEN env var and starts one paid run of the Apify Actor enterprising_hamster/polish-legal-acts-eli on your Apify account, billed pay-per-event per delivered item plus any Apify platform usage; the server waits up to 300 s for the run and returns JSON {items, truncated} with at most maxItems (max 100) items and 256 KiB.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "polish-legal-acts-eli"
  }
}

Input Schema

NameRequiredDescriptionDefault
yearNoOptional publication year; defaults to the current year when dateFrom is empty. Omit it to search across years within a date range.
dateToNoOptional inclusive upper date bound in YYYY-MM-DD format. Must be on or after dateFrom. Omit unused date fields.
onlyNewNoSkip previously delivered ELI plus changeDate revisions stored in a named key-value store. Retains the latest 50,000 revisions. Use serial runs for each stateKey and an overlapping publication date range to revisit changed acts.
actTypesNoExact Polish types, for example Ustawa, Rozporządzenie, or Obwieszczenie. One type is filtered by the API. Multiple types are matched locally with OR and can require more search pages.
dateFromNoInclusive lower date bound in YYYY-MM-DD format. Required when year is omitted. dateField selects the date being filtered.
keywordsNoOfficial Polish ELI subject keywords, sent as a comma-separated keyword parameter. Empty means no keyword filter.
maxItemsNoHard cap on delivered dataset items. Seen revisions and filtered act types do not count toward this limit.
stateKeyNoIndependent revision set within the named polish-legal-acts-seen store. Use 1-100 letters, digits, underscores, or hyphens. Changing this key starts a new monitoring history.
dateFieldNoPromulgation uses pubDateFrom/pubDateTo, announcement uses dateFrom/dateTo, and effect uses dateEffectFrom/dateEffectTo in the ELI API.promulgation
publisherNoDU searches Dziennik Ustaw. MP searches Monitor Polski.DU
sortOrderNoNewest means descending API publication position; oldest means ascending. Across years this does not guarantee chronological date order. Use year for one year's positions.newest
inForceOnlyNoAsk the ELI API to return only acts marked in force. Output inForce requires details when the search response omits it.
includeTextNoExtract available HTML or PDF text. Successful text costs USD 0.008 per act. Missing or failed text costs the metadata rate of USD 0.002. No OCR is provided.
maxTextCharsNoZero means no user cutoff. An automatic ceiling of 8,000,000 characters and a JSON byte budget below the 9 MB dataset-item limit still apply. Positive values impose a smaller cutoff. textLength counts retained characters; textTruncated reports any truncation.
titleContainsNoOptional title search. Polish inflection matters. Use the stem podatk for tax acts; podatek may return no matches. Omit this field for all titles.
includeDetailsNoFetch each act's details for keywords, references, issuing bodies, and inForce. Adds one request per act. Disable for search metadata only.
maxRequestsPerSecondNoShared rate cap for search, details, text, and retries. Default 3 requests per second, maximum 10, with at most 2 requests in flight. Lower it during source outages.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.6/5.0
Behavior4/5

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

Annotations already declare read-only, idempotent, open-world and non-destructive, and the description reinforces that with 'it only queries the public source and never writes to the registry', clarifying that onlyNew persists state only in the caller's own Apify account. It adds cost model (pay-per-event per item plus platform usage), billing/auth requirement (APIFY_TOKEN), a 300 s wait ceiling, and the 256 KiB / maxItems 100 return caps. Remaining gap is minor (no error/failure semantics beyond text-extraction failures), so not a 5.

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?

A single dense paragraph that is correctly front-loaded: purpose and filters first, sibling routing second, side effects and billing last. Every clause carries information, though the block is long enough that cost/auth/return-shape details run together and would read better split.

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

Completeness5/5

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

With 17 optional parameters and no output schema, the description supplies the missing pieces an agent needs: the return shape {items, truncated}, the item cap and byte budget, the 300 s timeout, the token requirement, and the pricing consequence. Nothing required to call it correctly is left implicit.

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?

Schema coverage is 100%, so the baseline is 3, but the description still adds cross-parameter meaning: includeDetails vs includeText tiers and their cost difference, the no-OCR limitation, and the fact that onlyNew is merely stateKey-scoped memory rather than server-side state. These relationships are not obvious from per-field schema text alone.

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?

States a specific verb and resource ('Lists Polish legal acts from the official Sejm ELI API'), names both corpora (Dziennik Ustaw / Monitor Polski) and enumerates the filter axes (year, date range, title stem, ELI keywords, act type, in-force status). It also explicitly contrasts itself with the sibling polish-law-mcp-server, so an agent can distinguish it without opening the schema.

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

Usage Guidelines5/5

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

'Use it for bulk lists or monitoring of acts; to read one act or article interactively use polish-law-mcp-server' gives both the when and the named alternative. The onlyNew/stateKey serial-run guidance and the charged-per-run warning further signal when this tool is and isn't appropriate.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.