Skip to main content
Glama

Korean legal deadline (민법 기간 계산)

kr_legal_deadline
Read-onlyIdempotent

Compute when a period expires under the Korean Civil Act (arts. 155-161), the default rule when a law or contract does not say otherwise: the first day is not counted unless the period starts at 00:00; weeks, months and years follow the calendar and end the day before the corresponding date (or at month end if that date does not exist); if the last day is a Saturday, Sunday or public holiday the deadline moves to the next working day. Use for "within 14 days of receipt", "1 month from notice", contract terms. Not legal advice; some statutes set their own rules. Holiday data covers 2024-2027 (source: KASI; updated 2026-11-12). It includes substitute holidays and election days, and the 2026 additions Labor Day (May 1) and Constitution Day (Jul 17).

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": {
      "event_date": "<event_date>",
      "amount": "<amount>",
      "unit": "<unit>"
    },
    "name": "kr_legal_deadline"
  }
}

Input Schema

NameRequiredDescriptionDefault
unitYes
amountYesLength of the period
event_dateYesDate of the triggering event (notice received, contract signed), YYYY-MM-DD
extra_closed_datesNoOptional extra non-working dates (YYYY-MM-DD), e.g. company holidays.
starts_at_midnightNoTrue if the period starts at 00:00 of event_date (e.g. a date fixed in advance); then the first day counts. Default false.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already declare a safe, idempotent, closed-world read, and the description adds real value on top: the counting rules, the roll-forward on weekends/holidays, the holiday dataset window (2024-2027, KASI, updated 2026-11-12), and the caveat that some statutes override the default. What is missing is the return shape - whether the answer is a bare date or a date plus reasoning.

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?

Computation rules come first, then use cases, then caveats and data coverage - a sensible front-loaded order with no filler sentences. The closing holiday-data sentence is dense with dates and source metadata, slightly extending the definition past what an agent needs to select and call the tool.

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 five-parameter computation tool with no output schema, the description supplies the domain rules, data coverage limits, and legal caveat that determine correctness. The one real gap is that it never says what the tool returns, which matters more here because no output schema documents it.

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?

With 80% schema coverage the schema already carries most parameter meaning, but the sentence "the first day is not counted unless the period starts at 00:00" directly explains the non-obvious starts_at_midnight flag, which the schema only illustrates by example. extra_closed_dates interplay with the holiday roll-forward is implied but not spelled out.

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?

States a specific verb and resource - computing period expiry under Korean Civil Act arts. 155-161 - and frames it as the default rule when nothing else is specified. This clearly separates it from the working-day arithmetic siblings such as kr_add_business_days and kr_count_business_days.

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?

Gives concrete triggering phrasings ("within 14 days of receipt", "1 month from notice", contract terms) and an explicit exclusion ("Not legal advice; some statutes set their own rules"), which tells the agent when to distrust the result. It does not name a sibling alternative for simple business-day math, so routing versus kr_add_business_days is left implicit.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.