Skip to main content
Glama

Czytanie treści aktu

read_act_content
Read-onlyIdempotent

Read a loaded legal act's table of contents or a specific section's content. Pass an ELI identifier and optionally a section to retrieve its text; omit section to list available sections.

Instructions

Czytaj treść załadowanego aktu prawnego po sekcjach.

WYMAGANIE: Akt musi być wcześniej załadowany za pomocą get_act_details(eli=..., load_content=True).

Bez parametru section zwraca spis treści (listę sekcji). Z parametrem section zwraca treść wybranej sekcji.

Kiedy użyć: Aby czytać treść konkretnej sekcji załadowanego aktu. Kiedy NIE używać: Aby zobaczyć metadane → użyj get_act_details.

Przykłady:

  • read_act_content(eli="DU/2024/1692") - Spis treści (lista sekcji)

  • read_act_content(eli="DU/2024/1692", section="Art. 1") - Treść artykułu 1

  • read_act_content(eli="DU/2024/1692", section="Rozdział 1") - Treść rozdziału 1

  • read_act_content(eli="DU/2024/1692", section="Dział II") - Treść działu II

  • read_act_content(eli="MP/2024/100") - Spis treści aktu z MP

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
eliYesIdentyfikator ELI aktu. Format: "{wydawca}/{rok}/{pozycja}". Wydawcy: DU (Dziennik Ustaw), MP (Monitor Polski). Przykłady: "DU/2024/1716", "MP/2023/500", "DU/2024/1". Akt MUSI być wcześniej załadowany przez get_act_details(eli=..., load_content=True).
limitNoMaksymalna liczba elementów lub znaków na stronie. Domyślnie zależy od trybu odczytu.
offsetNoNieujemne przesunięcie początku strony. Domyślnie 0.
sectionNoIdentyfikator sekcji do odczytania. Można użyć surowego ID (np. 'art_1') lub formy czytelnej (np. 'Art. 1', 'Rozdział 1') - obsługiwane jest elastyczne dopasowanie. Aby poznać dostępne section_id, użyj get_act_details(load_content=true) i sprawdź tabelę treści. Jeśli None — zwraca spis treści z dostępnymi sekcjami.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
dataYesThe actual response data
hintsNoSuggested next steps

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv4.4.0
    • removedOutput schema / properties / metadata
      Removed value: -{
      -  "additionalProperties": true,
      -  "description": "Additional metadata",
      -  "title": "Metadata",
      -  "type": "object"
      -}
  2. Changed13 schema fields changedv3.1.0
    • addedInput schema / properties / eli / title
      Added value: +"Eli"
    • addedInput schema / properties / limit
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "integer"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "Maksymalna liczba elementów lub znaków na stronie. Domyślnie zależy od trybu odczytu.",
      +  "title": "Limit"
      +}
    • addedInput schema / properties / offset
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "integer"
      +    }
      +  ],
      +  "default": 0,
      +  "description": "Nieujemne przesunięcie początku strony. Domyślnie 0.",
      +  "title": "Offset"
      +}
    • addedInput schema / properties / section / title
      Added value: +"Section"
    • addedInput schema / title
      Added value: +"read_act_contentArguments"
    • addedOutput schema / $defs
      Added value: +{
      +  "ContentOutput": {
      +    "description": "Output for act content.",
      +    "properties": {
      +      "content": {
      +        "title": "Content",
      +        "type": "string"
      +      },
      +      "eli": {
      +        "title": "Eli",
      +        "type": "string"
      +      },
      +      "page_info": {
      +        "$ref": "#/$defs/PageInfo"
      +      },
      +      "section_id": {
      +        "anyOf": [
      +          {
      +            "type": "string"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "default": null,
      +        "title": "Section Id"
      +      },
      +      "section_title": {
      +        "title": "Section Title",
      +        "type": "string"
      +      },
      +      "toc": {
      +        "default": [],
      +        "items": {
      +          "additionalProperties": true,
      +          "type": "object"
      +        },
      +        "title": "Toc",
      +        "type": "array"
      +      }
      +    },
      +    "required": [
      +      "eli",
      +      "section_title",
      +      "content",
      +      "page_info"
      +    ],
      +    "title": "ContentOutput",
      +    "type": "object"
      +  },
      +  "Hint": {
      +    "description": "Hint for next actions or related tools.",
      +    "properties": {
      +      "message": {
      +        "description": "Hint message",
      +        "title": "Message",
      +        "type": "string"
      +      },
      +      "parameters": {
      +        "anyOf": [
      +          {
      +            "additionalProperties": true,
      +            "type": "object"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "default": null,
      +        "description": "Suggested parameters",
      +        "title": "Parameters"
      +      },
      +      "tool": {
      +        "anyOf": [
      +          {
      +            "type": "string"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "default": null,
      +        "description": "Related tool name",
      +        "title": "Tool"
      +      }
      +    },
      +    "required": [
      +      "message"
      +    ],
      +    "title": "Hint",
      +    "type": "object"
      +  },
      +  "PageInfo": {
      +    "description": "Metadata describing one bounded response page.",
      +    "properties": {
      +      "limit": {
      +        "minimum": 0,
      +        "title": "Limit",
      +        "type": "integer"
      +      },
      +      "next_offset": {
      +        "anyOf": [
      +          {
      +            "minimum": 0,
      +            "type": "integer"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "default": null,
      +        "title": "Next Offset"
      +      },
      +      "offset": {
      +        "minimum": 0,
      +        "title": "Offset",
      +        "type": "integer"
      +      },
      +      "returned_count": {
      +        "minimum": 0,
      +        "title": "Returned Count",
      +        "type": "integer"
      +      },
      +      "total_count": {
      +        "minimum": 0,
      +        "title": "Total Count",
      +        "type": "integer"
      +      },
      +      "unit": {
      +        "$ref": "#/$defs/PageUnit"
      +      },
      +      "was_truncated": {
      +        "title": "Was Truncated",
      +        "type": "boolean"
      +      }
      +    },
      +    "required": [
      +      "limit",
      +      "offset",
      +      "returned_count",
      +      "total_count",
      +      "was_truncated",
      +      "unit"
      +    ],
      +    "title": "PageInfo",
      +    "type": "object"
      +  },
      +  "PageUnit": {
      +    "description": "Unit represented by a page.",
      +    "enum": [
      +      "items",
      +      "characters"
      +    ],
      +    "title": "PageUnit",
      +    "type": "string"
      +  }
      +}
    • addedOutput schema / properties / data
      Added value: +{
      +  "$ref": "#/$defs/ContentOutput",
      +  "description": "The actual response data"
      +}
    • addedOutput schema / properties / hints
      Added value: +{
      +  "description": "Suggested next steps",
      +  "items": {
      +    "$ref": "#/$defs/Hint"
      +  },
      +  "title": "Hints",
      +  "type": "array"
      +}
    • addedOutput schema / properties / metadata
      Added value: +{
      +  "additionalProperties": true,
      +  "description": "Additional metadata",
      +  "title": "Metadata",
      +  "type": "object"
      +}
    • removedOutput schema / properties / result
      Removed value: -{
      -  "type": "string"
      -}
    • changedOutput schema / required
      Previous value: -[
      -  "result"
      -]New value: +[
      +  "data"
      +]
    • addedOutput schema / title
      Added value: +"EnrichedResponse[ContentOutput]"
    • removedOutput schema / x-fastmcp-wrap-result
      Removed value: -true
  3. Addedv1.0.2

TDQS

A4.9/5.0
Behavior5/5

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

Annotations already establish readOnlyHint and idempotentHint, and the description adds meaningful behavioral context: no section returns a table of contents, a section returns its content, and the act must be preloaded. This goes beyond the annotations without contradicting them.

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?

Well-structured, front-loaded with the core purpose, then requirements, usage guidance, and examples. Every block earns its place; the examples are compact and directly illustrate valid parameter combinations without unnecessary prose.

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?

Given the output schema exists and annotations cover safety, the description is complete: it states prerequisites, behavior variants, when to use/not use, and provides examples. Nothing critical is missing for an agent to invoke the tool correctly.

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. The description adds value beyond the schema by giving disambiguating examples for the section parameter ('Art. 1', 'Rozdział 1', 'Dział II') and showing eli variants for both DU and MP publishers, clarifying intended usage.

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?

Description opens with a specific verb and resource: 'Czytaj treść załadowanego aktu prawnego po sekcjach.' It clearly differentiates from the sibling get_act_details by explicitly stating that metadata should be obtained there, making the scope unambiguous.

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?

Provides an explicit prerequisite (act must be loaded with get_act_details(eli=..., load_content=True)), a dedicated 'Kiedy użyć' section, a 'Kiedy NIE używać' section naming the alternative, and concrete invocation examples. This fully routes the agent to the correct tool and usage pattern.

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