Skip to main content
Glama

calculate_legal_date

Calculate legal dates for deadlines, effective dates, or vacatio legis by adding or subtracting days, months, and years from a base date or today's date.

Instructions

Oblicz daty na potrzeby prawne (np. terminy, daty wejścia w życie, vacatio legis).

Dodaje lub odejmuje dni, miesiące i lata od daty bazowej (lub dzisiejszej). Wartości dodatnie = przyszłość, ujemne = przeszłość.

Przykłady:

  • calculate_legal_date(days=14) - Termin 14 dni od dziś (np. termin na odwołanie)

  • calculate_legal_date(days=30, base_date="2024-06-01") - 30 dni od 1 czerwca 2024

  • calculate_legal_date(years=1, base_date="2024-01-01") - Rok po 1 stycznia 2024

  • calculate_legal_date(days=-90) - 90 dni wstecz od dziś

  • calculate_legal_date(months=6, days=15) - 6 miesięcy i 15 dni od dziś

  • calculate_legal_date(years=-5, base_date="2024") - 5 lat przed 1 stycznia 2024

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
daysNoLiczba dni do dodania (+) lub odjęcia (-). Np. days=14 = za 14 dni, days=-14 = 14 dni temu. Domyślnie 0. Wartości logiczne (true/false) są niedozwolone.
yearsNoLiczba lat do dodania (+) lub odjęcia (-). Np. years=1 = za rok, years=-5 = 5 lat temu. Domyślnie 0. Wartości logiczne (true/false) są niedozwolone.
monthsNoLiczba miesięcy do dodania (+) lub odjęcia (-). Np. months=3 = za 3 miesiące, months=-6 = 6 miesięcy temu. Domyślnie 0. Wartości logiczne (true/false) są niedozwolone.
base_dateNoData bazowa. Akceptowane formaty: 'YYYY-MM-DD' (np. '2024-01-15'), 'YYYY-MM' (np. '2024-01' → 2024-01-01), 'YYYY' (np. '2024' → 2024-01-01). Jeśli nie podano, używa dzisiejszej daty.

Output Schema

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

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

With no annotations, the description carries the behavioral burden and does explain sign conventions, default base date, and parameter combinations. However, it does not disclose calendar semantics for edge cases (e.g. adding one month to Jan 31) or invalid input behavior, which are relevant for legal date calculations.

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?

The description is front-loaded with purpose and operation, followed by a compact sign convention and six non-redundant examples. Every sentence contributes to correct invocation, with no filler or repeated schema content.

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 simple calculator with four optional parameters and an output schema present, the description is largely complete: it states what the tool does, how offsets work, and how the base date behaves. Minor edge-case semantics are missing, but they do not block selection or correct invocation in common use cases.

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% and each parameter already has an explanatory description in Polish. The tool description adds value beyond the schema by illustrating real combinations (days=14, months=6, days=15, years=-5) and clarifying base_date formats such as 'YYYY' and 'YYYY-MM'.

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 opens with a clear purpose—calculating legal dates for deadlines, effective dates, and vacatio legis—and then states the core operation: adding/subtracting days, months, and years from a base date or today. This makes its function distinct from the sibling document/search tools.

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?

It gives concrete use cases (e.g. deadlines, entry into force, vacatio legis) and shows how to express future vs past offsets with positive/negative values. It does not explicitly name alternatives or exclusion criteria, but no sibling tool performs date arithmetic, so the usage context is sufficient.

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