Skip to main content
Glama

Global law

Compare dates

compare_dates
Read-onlyIdempotent

How a provision changed between two dates: a word-level diff of its text on date_a and its text on date_b, and the laws that took effect after date_a, up to and including date_b.

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": {
      "path": "<path>",
      "date_a": "<date_a>",
      "date_b": "<date_b>"
    },
    "name": "compare_dates"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathYesA provision file, for example united-states/federal/usc/title-11/1182.md, from find_provision.
date_aYesAn in-force date, YYYY-MM-DD, or "today".
date_bYesAn in-force date, YYYY-MM-DD, or "today".
offsetNoWhere the part starts, in characters: the offset the previous part gave for the next one (default 0).
max_charsNoLongest part of the text in one answer (default 40000, at least 1000, at most 100000). A longer text comes in parts.

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changed
    • changedInput schema / properties / date_a / description
      Previous value: -"An in-force date, YYYY-MM-DD, or \"today\". Defaults to today."New value: +"An in-force date, YYYY-MM-DD, or \"today\"."
    • changedInput schema / properties / date_b / description
      Previous value: -"An in-force date, YYYY-MM-DD, or \"today\". Defaults to today."New value: +"An in-force date, YYYY-MM-DD, or \"today\"."
    • changedInput schema / properties / path / description
      Previous value: -"A provision file, for example united-states/federal/usc/title-11/1182.md, germany/bund/acts/grundgesetz/artikel/016a.md or united-kingdom/uk/legislation/uksi/2014/1530/regulation/13.md. Use find_provision to look one up."New value: +"A provision file, for example united-states/federal/usc/title-11/1182.md, from find_provision."
  2. First observed

TDQS

A3.5/5.0
Behavior3/5

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

Annotations already declare readOnlyHint, idempotentHint and destructiveHint=false, so safety is covered. The description adds genuine behavioral detail beyond them: the diff is word-level, and the interval is exclusive on date_a and inclusive of date_b. It says nothing about permission or auth requirements, or about how the response behaves when the text is split across parts (the schema carries that instead).

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?

One dense sentence with no filler, and the key semantic detail (the date_b-inclusive interval) is placed at the end where it is easy to miss. It is efficient, though the sentence-fragment opening 'How a provision changed…' reads slightly indirect.

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?

An output schema exists and the description still summarizes what comes back (word diff plus affected laws), and annotations cover the safety profile. For a read-only comparison tool this is nearly complete; only the multi-part response behavior is left to the schema.

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 coverage is 100%, so all five parameters are already documented, including path format, date format, and pagination via offset/max_chars. The description only reinforces that date_a and date_b are compared and clarifies the inclusive upper bound, which the schema does not. Baseline 3 is appropriate since the schema does the heavy lifting.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description names the resource (a provision's text) and states precisely what the tool produces: a word-level diff between date_a and date_b plus the laws taking effect in that interval. That is far more specific than the name alone. It stops short of naming a sibling (e.g. changes_between or provision_history), so the agent must infer the boundary itself.

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

Usage Guidelines3/5

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

Usage is implied by the description — you use this to see how one provision's text changed across two in-force dates. There is no explicit when-to-use, when-not-to-use, or pointer to an alternative tool for a different kind of comparison.

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.