Skip to main content
Glama

Compute a deadline with explicit counting rules

compute_deadline
Read-onlyIdempotent

Compute a deadline from a start date and a period in calendar days, working days, Gregorian months or Hijri months, applying the counting rules YOU specify (exclude start day, extend past weekends/holidays, half-day handling, estimated-holiday handling). Returns the deadline, the raw date before extension, every skipped day and a step-by-step explanation. Use when drafting contract, notice, appeal or payment deadlines in the UAE. This is date arithmetic only; it does not state what any law requires, and every response carries a disclaimer field. Example: {start_date:'2026-11-26', period:7, unit:'calendar_days', emirate:'federal', sector:'public'} → raw 2026-12-03 (National Day, estimated) → deadline 2026-12-04, data_confidence 'medium'. Response always includes data_confidence ('high' = all dates officially announced/confirmed, 'medium' = something is estimated), estimated_items[], sources[] (official URLs) and data_version.

Input Schema

NameRequiredDescriptionDefault
unitYescalendar_days | working_days | months (Gregorian) | hijri_months.
rulesNoCounting conventions. Pass what the contract/rule says; defaults are the common convention.
periodYesLength of the period in `unit`. Negative counts backwards.
sectorNoSector: public (government) | private. Government employees, courts and ministries → 'public'. Companies → 'private' (weekend is employer-set; the common Sat–Sun default is used and flagged).public
emirateNoCalendar profile emirate: federal | abu_dhabi | dubai | sharjah | ajman | umm_al_quwain | ras_al_khaimah | fujairah. Use 'federal' unless the user named an emirate's government. Emirates other than Sharjah currently follow the federal weekend.federal
start_dateYesISO date the period starts from (e.g. date of notification).

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.7/5.0
Behavior5/5

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

The description adds rich behavioral detail beyond annotations: return fields (raw date, skipped days, step-by-step explanation), a disclaimer field, data_confidence semantics, estimated_items, sources, and a worked example. It also clarifies that estimated holidays are flagged. Annotations (readOnly, idempotent, non-destructive) are consistent with this.

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 the core action, followed by usage context, scope caveat, and a compact example. Every sentence carries information; there is no filler or redundancy despite the paragraph length.

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?

For a tool with six parameters (including nested rules), three enums, and an output schema, the description covers the essential behavioral traits: what is returned, how confidence is signaled, and the UAE-specific context. It also repeats the output schema fields so the agent can set expectations without opening the schema.

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 meaningful context by listing the counting-rule categories ('exclude start day, extend past weekends/holidays, half-day handling, estimated-holiday handling') and a concrete example showing how parameters interact with output. It doesn't explain every parameter's syntax, but it meaningfully augments 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 ('Compute') and resource ('deadline') and immediately distinguishes scope: 'date arithmetic only; it does not state what any law requires.' It also names the units and counting rules, making clear how this differs from simpler sibling tools like add_working_days or working_days_between.

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 provides clear context for use ('Use when drafting contract, notice, appeal or payment deadlines in the UAE') and explains the meaning of rule defaults. However, it does not explicitly name alternative tools or state when NOT to use this tool, which keeps it from a 5.

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.

Resources