Skip to main content
Glama

Check an arithmetic claim exactly

check_arithmetic
Read-onlyIdempotent

Check an explicit arithmetic claim. Checked i128 rationals give exact verdicts when expression, claim and tolerances are representable. Unsupported functions or overflow return an estimate with an undetermined verdict. Includes a versioned integrity digest; no checks of units or model meaning.

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": {
      "claimed_value": "<claimed_value>",
      "expression": "<expression>"
    },
    "name": "check_arithmetic"
  }
}

Input Schema

NameRequiredDescriptionDefault
valuesNo
expressionYes
claimed_valueYes
tolerance_absoluteNo
tolerance_relativeNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedOutput schema / (root)
      Previous value: -{
      -  "$schema": "http://json-schema.org/draft-07/schema#",
      -  "additionalProperties": false,
      -  "properties": {
      -    "absolute_error": {
      -      "maximum": 1e+300,
      -      "minimum": 0,
      -      "type": "number"
      -    },
      -    "assumptions": {
      -      "items": {
      -        "maxLength": 512,
      -        "minLength": 1,
      -        "type": "string"
      -      },
      -      "maxItems": 64,
      -      "minItems": 1,
      -      "type": "array"
      -    },
      -    "claimed_value": {
      -      "maximum": 9007199254740991,
      -      "minimum": -9007199254740991,
      -      "type": "number"
      -    },
      -    "comparison": {
      -      "anyOf": [
      -        {
      -          "const": "exact_rational",
      -          "type": "string"
      -        },
      -        {
      -          "const": "float64",
      -          "type": "string"
      -        }
      -      ]
      -    },
      -    "computed_value": {
      -      "maximum": 1e+300,
      -      "minimum": -1e+300,
      -      "type": "number"
      -    },
      -    "contract_version": {
      -      "const": "0.2.0",
      -      "type": "string"
      -    },
      -    "digest": {
      -      "additionalProperties": false,
      -      "properties": {
      -        "payload_version": {
      -          "maxLength": 128,
      -          "minLength": 1,
      -          "type": "string"
      -        },
      -        "sha256": {
      -          "maxLength": 64,
      -          "minLength": 64,
      -          "pattern": "^[0-9a-f]{64}$",
      -          "type": "string"
      -        }
      -      },
      -      "required": [
      -        "payload_version",
      -        "sha256"
      -      ],
      -      "type": "object"
      -    },
      -    "effective_tolerance": {
      -      "maximum": 1e+300,
      -      "minimum": 0,
      -      "type": "number"
      -    },
      -    "elapsed_ms": {
      -      "maximum": 1000000000,
      -      "minimum": 0,
      -      "type": "number"
      -    },
      -    "engine": {
      -      "const": "rust-cpu",
      -      "type": "string"
      -    },
      -    "exact_supported": {
      -      "type": "boolean"
      -    },
      -    "exact_value": {
      -      "anyOf": [
      -        {
      -          "maxLength": 512,
      -          "minLength": 1,
      -          "type": "string"
      -        },
      -        {
      -          "type": "null"
      -        }
      -      ]
      -    },
      -    "expression": {
      -      "maxLength": 512,
      -      "minLength": 1,
      -      "type": "string"
      -    },
      -    "method": {
      -      "maxLength": 4096,
      -      "minLength": 1,
      -      "type": "string"
      -    },
      -    "notes": {
      -      "items": {
      -        "maxLength": 512,
      -        "minLength": 1,
      -        "type": "string"
      -      },
      -      "maxItems": 32,
      -      "minItems": 0,
      -      "type": "array"
      -    },
      -    "provenance": {
      -      "additionalProperties": false,
      -      "properties": {
      -        "client": {
      -          "additionalProperties": {},
      -          "properties": {
      -            "name": {
      -              "type": "string"
      -            },
      -            "version": {
      -              "type": "string"
      -            }
      -          },
      -          "required": [
      -            "name",
      -            "version"
      -          ],
      -          "type": "object"
      -        },
      -        "identity_source": {
      -          "type": "string"
      -        },
      -        "model": {
      -          "type": "null"
      -        },
      -        "server": {
      -          "const": "scorecompute",
      -          "type": "string"
      -        },
      -        "tool": {
      -          "const": "check_arithmetic",
      -          "type": "string"
      -        }
      -      },
      -      "required": [
      -        "tool",
      -        "server",
      -        "client",
      -        "identity_source",
      -        "model"
      -      ],
      -      "type": "object"
      -    },
      -    "relative_error": {
      -      "anyOf": [
      -        {
      -          "maximum": 1e+300,
      -          "minimum": 0,
      -          "type": "number"
      -        },
      -        {
      -          "type": "null"
      -        }
      -      ]
      -    },
      -    "scope": {
      -      "additionalProperties": false,
      -      "properties": {
      -        "decimal_source": {
      -          "maxLength": 512,
      -          "minLength": 1,
      -          "type": "string"
      -        },
      -        "exact_range_bits": {
      -          "maximum": 1024,
      -          "minimum": 0,
      -          "type": "integer"
      -        },
      -        "functions": {
      -          "items": {
      -            "maxLength": 32,
      -            "minLength": 1,
      -            "type": "string"
      -          },
      -          "maxItems": 16,
      -          "minItems": 1,
      -          "type": "array"
      -        },
      -        "limits": {
      -          "items": {
      -            "maxLength": 512,
      -            "minLength": 1,
      -            "type": "string"
      -          },
      -          "maxItems": 16,
      -          "minItems": 0,
      -          "type": "array"
      -        },
      -        "tolerance_rule": {
      -          "maxLength": 512,
      -          "minLength": 1,
      -          "type": "string"
      -        }
      -      },
      -      "required": [
      -        "decimal_source",
      -        "exact_range_bits",
      -        "functions",
      -        "limits",
      -        "tolerance_rule"
      -      ],
      -      "type": "object"
      -    },
      -    "statement": {
      -      "maxLength": 4096,
      -      "minLength": 1,
      -      "type": "string"
      -    },
      -    "tolerance_absolute": {
      -      "maximum": 1e+300,
      -      "minimum": 0,
      -      "type": "number"
      -    },
      -    "tolerance_relative": {
      -      "maximum": 1000000000,
      -      "minimum": 0,
      -      "type": "number"
      -    },
      -    "verdict": {
      -      "anyOf": [
      -        {
      -          "const": "consistent",
      -          "type": "string"
      -        },
      -        {
      -          "const": "inconsistent",
      -          "type": "string"
      -        },
      -        {
      -          "const": "undetermined",
      -          "type": "string"
      -        }
      -      ]
      -    }
      -  },
      -  "required": [
      -    "absolute_error",
      -    "assumptions",
      -    "claimed_value",
      -    "comparison",
      -    "computed_value",
      -    "contract_version",
      -    "digest",
      -    "effective_tolerance",
      -    "elapsed_ms",
      -    "engine",
      -    "exact_supported",
      -    "exact_value",
      -    "expression",
      -    "method",
      -    "notes",
      -    "relative_error",
      -    "scope",
      -    "statement",
      -    "tolerance_absolute",
      -    "tolerance_relative",
      -    "verdict",
      -    "provenance"
      -  ],
      -  "type": "object"
      -}New value: +null
  2. Added

