Skip to main content
Glama

Śledzenie zmian w prawie

track_legal_changes
Read-onlyIdempotent

Monitor legal changes by retrieving Polish acts published or amended in a specified date range. Filter by keywords, publisher, and date to isolate relevant regulatory updates.

Instructions

Śledź zmiany prawne i nowe publikacje w zakresie dat.

Zwraca akty prawne opublikowane lub zmienione w podanym zakresie dat. Wyniki zapisywane są do result_set_id — użyj filter_results aby je zawęzić (np. po typie dokumentu lub wzorcem regex w tytule).

Przykłady:

  • track_legal_changes(date_from="2025-01-01") - Zmiany od początku 2025

  • track_legal_changes(date_from="2024-01-01", date_to="2024-12-31") - Zmiany w 2024

  • track_legal_changes(date_from="2024-01-01", keywords=["podatek"]) - Zmiany podatkowe w 2024

  • track_legal_changes(date_from="2024-06-01", publisher="MP") - Zmiany w MP od czerwca 2024

  • track_legal_changes(date_from="2024-01-01", keywords=["zdrowotny"]) - Zmiany zdrowotne

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNoMaksymalna liczba zmian na stronie odpowiedzi (domyślnie 20, maks. 100).
offsetNoNieujemne przesunięcie strony zmian.
date_toNoData końcowa śledzenia (YYYY-MM-DD). Domyślnie dzisiejsza data.
keywordsNoSłowa kluczowe do filtrowania zmian (logika AND). Np. ['podatek'], ['zdrowotny', 'ubezpieczenie'].
date_fromYesData początkowa śledzenia (YYYY-MM-DD). Np. '2024-01-01'.
publisherNoKod wydawcy: 'DU' (Dziennik Ustaw) lub 'MP' (Monitor Polski). Domyślnie 'DU'.DU

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. Changed4 schema fields changedv4.2.0
    • addedOutput schema / $defs / ActSummaryOutput / properties / effective_date / description
      Added value: +"Data wejścia w życie (entryIntoForce)."
    • addedOutput schema / $defs / ChangesOutput / properties / result_set_scope
      Added value: +{
      +  "anyOf": [
      +    {
      +      "$ref": "#/$defs/ResultSetScope"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "Zasięg zapisanego zestawu zmian: 'complete', gdy pierwsza strona mieści cały zakres dat, albo 'page', gdy zakres jest szerszy niż jedna strona — wtedy filter_results przeszukuje tylko to okno."
      +}
    • addedOutput schema / $defs / ResultSetScope
      Added value: +{
      +  "description": "Zasięg zestawu wyników względem korpusu, z którego pochodzi.",
      +  "properties": {
      +    "corpus_count": {
      +      "anyOf": [
      +        {
      +          "type": "integer"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ],
      +      "default": null,
      +      "description": "Rozmiar korpusu, z którego pochodzi zestaw. None, gdy nieznany — tak jest dla zestawu powstałego z filtrowania okna: wiadomo, ile rekordów trafiło w oknie, nie wiadomo, ile rekordów korpusu pasowałoby do tych samych kryteriów.",
      +      "title": "Corpus Count"
      +    },
      +    "scope": {
      +      "$ref": "#/$defs/SetScope",
      +      "description": "'complete' — zestaw zawiera każdy rekord pasujący do zapytania w chwili wywołania. 'page' — zestaw jest oknem wyciętym z większego korpusu, więc brak dopasowania w filter_results NIE dowodzi, że akt nie istnieje w zbiorze."
      +    },
      +    "stored_count": {
      +      "description": "Liczba rekordów w tym zestawie.",
      +      "title": "Stored Count",
      +      "type": "integer"
      +    },
      +    "window_offset": {
      +      "description": "Pozycja początku okna w korpusie. Zero dla zestawu kompletnego.",
      +      "title": "Window Offset",
      +      "type": "integer"
      +    }
      +  },
      +  "required": [
      +    "scope",
      +    "stored_count",
      +    "window_offset"
      +  ],
      +  "title": "ResultSetScope",
      +  "type": "object"
      +}
    • addedOutput schema / $defs / SetScope
      Added value: +{
      +  "description": "Whether a stored result set is the whole answer or a window into it.",
      +  "enum": [
      +    "complete",
      +    "page"
      +  ],
      +  "title": "SetScope",
      +  "type": "string"
      +}
  3. Changed15 schema fields changedv3.1.0
    • addedInput schema / properties / date_from / title
      Added value: +"Date From"
    • addedInput schema / properties / date_to / title
      Added value: +"Date To"
    • addedInput schema / properties / keywords / title
      Added value: +"Keywords"
    • addedInput schema / properties / limit
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "integer"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": 20,
      +  "description": "Maksymalna liczba zmian na stronie odpowiedzi (domyślnie 20, maks. 100).",
      +  "title": "Limit"
      +}
    • addedInput schema / properties / offset
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "integer"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": 0,
      +  "description": "Nieujemne przesunięcie strony zmian.",
      +  "title": "Offset"
      +}
    • addedInput schema / properties / publisher / title
      Added value: +"Publisher"
    • addedInput schema / title
      Added value: +"track_legal_changesArguments"
    • addedOutput schema / $defs
      Added value: +{
      +  "ActSummaryOutput": {
      +    "description": "Formatted output for act summary.",
      +    "properties": {
      +      "effective_date": {
      +        "anyOf": [
      +          {
      +            "type": "string"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "default": null,
      +        "title": "Effective Date"
      +      },
      +      "eli": {
      +        "title": "Eli",
      +        "type": "string"
      +      },
      +      "in_force": {
      +        "anyOf": [
      +          {
      +            "type": "string"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "default": null,
      +        "title": "In Force"
      +      },
      +      "pos": {
      +        "title": "Pos",
      +        "type": "integer"
      +      },
      +      "promulgation_date": {
      +        "anyOf": [
      +          {
      +            "type": "string"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "default": null,
      +        "title": "Promulgation Date"
      +      },
      +      "publisher": {
      +        "title": "Publisher",
      +        "type": "string"
      +      },
      +      "status": {
      +        "title": "Status",
      +        "type": "string"
      +      },
      +      "title": {
      +        "title": "Title",
      +        "type": "string"
      +      },
      +      "type": {
      +        "anyOf": [
      +          {
      +            "type": "string"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "default": null,
      +        "title": "Type"
      +      },
      +      "year": {
      +        "title": "Year",
      +        "type": "integer"
      +      }
      +    },
      +    "required": [
      +      "eli",
      +      "publisher",
      +      "year",
      +      "pos",
      +      "title",
      +      "status"
      +    ],
      +    "title": "ActSummaryOutput",
      +    "type": "object"
      +  },
      +  "ChangesOutput": {
      +    "description": "Output for tracked changes.",
      +    "properties": {
      +      "changes": {
      +        "items": {
      +          "$ref": "#/$defs/ActSummaryOutput"
      +        },
      +        "title": "Changes",
      +        "type": "array"
      +      },
      +      "date_range": {
      +        "title": "Date Range",
      +        "type": "string"
      +      },
      +      "keywords": {
      +        "items": {
      +          "type": "string"
      +        },
      +        "title": "Keywords",
      +        "type": "array"
      +      },
      +      "page_info": {
      +        "$ref": "#/$defs/PageInfo"
      +      },
      +      "publisher": {
      +        "title": "Publisher",
      +        "type": "string"
      +      },
      +      "result_set_id": {
      +        "anyOf": [
      +          {
      +            "type": "string"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "default": null,
      +        "title": "Result Set Id"
      +      },
      +      "total_count": {
      +        "title": "Total Count",
      +        "type": "integer"
      +      }
      +    },
      +    "required": [
      +      "date_range",
      +      "publisher",
      +      "keywords",
      +      "changes",
      +      "total_count",
      +      "page_info"
      +    ],
      +    "title": "ChangesOutput",
      +    "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/ChangesOutput",
      +  "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[ChangesOutput]"
    • removedOutput schema / x-fastmcp-wrap-result
      Removed value: -true
  4. Addedv1.0.2

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already signal read-only, open-world, idempotent, and non-destructive behavior. The description adds meaningful behavioral context by disclosing that results are saved to result_set_id and can be further filtered via filter_results. It also explains the matching rule: acts published or changed in the supplied date range.

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?

The description is front-loaded with the core purpose and then provides a clear result-set note followed by practical examples. The examples are somewhat repetitive but compact and helpful for understanding parameter usage. There is no filler or unnecessary explanation.

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?

For a date-based legal-change listing tool, the description covers the essential behavior, the result_set_id handoff, and representative parameter usage. An output schema exists, so the return structure does not need to be repeated. It could more explicitly contrast with sibling tools, but that gap is mostly captured under usage guidelines.

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 describes all six parameters with 100% coverage, so the baseline of 3 applies. The description's examples usefully illustrate valid combinations of date_from, date_to, keywords, and publisher, but they do not add significant meaning beyond the schema. Limit, offset, and date format are already handled by the schema.

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 states a specific verb and resource: it returns legal acts published or changed within a given date range. This clearly distinguishes it from sibling tools like search_legal_acts or browse_acts by its date-change focus. The examples reinforce the purpose without relying on the title alone.

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

Usage Guidelines4/5

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

The description provides clear context: use this tool for legal changes/new publications by date, and then narrow results with filter_results. It gives concrete examples for date_from, date_to, keywords, and publisher. It does not explicitly name alternative sibling tools or state when not to use them, so it stops short of a 5.

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