Skip to main content
Glama

compare_threshold

Compare numeric expressions against a threshold exactly, receiving a pass/fail verdict and the shortfall if the condition 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

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior4/5

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

With no annotations, the description carries the transparency burden. It discloses that both sides are evaluated exactly and printed as fractions, lists supported operators including the '=' synonym, and notes the shortfall on failure. The output schema presumably covers return structure, so this level is adequate.

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 compact: three sentences, a code-block syntax line, and an example. Every sentence adds value, and the key behavior is front-loaded. No redundant or filler text.

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?

For a simple three-parameter tool with an output schema, the description covers purpose, operator set, exactness semantics, failure result, and an example. Nothing critical is missing for an agent to invoke it 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 0%, but the description compensates by defining the roles of a and b as operands, enumerating valid op values, and giving a concrete example with '1/25' and '0.05'. This gives the agent enough meaning to construct valid calls.

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 opens with 'Exact threshold check with a verdict and the shortfall when it fails,' which clearly identifies the specific action and result. The 'a OP b' semantics and example distinguish it from generic evaluators like evaluate_expression and comparison-focused siblings.

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 clearly implies this is for threshold comparisons requiring exactness, and the example demonstrates how to invoke it. It does not explicitly name alternatives or when-not-to-use, but the context is sufficiently clear for an agent to select it over generic expression tools.

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

Install Server

Other Tools

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