Skip to main content
Glama

Compare asserted values with a lease

doc_compare
Read-onlyIdempotent

Compare values another document asserts (an estoppel, rent roll or offering memo, mapped by you to predicates) with verified lease facts from doc_abstract_lease or doc_verify_facts. Each asserted value comes back match, mismatch (with the differing fields), not_in_lease, or ambiguous_in_lease (two current lease facts disagree), with the controlling lease citation (document, page, quote). Values compare exactly as JSON: numbers by value, strings exactly (a name written differently is a mismatch), and for an object only the fields you assert. Facts another fact supersedes are ignored. When the lease fact is an extracted fact whose quote does not confirm part of its value (a true/false value, an enum), the result lists those parts in lease_not_checked. The lease facts must pass fact_validate; FactLot does not re-read the lease, so pass the facts its document tools returned.

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": {
      "lease_facts": "<lease_facts>",
      "asserted": "<asserted>"
    },
    "name": "doc_compare"
  }
}

Input Schema

NameRequiredDescriptionDefault
assertedYesValues another document states (an estoppel, a rent roll, an OM), mapped to predicates.
lease_factsYesVerified lease facts: the facts from doc_abstract_lease (or doc_verify_facts). Facts another fact supersedes are ignored.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.6/5.0
Behavior5/5

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

Annotations already cover the read-only, idempotent, non-destructive profile, and the description adds substantial extra context beyond them: the four outcome categories, that mismatches carry differing fields, that citations include document, page and quote, that superseded facts are ignored, and that unconfirmed parts surface in lease_not_checked. It also discloses a real operational constraint, that it does not re-read the lease and therefore depends on upstream fact quality.

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?

It is dense and front-loaded: the core operation comes first, then outcomes, then comparison semantics, then prerequisites. Every sentence carries information, though several are long compound sentences that could be split for faster scanning by an agent.

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, so the description must carry the return shape, and it does: enumerated outcome values, mismatch detail, citation structure, and the lease_not_checked field. Combined with the disclosed prerequisite chain (fact_validate, upstream fact extraction), an agent has everything it needs to call this correctly.

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 100%, so the schema already documents label, predicate and value. The description still adds real meaning, such as the exact JSON comparison rules (numbers by value, strings exact so a differently written name mismatches, objects compared only on asserted fields) and the rule that superseded facts are dropped. That goes slightly beyond the schema's own per-field text, which already states the partial-object behavior.

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 names a specific operation on two specific resources: it compares values another document asserts against verified lease facts. It distinguishes itself from the extraction siblings (doc_abstract_lease, doc_verify_facts) and positions itself downstream of them, so an agent immediately knows it is a comparison layer, not an extractor or verifier.

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 gives clear usage context: the asserted set is mapped to predicates by the caller, and the lease_facts must come from doc_abstract_lease or doc_verify_facts after passing fact_validate, with an explicit warning that FactLot does not re-read the lease. The main gap is that it never explicitly contrasts itself with doc_verify_claim, which also checks claims against a lease; an agent must infer that distinction.

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.