Skip to main content
Glama

Diff Article

diff_article
Read-onlyIdempotent

Compare a Mexican federal law article's text between two dates to identify word-level or unified changes, including intervening versions that modified it.

Instructions

What changed in one article between two dates, as a word-level or unified diff, plus the versions in between that touched it.

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": {
      "law": "<law>",
      "article": "<article>",
      "date_from": "<date_from>"
    },
    "name": "diff_article"
  }
}

Input Schema

NameRequiredDescriptionDefault
lawYesLaw abbreviation or slug, e.g. 'LFT', 'CPEUM', 'lgsm'. See list_laws.
modeNo'words': changed paragraphs with [-removed-] {+added+} marks; 'unified': classic unified diff by paragraph.words
articleYesArticle number as written in the law: '27', '1o', '3o. Bis', '15-A', '353-Ñ', '29-A Bis', '21 bis 1'. Extra words such as 'fracción IV' are ignored.
date_toNoLater date (YYYY-MM-DD or 'hoy').hoy
date_fromYesEarlier date (YYYY-MM-DD).

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already cover the safety profile (readOnly, idempotent, non-open-world), so the description's added value is scope-related: it discloses that result granularity is paragraph-level and that intervening versions touching the article are included, which is behavior an agent would not otherwise know. It stops short of noting whether an empty diff or a missing article produces an error versus an empty result.

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?

A single front-loaded sentence that names the operation, scope, and output modes without filler. Every clause carries information the agent needs before calling.

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?

With an output schema present and full annotation coverage, the description need not explain return values, and it correctly focuses on scope and diff format. The remaining gap is sibling disambiguation against diff_reform and article_history, which a one-clause addition would have closed.

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 description coverage is 100% and the schema already explains law, article formats, date formats, and the words/unified enum, so there is little meaning left for the description to add. The sentence restates the two output modes but adds no constraints, defaults, or failure modes beyond the schema.

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?

Names a specific operation (diff) on a specific resource (one article) over a bounded scope (between two dates), and states the output modality (word-level or unified). It does not distinguish itself from the sibling diff_reform, so an agent must infer that this is article-level rather than reform-level.

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 only implied by the phrase 'between two dates'; there is no explicit when-to-use, no statement of when a sibling like diff_reform or article_history is preferable, and no stated prerequisites such as whether the article must have been amended in that window.

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