TDQS

A3.8/5.0
Behavior4/5

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

Beyond the read-only/idempotent annotations, the description discloses the precision contract: exact verdicts when the expression, claim and tolerances are representable in checked i128 rationals, and degraded behaviour ('estimate with an undetermined verdict') on unsupported functions or overflow. It also mentions a versioned integrity digest, which is real behavioural context an agent cannot get from the schema. It stops short of describing the response shape.

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?

Four tight sentences, front-loaded with the purpose, then limits and caveats. No filler, though the density of terms like 'i128 rationals' and 'integrity digest' without elaboration costs a little readability.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With no output schema and zero schema descriptions, the description has to cover a lot, and it covers the verdict semantics and failure mode well. It omits how the 'values' bindings feed the expression and what the returned verdict/digest fields look like, leaving a real gap for a 5-parameter tool.

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 0%, so the description must carry parameter meaning, and it only partially does: it references the expression, the claim and the tolerances and their representability bound. The 'values' array of named variable bindings — a required mental model for using 'expression' — is never mentioned, nor is the absolute-vs-relative tolerance distinction.

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 states a specific verb and resource ('Check an explicit arithmetic claim') and bounds the domain to exact arithmetic over i128 rationals. The title reinforces the exactness claim. It does not differentiate itself from the plausible sibling 'verify_claim', so differentiation is left implicit.

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?

Usage is scoped clearly: it is for *explicit* arithmetic claims, and the closing clause rules out unit checks or checking model meaning, which tells an agent when not to reach for it. No alternative tool is named, so routing versus verify_claim or audit_statistics remains an inference.

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