Skip to main content
Glama

get_act_text

Read-onlyIdempotent

Retrieves Polish legal act text from Sejm ELI in 5,000-character pages, with phrase search, HTML/PDF fallback, and consolidated versions for current wording.

Instructions

Pobiera tekst aktu, stronami po 5000 znakow czystego tekstu. Zrodlo: HTML z Sejm ELI, a gdy akt ma tylko PDF (np. nowsze obwieszczenia z tekstem jednolitym) - tekst wyodrebniony z PDF (structuredContent.text_format). Odpowiedz konczy sie licznikiem [paginacja] strona N z M, a structuredContent.pagination ma page/total_pages/has_more - iteruj page az has_more=false. Zeby trafic w konkretny przepis bez przewijania, podaj search_text (np. 'Art. 86.') - tool zwroci fragment wokol tej frazy. UWAGA: dla aktu bazowego tekst to tekst OGLOSZONY (brzmienie pierwotne), nie stan obowiazujacy - structuredContent.text_version to rozroznia. Po brzmienie aktualne podaj latest_consolidated: true (tool przejdzie do najnowszego tekstu jednolitego) albo ELI obwieszczenia z consolidated_text_eli. Bledy: text_unavailable_use_pdf (nie udalo sie odczytac tekstu ani z HTML, ani z PDF), not_found (brak frazy albo aktu), invalid_eli.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "eli": "<eli>"
    },
    "name": "get_act_text"
  }
}

Input Schema

NameRequiredDescriptionDefault
eliYesELI aktu, np. 'DU/2018/1000'.
pageNoNumer strony tekstu, liczony od 1 (5000 znakow na strone). Domyslnie 1.
sourceNo'auto' (domyslnie): HTML, gdy jest, inaczej PDF. 'pdf': wymus tekst z PDF (urzedowy PDF Dziennika Ustaw / Monitora Polskiego). 'html': tylko HTML.
occurrenceNoKtore trafienie `search_text` pokazac (od 1). Domyslnie 1. Liczba trafien jest w `structuredContent.search.occurrences`.
search_textNoFraza do znalezienia w tekscie aktu - zwraca fragment wokol trafienia zamiast strony (np. 'Art. 86.'). Ma pierwszenstwo przed `page`. Najpierw szukane z zachowaniem wielkosci liter (zeby 'Art. 86.' trafil w naglowek artykulu, a nie w odeslanie 'art. 86'), potem bez. Odstepy elastyczne, polskie znaki MAJA znaczenie.
latest_consolidatedNotrue = jesli akt ma tekst jednolity, zwroc tekst NAJNOWSZEGO obwieszczenia z tekstem jednolitym zamiast tekstu ogloszonego aktu bazowego. Domyslnie false.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.5.0

TDQS

A4.1/5.0
Behavior3/5

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

Annotations already declare readOnly/idempotent/non-destructive and open-world, so the safety profile is settled; the description still adds real behavioral content: the response ends with a '[paginacja] strona N z M' marker, `structuredContent.pagination` carries page/total_pages/has_more, and `text_version`/`text_format` signal which rendition was returned. It does not contradict the annotations, but a 3 reflects that most of the value here is schema-cross-reference rather than disclosure the annotations leave open.

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?

Front-loads what the tool returns and the source chain, then moves to pagination, targeted search, the version caveat, and error codes in a defensible order. It is a single dense paragraph with some overlap against schema text (search_text precedence, source fallback), but almost every clause carries operational information.

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?

Six parameters with no output schema would normally leave an agent guessing, but the description documents the structuredContent fields it should read (pagination, text_format, text_version, search.occurrences) and enumerates the failure modes `text_unavailable_use_pdf`, `not_found`, and `invalid_eli`. Nothing essential for a correct call or a correct interpretation of the result is missing.

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 genuinely adds cross-parameter meaning: `search_text` takes precedence over `page`, `occurrence` selects among multiple matches, and `latest_consolidated: true` can be replaced by resolving a consolidated ELI via `consolidated_text_eli`. That interaction logic is not visible from the schema alone and is what pushes it above baseline.

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?

States a specific verb+resource pair ('Pobiera tekst aktu') and pins down scope precisely: 5000-character pages of clean text, HTML from Sejm ELI with a PDF-extraction fallback. It never explicitly contrasts itself with the siblings get_act or search_acts, so an agent must infer that this is the full-text reader while the others cover metadata and discovery.

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?

Gives concrete when-and-how guidance for each path: iterate `page` until `has_more=false`, pass `search_text` (e.g. 'Art. 86.') to jump to a provision instead of scrolling, and use `latest_consolidated: true` or a consolidated ELI to get the binding version rather than the original. It also flags the trap case — that the base act text is the originally published wording, not the current state.

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

Deploy Server

Other Tools