Skip to main content
Glama

One field across every record in a dataset

compare_field
Read-only

Compare one field across all records in a dataset in a single call — "what is the retainage cap in each state?", "which releases are out of support?", "which jurisdictions require an ASME S stamp?". Returns one row per record with the value, its source URL and verbatim source quote, and how that value is evidenced: quote_confirmed (the value was checked against the quote), derived_by_us (computed by referencesource, not stated by the source) or stored_not_quote_confirmed. Records that do not carry the field are counted and listed in records_missing_the_field, never dropped — their absence from the rows is not a zero. Omit field to see which fields the dataset has and how many records carry each.

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": {
      "dataset_slug": "<dataset_slug>"
    },
    "name": "compare_field"
  }
}

Input Schema

NameRequiredDescriptionDefault
sortNoRow order. Default as_published. `value` is a LEXICAL sort and says so. A numeric sort is refused, with the offending values named, unless every compared value is a single number — these fields hold text like "10%; 5% after the contract is 50% complete", and ordering that numerically would invent a ranking.
fieldNoThe field to compare, e.g. "public_cap_pct". Omit it to get the dataset's field names with a record count and one example value for each, which costs one call instead of a guess.
containsNoOptional: return only rows whose value contains this text, case-insensitive — e.g. "no statutory cap". The count of rows the filter removed is always stated.
dataset_slugYesDataset slug from list_datasets, e.g. "construction-retainage-limits-by-state".
include_quotesNoInclude each row's verbatim source quote. True by default: the quote is what makes the value checkable. Set false for a smaller answer when you only need the shape of the column.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.4/5.0
Behavior5/5

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

Beyond the read-only annotations, the description explains the return shape: one row per record, source URL, verbatim quote, evidence status categories, and explicit handling of records missing the field. It also clarifies that absence from rows is not a zero, which is important behavioral context not covered by annotations.

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?

The description is front-loaded with what the tool does and remains information-dense rather than padded. The opening sentence is long because it packs in multiple examples, but the overall structure is clear and justified by the tool's complexity.

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?

With no output schema, the description carries the burden of explaining return values, evidence statuses, missing-record behavior, and introspection mode. It provides enough detail for an agent to understand both how to invoke the tool and what to expect from the response.

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?

The input schema has 100% description coverage and already explains sort behavior, `contains`, `include_quotes`, and field omission. The description mostly repeats the field-omission behavior rather than adding new parameter semantics, so the baseline of 3 is appropriate.

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 and resource: comparing one field across every record in a dataset. The examples clarify the intended analytic use, and the scope ('across all records', 'single call') distinguishes it from record-level or 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?

The description gives clear usage context through example questions and explains omitting `field` for dataset introspection. It does not explicitly name alternatives such as `get_record` or `search_records`, nor say when not to use it, so it falls short of full when/when-not/alternatives guidance.

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.