Skip to main content
Glama
tanishra

Mathematics MCP Server

by tanishra

modulus

Compute the remainder of a division between two numbers. Supply a dividend and divisor to get the exact remainder, with zero-division errors handled automatically.

Instructions

Calculate the modulus (remainder) of two numbers provided in the data object. Args: data (TwoNumberOperation): An object containing two numbers, a and b. Returns: Dict[str, Any]: A dictionary containing the operation result if successful, or an error message if an exception occurs. Raises: ZeroDivisionError: If the second number (b) is zero, as modulus by zero is not allowed. Logs: Logs the operation and result in the format "MOD | a % b = result" if successful. Example: data = TwoNumberOperation(a=10, b=3) result = modulus(data) # result -> {"status": "success", "operation": "modulus", "result": 1}

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dataYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

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

  1. First observedv0.1.0

TDQS

A4.5/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 behavioral burden. It documents the return dictionary, the ZeroDivisionError condition, and the log format, which is strong. There is a small ambiguity: the Returns section suggests error messages are returned while the Raises section says ZeroDivisionError is raised, but overall behavior is much clearer than typical definitions.

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 docstring-style structure front-loads the core action and each section (Args, Returns, Raises, Logs, Example) adds non-redundant operational detail. Every section contributes something an agent needs to invoke or interpret the call correctly.

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 one-argument function with nested numeric fields, the description covers what the tool does, how parameters are packaged, what a successful result looks like, how errors are handled, and what gets logged. No critical operational information is missing for an agent to call 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?

The schema coverage is 0%, so the description must compensate for parameter meaning. It names the `data` object, says it holds two numbers `a` and `b`, and the log format 'a % b = result' plus the example clarifies their roles and ordering. It does not provide deep per-field semantics, but is sufficient for a simple two-number operation.

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 first sentence states a specific operation — 'Calculate the modulus (remainder) of two numbers' — on a clear resource (the `data` object). The operation is semantically distinct from sibling math tools like divide or gcd, so an agent can tell when this tool applies.

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 gives clear context: it computes `a % b`, requires two numeric fields, and explicitly notes that `b` cannot be zero. It does not explicitly compare this tool to sibling alternatives, but the modulus/remainder semantics are unambiguous enough for tool selection.

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/tanishra/math-mcp-server'

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