Skip to main content
Glama
vipankumar87

MCP Multi-Tool Server

by vipankumar87

subtract

Calculate the difference between two numbers by subtracting the second value from the first. This mathematical operation tool provides accurate subtraction results for numeric inputs.

Instructions

Subtract the second number from the first number.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
aYes
bYes

Implementation Reference

  • server.py:78-81 (handler)
    The subtract tool is implemented as a handler function using the @mcp.tool() decorator, which likely registers it with MCP. It takes two float arguments and returns their difference.
    @mcp.tool()
    def subtract(a: float, b: float) -> float:
        """Subtract the second number from the first number."""
        return a - b
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It only states the basic operation without mentioning any behavioral traits such as error handling (e.g., for non-numeric inputs), performance characteristics, or side effects. For a tool with zero annotation coverage, this is a significant gap, as it leaves the agent without crucial operational context.

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 extremely concise and front-loaded, consisting of a single, clear sentence: 'Subtract the second number from the first number.' Every word earns its place by directly conveying the tool's purpose without any redundancy or unnecessary elaboration, making it efficient for quick understanding.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's low complexity (simple arithmetic), no annotations, no output schema, and 2 parameters with clarified semantics in the description, the description is minimally adequate. It covers the basic operation but lacks details on output format, error cases, or usage context, which could be important for robust agent interaction. It meets the baseline for such a simple tool but doesn't excel.

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 description adds meaningful semantics beyond the input schema. The schema defines parameters 'a' and 'b' as numbers without descriptions (0% coverage), but the description clarifies that 'a' is the first number and 'b' is the second number to subtract from it. This compensates well for the low schema coverage by explaining the order and role of parameters, though it doesn't detail constraints like integer vs. float.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: 'Subtract the second number from the first number.' This is a specific verb (subtract) applied to resources (numbers), making the operation unambiguous. However, it doesn't explicitly differentiate from sibling tools like 'add' or 'divide' beyond the inherent meaning of subtraction, which is why it doesn't reach a 5.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention sibling tools like 'add' or 'divide', nor does it specify contexts where subtraction is preferred over other operations. This lack of comparative or contextual advice limits its utility for an AI agent in selecting among multiple arithmetic 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/vipankumar87/MCP-Example'

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