Skip to main content
Glama

Check a value against the fact it cites, before you publish it

emem_echo_verify
Read-onlyIdempotent

Verify a value against the signed fact it cites before publishing or logging it. Returns matches or drift to catch transcription errors that would otherwise produce a silent wrong number.

Instructions

Grade a value that you will emit against the signed fact that your citation cites. The tool returns matches. When the value does not match, it also returns the drift between your value and the value in emem. This step catches a transcription error that would otherwise be a silent wrong number. A model can resolve a fact correctly and still type 0.2411 for 0.241103. No other step in the loop sees this. Memory algebra: the verify operation (https://emem.dev/docs/model.html).

When to use: Call this immediately before you publish, log or pass on a value from an emem fact. Treat a false matches as a stop, not a warning. Use value_verbatim from resolve: quote that exact decimal string, then echo-verify the text you emitted. For a due-diligence or compliance record, this gives a signed check for each citation. Then you can state every cited value was echo-verified. The tool also accepts a bare cid, so a damaged citation still gets a grade.

Example arguments: {"token":"emem:fact:defi.zb572.xoso.zb1ec:4qj3l4mgh7ch5kvxmkqspjdl6y42oqhm42khh3gostccpixkbz5q","claimed_value":"-0.0522"}

Input Schema

NameRequiredDescriptionDefault
tokenYesThe citation you used. Any form resolve accepts, including a bare cid, which answers with `degraded: true`: a bare cid asserts no location, so the cell-binding check is skipped and the grade covers the value only. A cid that is not 52 characters is refused as a damaged citation rather than as a missing one, and must not be retried.
strictNoRequire BYTE-IDENTICAL equality. Default false, which also accepts a numerically equal value spelled differently (0.50 for 0.5). It changes exactly one outcome: the numerically-equal-but-respelled case, which passes by default and becomes `drift: "reformatted"` here. `rounded` and `wrong` already fail either way, so `strict` never turns a pass into a pass. It is also inert when `claimed_value` came in as a JSON number, because the respelling then happened in the JSON parser, before this tool saw it.
claimed_valueYesThe value you are about to publish, as a string or a number. Send it as a STRING, character for character as you will emit it. A JSON number is stringified before the comparison, so `0.50` arrives as `0.5` and `0.2411000` as `0.2411` (measured against the live responder): the trailing digits this check exists to defend are gone before it runs. Quote `value_verbatim` from resolve as a string and echo the exact characters you will publish.

Output Schema

NameRequiredDescriptionDefault
driftNoThe difference between what you wrote and what emem holds, when they disagree. Explicit null on an exact match: the key is always present, so branch on its value rather than on whether it exists. Declaring this `string` alone was a live schema violation on every matching call, which is how it was found.
tokenYesThe citation you passed, echoed back exactly as sent.
matchesYesWhether what you were about to publish agrees with the signed fact. Treat false as a gate, not a warning.
receiptNo
degradedNoTrue when a bare cid was passed and the cell binding could not be checked.
fact_cidNo
claimed_valueYesEchoed back, so a log line carries both sides of the comparison.
canonical_tokenNoThe token in its canonical spelling, whatever form you passed.
offline_verify_atNoWhere to re-run this check without trusting this responder.
resolved_value_verbatimNoThe fact's value as the exact decimal string it was signed as. Quote this rather than reformatting it.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv2.4.4
    • addedInput schema / properties / claimed_value / type
      Added value: +[
      +  "string",
      +  "number"
      +]
  2. Changed3 schema fields changedv1.3.8
    • changedInput schema / properties / claimed_value / description
      Previous value: -"The value you are about to publish, as a string or a number. A string is compared verbatim first, which is what catches a retype a float comparison would forgive."New value: +"The value you are about to publish, as a string or a number. Send it as a STRING, character for character as you will emit it. A JSON number is stringified before the comparison, so `0.50` arrives as `0.5` and `0.2411000` as `0.2411` (measured against the live responder): the trailing digits this check exists to defend are gone before it runs. Quote `value_verbatim` from resolve as a string and echo the exact characters you will publish."
    • changedInput schema / properties / strict / description
      Previous value: -"Require BYTE-IDENTICAL equality. Default false, which also accepts a numerically equal value spelled differently (0.50 for 0.5)."New value: +"Require BYTE-IDENTICAL equality. Default false, which also accepts a numerically equal value spelled differently (0.50 for 0.5). It changes exactly one outcome: the numerically-equal-but-respelled case, which passes by default and becomes `drift: \"reformatted\"` here. `rounded` and `wrong` already fail either way, so `strict` never turns a pass into a pass. It is also inert when `claimed_value` came in as a JSON number, because the respelling then happened in the JSON parser, before this tool saw it."
    • changedInput schema / properties / token / description
      Previous value: -"The citation you used. Any form resolve accepts, including a bare cid (answers degraded)."New value: +"The citation you used. Any form resolve accepts, including a bare cid, which answers with `degraded: true`: a bare cid asserts no location, so the cell-binding check is skipped and the grade covers the value only. A cid that is not 52 characters is refused as a damaged citation rather than as a missing one, and must not be retried."
  3. Changed2 schema fields changedv1.3.5
    • changedOutput schema / properties / drift / description
      Previous value: -"Present when it does not match: the difference between what you wrote and what emem holds."New value: +"The difference between what you wrote and what emem holds, when they disagree. Explicit null on an exact match: the key is always present, so branch on its value rather than on whether it exists. Declaring this `string` alone was a live schema violation on every matching call, which is how it was found."
    • changedOutput schema / properties / drift / type
      Previous value: -"string"New value: +[
      +  "string",
      +  "null"
      +]
  4. Changed1 schema field changedv1.3.4
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "properties": {
      +    "canonical_token": {
      +      "description": "The token in its canonical spelling, whatever form you passed.",
      +      "type": "string"
      +    },
      +    "claimed_value": {
      +      "description": "Echoed back, so a log line carries both sides of the comparison.",
      +      "type": "string"
      +    },
      +    "degraded": {
      +      "description": "True when a bare cid was passed and the cell binding could not be checked.",
      +      "type": "boolean"
      +    },
      +    "drift": {
      +      "description": "Present when it does not match: the difference between what you wrote and what emem holds.",
      +      "type": "string"
      +    },
      +    "fact_cid": {
      +      "type": "string"
      +    },
      +    "matches": {
      +      "description": "Whether what you were about to publish agrees with the signed fact. Treat false as a gate, not a warning.",
      +      "type": "boolean"
      +    },
      +    "offline_verify_at": {
      +      "description": "Where to re-run this check without trusting this responder.",
      +      "type": "string"
      +    },
      +    "receipt": {
      +      "type": "object"
      +    },
      +    "resolved_value_verbatim": {
      +      "description": "The fact's value as the exact decimal string it was signed as. Quote this rather than reformatting it.",
      +      "type": "string"
      +    },
      +    "token": {
      +      "description": "The citation you passed, echoed back exactly as sent.",
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "matches",
      +    "token",
      +    "claimed_value"
      +  ],
      +  "type": "object"
      +}
  5. Addedv1.3.0

TDQS

A4.5/5.0
Behavior5/5

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

Annotations already cover the safety profile (readOnly, idempotent, non-destructive, closed-world), yet the description adds substantial behavior: it names the returned fields (matches, drift), explains the degraded bare-cid path, and documents the non-obvious JSON-number stringification caveat that silently destroys trailing digits. That is exactly the kind of context annotations cannot carry.

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 text is front-loaded with purpose, then when-to-use, then an example, so an agent can skim it. It is somewhat long and the string-vs-number warning is restated in both the prose and the schema, which is mild redundancy rather than wasted content.

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?

Coverage is complete: an output schema exists so return values need not be explained (they are, briefly, anyway), annotations handle safety, and the description supplies the timing, the failure interpretation, and the degraded-mode behavior. Nothing needed to invoke this correctly is missing.

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 description coverage is 100% and the schema already explains token, strict and claimed_value in depth, so the baseline is 3. The description adds marginal value: a concrete example argument and an emphatic directive to send claimed_value as a string quoting value_verbatim, which reinforces the single most consequential parameter choice.

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?

The description gives a precise verb and resource: it grades an emitted value against the signed fact the citation points at, and explicitly claims a unique role ('No other step in the loop sees this'). That is a sharp functional statement, but it never names or contrasts the obvious sibling emem_verify_receipt, so an agent choosing between the two gets no explicit routing help.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It states exactly when to call ('immediately before you publish, log or pass on a value from an emem fact'), how to source the input ('Use value_verbatim from resolve'), and how to interpret the result ('Treat a false matches as a stop, not a warning'). It also names the downstream condition (due-diligence/compliance records) and notes the bare-cid fallback, leaving little to inference.

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