Skip to main content
Glama

UK Data: Everyday calculators

batting_average

Read-onlyIdempotent

Calculates a baseball player's batting average by dividing hits by at-bats. Returns the result rounded to the specified precision (default 3 decimal places). (cost: 1 credit)

Input Schema

NameRequiredDescriptionDefault
num_hitsNointeger, required, number of hits
precisionNointeger, optional, decimal places to round to, default 3
num_at_batsNointeger, required, number of at-bats

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.5/5.0
Behavior4/5

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

The annotations already establish that this is a safe, idempotent, non-destructive read operation. The description adds useful context about rounding to a specified precision and a credit cost, though it omits edge-case behavior such as division by zero at-bats.

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 two compact sentences, front-loads the calculation, then states the return behavior and cost. There is no unnecessary wording.

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 calculator with full schema coverage and annotations covering safety, the description supplies the formula, output rounding, default precision, and cost. Nothing essential for invoking it correctly is missing.

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 100%, so parameter definitions are already documented. The description adds meaning by explaining the formula using hits and at-bats and confirming the default precision of 3 decimal places, but it does not clarify zero at-bats or precision bounds.

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 and resource: it calculates a baseball player's batting average from hits divided by at-bats. This distinguishes it from generic siblings such as average or calculate.

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 intended use is clear from the baseball-specific formula and required inputs. It does not explicitly say when to choose this over generic calculation tools or mention exclusions, so it falls short of a 5.

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