Skip to main content
Glama
Joseph19820124

Example MCP Server

subtract

Calculate the difference between two numbers by subtracting one integer from another. Use this tool to perform basic arithmetic subtraction operations.

Instructions

Subtract two numbers

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
aYes
bYes

Implementation Reference

  • main.py:15-17 (handler)
    The handler function that implements the subtract tool logic by subtracting two integers.
    def subtract(a: int, b: int) -> int:
        """Subtract two numbers"""
        return a - b
  • main.py:14-14 (registration)
    Registers the subtract tool with the FastMCP instance using the @mcp.tool decorator.
    @mcp.tool
  • main.py:15-15 (schema)
    Type annotations defining the input schema (two ints) and output (int) for the subtract tool.
    def subtract(a: int, b: int) -> int:
Behavior1/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. The description only states the basic operation ('subtract two numbers') without any information about side effects, error handling, performance, or output format. For a tool with no annotations, this is a significant gap in transparency, as it fails to describe how the tool behaves beyond its minimal function.

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 with a single sentence ('Subtract two numbers') that directly conveys the core function without any waste. It is front-loaded and appropriately sized for such a simple tool, making it easy for an agent to parse quickly. Every word earns its place by defining the essential operation.

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

Completeness2/5

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

Given the tool's simplicity (2 parameters, no annotations, no output schema), the description is incomplete. It lacks information about the result (e.g., returns the difference), error cases (e.g., non-numeric inputs), or behavioral context. While the operation is basic, the description does not provide enough detail for an agent to fully understand the tool's behavior and output, especially with no annotations or output schema to supplement it.

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 has 0% description coverage, but the description adds no parameter semantics beyond what is implied by the tool name. It mentions 'two numbers' which aligns with the two parameters (a and b), but provides no details about their roles, constraints, or examples. With low schema coverage, the description does not compensate adequately, resulting in a baseline score due to the straightforward nature of the parameters.

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 verb ('subtract') and resource ('two numbers'), making the purpose immediately understandable. It distinguishes from siblings like 'add', 'divide', and 'multiply' by specifying subtraction, though it doesn't explicitly contrast them. The description is specific but lacks explicit sibling differentiation beyond the inherent meaning of 'subtract'.

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 like 'add' or 'divide'. It states what the tool does but offers no context about appropriate use cases, prerequisites, or exclusions. This leaves the agent to infer usage based on the tool name alone, which is insufficient for optimal selection.

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/Joseph19820124/joseph_mcp_server'

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