Skip to main content
Glama
halfords-pro

@halfords-pro/calculator

by halfords-pro

sum

Add an array of signed decimal numbers with precision for accounting, then round to any decimal places using Excel-style rounding.

Instructions

Sum an array of signed decimal numbers and round the result to a specified number of decimal places. Uses precise decimal arithmetic suitable for accounting and tax calculations. Rounding uses the 'round half away from zero' strategy (equivalent to Excel ROUND).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
valuesYesArray of signed decimal numbers to sum (e.g. [1.00, -2.50, 3.89])
decimalPlacesYesNumber of decimal places to round the result to (e.g. 2 for 2 decimal places)
Behavior5/5

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

With no annotations, the description carries the full burden of behavioral disclosure. It reveals that arithmetic is precise decimal, that rounding uses 'round half away from zero', and that the rounding applies to the result. These are meaningful behavioral details beyond the basic sum operation, so an agent can predict the tool's output and limitations.

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?

Three sentences, no filler. The primary operation and rounding behavior are front-loaded, followed by precision context and a concrete Excel comparison. Every sentence earns its place.

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?

For a simple two-parameter math tool, the description covers the operation, precision model, rounding strategy, and typical use case. It does not mention return value or parameter constraints like decimalPlaces being a non-negative integer, but those are inferable and low risk. The description is effectively complete for this complexity level.

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?

The input schema already covers 100% of parameters with descriptions and examples. The tool description reinforces these semantics by mentioning signed decimal numbers and rounding the result, but adds no constraints or edge-case handling beyond the schema. Baseline 3 is appropriate.

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 states a specific verb ('Sum'), the exact resource (an array of signed decimal numbers), and an additional transformation (rounding to a specified number of decimal places). It is unambiguous and fully describes the tool's core function even with no sibling tools to differentiate from.

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?

There are no sibling tools to compare against, but the description provides strong usage context by noting it is 'suitable for accounting and tax calculations' and equivalent to Excel ROUND. This implicitly tells the agent when to prefer it, though it does not explicitly state exclusions or alternatives.

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/halfords-pro/calculator'

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