Skip to main content
Glama

search_in_act

Search a loaded Polish legal act for a term and get contextual snippets, pagination metadata, and section details.

Instructions

Wyszukaj termin w treści załadowanego aktu prawnego.

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

Zwraca jedną stronę trafień z kontekstem, metadanymi paginacji i informacją o sekcji.

Przykłady:

  • search_in_act(eli="DU/2024/1692", query="straż") - Znajdź "straż" w akcie

  • search_in_act(eli="DU/2024/1692", query="obowiązek", context_chars=200) - Z krótszym kontekstem

  • search_in_act(eli="DU/2024/1692", query="art. 5", limit=10, offset=0) - Pierwsza strona trafień

  • search_in_act(eli="DU/2024/1692", query="kara", limit=5, offset=5) - Kolejna strona trafień

  • search_in_act(eli="DU/2024/1692", query="termin") - Domyślna strona (do 20 trafień)

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 trafień na stronie. Domyślnie 20, maksimum 100.
queryYesTermin do wyszukania w treści aktu (np. 'podatek', 'obowiązek', 'art. 5'). Wielkość liter jest ignorowana.
offsetNoNieujemne przesunięcie początku strony. Domyślnie 0.
context_charsNoLiczba znaków kontekstu przed i po każdym trafieniu. Domyślnie 500. Maksymalnie 2000 — wartości większe są przycinane do 2000, a odpowiedź zawiera wtedy wskazówkę o przycięciu. Wywołanie nie kończy się błędem.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
dataYesThe actual response data
hintsNoSuggested next steps
metadataNoAdditional metadata
Behavior4/5

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

With no annotations provided, the description carries the full disclosure burden. It discloses the return shape (one page of hits with context, pagination metadata, section info), the prerequisite load behavior, and the non-error truncation behavior for context_chars. It could additionally state what happens if the act was not previously loaded, but the prominent requirement line mitigates this gap.

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: purpose statement, then requirement, then return format, then examples. Each of the five examples demonstrates a distinct parameter combination (plain search, context_chars, limit/offset, offset continuation, defaults), so none is wasted, though the example block is slightly long.

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?

The output schema covers return values, so the description needn't explain them. The critical precondition, pagination behavior, context truncation edge case, and parameter defaults are all documented. What's missing is routing guidance across sibling tools (when to choose search_in_act over read_act_content or search_legal_acts), but the tool is callable correctly with the information provided.

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?

Schema description coverage is 100%, so the baseline is 3. The description adds marginal value via five examples showing concrete query values, context_chars, and limit/offset pagination combinations, but it does not explain parameters beyond what the schema already documents.

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: 'Wyszukaj termin w treści załadowanego aktu prawnego' (search a term in the content of a loaded legal act). The qualifier 'załadowanego' (loaded) meaningfully distinguishes it from sibling search_legal_acts (searching act metadata/database) and read_act_content (reading content linearly), so an agent can tell them apart.

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 gives an explicit, critical precondition: the act must first be loaded via get_act_details(eli=..., load_content=True), stated with a WYMAGANIE (requirement) label and repeated in the eli parameter description and examples. It provides clear usage context and pagination patterns, but does not explicitly state when-not-to-use or name alternatives like search_legal_acts or read_act_content.

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