Skip to main content
Glama

compare_versions

Read-only

Compare the text of a CFR section at two different dates.

Useful for understanding what changed in a regulatory amendment. Returns
'changes' (each paragraph that was added, removed or changed, with its
before and after text; also heading, table and pending-amendment-link
changes), 'identical' when nothing differs, and the parsed text at both
dates side by side. When both texts together are too long to send, the
full texts are left out (texts_omitted) and 'changes' is kept.
changes_only=True leaves the full texts out every time: the short answer
to "what changed".

Dates must be in YYYY-MM-DD format. Historical snapshot availability
varies by title and section, including some dates before 2017. Use
get_version_history to discover dates. Both dates must not exceed the
title's up_to_date_as_of value.

This tool always returns the section-level XML parsed -- pass a small
section_id like '15.305', not a whole part. Whole-part comparisons can
exceed 100 KB per side.

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": {
      "section_id": "<section_id>",
      "date_before": "<date_before>",
      "date_after": "<date_after>"
    },
    "name": "compare_versions"
  }
}

Input Schema

NameRequiredDescriptionDefault
chapterNo
date_afterYes
section_idYes
date_beforeYes
changes_onlyNo
title_numberNo

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.6/5.0
Behavior5/5

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

Goes well beyond the readOnly/non-destructive annotations: describes the returned 'changes' structure, the 'identical' case, texts_omitted truncation behavior when combined texts are too long, and how changes_only changes output. Also discloses input constraints (YYYY-MM-DD format, snapshot availability varying by title/section, 100 KB per-side limits for whole parts).

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?

Front-loaded with the core action, then progressively discloses return shape, flags, and constraints. Every sentence is substantive, though the return-value paragraph is dense and could be tightened slightly.

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 6-parameter comparison tool with an output schema, the description covers input constraints, truncation behavior, and date validity prerequisites. Nothing an agent needs to invoke it correctly is missing, even though chapter/title_number defaults are only implied.

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 0%, so the description carries the burden and does well: it explains date format for the two date params, the behavior of changes_only=True, and the required granularity of section_id (small section like '15.305', not whole part). It does not clarify the chapter parameter or the title_number default of 48, leaving gaps.

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 ('Compare the text of a CFR section at two different dates') and immediately frames the intent ('understanding what changed in a regulatory amendment'). An agent can distinguish it from get_cfr_content and get_version_history without opening a single schema.

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 clear context for use and names get_version_history as the way to discover valid dates, plus a constraint that both dates must not exceed up_to_date_as_of. It stops short of explicitly contrasting with get_cfr_content or stating when a plain read is preferable, so not a full 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.