Skip to main content
Glama

explain_rule

Get a tax rule in full: statutory citation with its verbatim excerpt, validity window, parameters, the formula and applicability guard (the rule IR — rules are data), the rules and facts it depends on, and its content hash. Use to quote and explain the actual law behind an answer. Pass asOf to see only the version in force on that date.

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": {
      "ruleId": "<ruleId>"
    },
    "name": "explain_rule"
  }
}

Input Schema

NameRequiredDescriptionDefault
asOfNoISO date; when given, only the version valid on that date is returned (omit for every version)
ruleIdYese.g. "us.federal.standard_deduction" — list via calculate_tax proof, search_tax_rules, or the corpus

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • addedInput schema / properties / asOf / maxLength
      Added value: +10
    • addedInput schema / properties / ruleId / maxLength
      Added value: +120
  2. Changed2 schema fields changed
    • addedInput schema / properties / asOf
      Added value: +{
      +  "description": "ISO date; when given, only the version valid on that date is returned (omit for every version)",
      +  "type": "string"
      +}
    • changedInput schema / properties / ruleId / description
      Previous value: -"e.g. \"us.federal.standard_deduction\" — list via calculate_tax proof or corpus"New value: +"e.g. \"us.federal.standard_deduction\" — list via calculate_tax proof, search_tax_rules, or the corpus"
  3. First observed

TDQS

A4.3/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does well: it discloses the rich return contents and versioning behavior via asOf. It does not explicitly state that this is a read-only operation or mention error/auth behavior, but the "Get" framing and output disclosure make the behavioral profile clear.

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 a single, front-loaded paragraph with no wasted sentences. Each listed item adds useful information about what the tool returns.

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?

There is no output schema, but the description fully explains the returned rule contents and versioning behavior. It gives an agent enough context to invoke the tool correctly without needing additional structured output definitions.

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%, so both parameters are already documented. The description adds only modest context about asOf versioning and does not provide additional syntax or examples beyond 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 uses a specific verb+resource ("Get a tax rule in full") and enumerates the exact contents returned: citation, excerpt, validity window, parameters, formula, guard, dependencies, and hash. This clearly distinguishes it from sibling calculate/search tools.

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 clearly states the use case ("Use to quote and explain the actual law behind an answer") and explains the asOf filtering behavior. It does not explicitly name when to choose this over search_tax_rules or calculate_tax, though the purpose is unambiguous.

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