Skip to main content
Glama

subtract_numbers

Calculates the arithmetic difference between two integers (a - b); use for subtraction only. Returns negative values when b is greater than a.

Instructions

Calculates the arithmetic difference between two integers (a - b). Use this tool when you need to subtract one value from another. Do not use for addition (use 'add_numbers' instead), multiplication (use 'multiply_numbers' instead), or division (use 'divide_numbers' instead). Deterministic pure calculation; returns negative values if the subtrahend 'b' is greater than minuend 'a'.

Input Schema

NameRequiredDescriptionDefault
aYesThe minuend integer from which 'b' will be subtracted.
bYesThe subtrahend integer to subtract from 'a'.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.1.1

TDQS

A4.4/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does add real behavioral context: it declares the operation deterministic and pure, and discloses the sign behavior when b > a ('returns negative values if the subtrahend b is greater than minuend a'). It does not mention error handling for non-integer or missing input, though the schema's type constraints largely cover that.

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?

Three sentences, front-loaded with the operation and its formula, then routing, then edge-case behavior. The enumeration of three sibling alternatives is slightly listy but each clause earns its place as a routing rule.

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 pure two-integer arithmetic tool with no output schema, annotations, or side effects, this covers everything an agent needs: operation, argument order, sign behavior, and sibling disambiguation. Nothing material is missing.

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 coverage is 100% and both parameters already document minuend/subtrahend roles, so the schema does the heavy lifting. The description restates the ordering (a - b) but adds no syntax or format detail beyond the schema, making the baseline 3 correct.

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?

States a specific verb and operation ('Calculates the arithmetic difference between two integers (a - b)') and explicitly differentiates itself from three named siblings (add_numbers, multiply_numbers, divide_numbers). An agent can route to this tool without opening any schema.

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?

Gives both when-to-use ('when you need to subtract one value from another') and explicit when-not-to-use with the alternative for each excluded case. This is textbook routing guidance.

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