Skip to main content
Glama

compare_threshold

Compare two exact values as fractions with operators (=, !=, >, >=, <, <=) to get a clear pass/fail verdict and the exact shortfall when the threshold is not met.

Instructions

Exact threshold check with a verdict and the shortfall when it fails.

a OP b with op in ==, !=, >, >=, <, <= (= accepted for ==). Both sides are evaluated exactly and printed as fractions — a threshold comparison written out cannot be gotten backwards. Example: ('1/25', '>', '0.05').

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
aYes
bYes
opYes

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. Changed6 schema fields changedv0.2.0
    • removedInput schema / additionalProperties
      Removed value: -false
    • addedInput schema / properties / a / title
      Added value: +"A"
    • addedInput schema / properties / b / title
      Added value: +"B"
    • addedInput schema / properties / op / title
      Added value: +"Op"
    • addedInput schema / title
      Added value: +"compare_thresholdArguments"
    • changedOutput schema / (root)
      Previous value: -{
      -  "additionalProperties": true,
      -  "type": "object"
      -}New value: +null
  2. First observedv0.1.0

TDQS

A4.2/5.0
Behavior4/5

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

No annotations are provided, so the description carries the full burden. It discloses that both sides are evaluated exactly and printed as fractions, and that the comparison cannot be reversed, which is useful behavioral context. It does not mention error handling or return format details, but the core behavior is transparent.

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 concise, front-loaded with the core purpose, and includes a clear example. Every sentence adds value: the first states the purpose, the second explains the syntax and evaluation behavior, and the example clarifies usage.

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

Completeness4/5

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

Given the tool's simplicity (3 string parameters, no output schema), the description is largely complete. It covers the operation, operators, evaluation behavior, and provides an example. It could mention what the 'verdict' and 'shortfall' look like in the output, but the absence of an output schema makes this less critical.

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 compensate. It explains that 'a' and 'b' are operands compared with 'op', and gives an example ('1/25', '>', '0.05'). However, it does not specify the expected format for 'a' and 'b' (e.g., fractions, decimals) beyond the example, nor the exact set of operators beyond listing them. This is adequate but not exhaustive.

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 clearly states the tool performs an exact threshold comparison with a verdict and shortfall, and specifies the supported operators. It distinguishes itself from sibling tools like compare_edge_cases by focusing on exact threshold checks with fractional evaluation.

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 implies usage for exact comparisons where fractions must be evaluated precisely, and notes that 'a threshold comparison written out cannot be gotten backwards,' which hints at when to use it. However, it does not explicitly mention when not to use it or name alternative tools for edge cases.

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

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/The-40-Thieves/codecalc'

If you have feedback or need assistance with the MCP directory API, please join our Discord server