Skip to main content
Glama
vipankumar87

MCP Multi-Tool Server

by vipankumar87

calculate_percentage

Calculate a percentage of a value by providing the base number and percentage to compute. This tool performs the mathematical operation to determine the percentage amount.

Instructions

Calculate a percentage of a value.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
valueYes
percentageYes

Implementation Reference

  • The handler function for the 'calculate_percentage' tool, decorated with @mcp.tool() for registration in the MCP server. It calculates (value * percentage) / 100.
    @mcp.tool()
    def calculate_percentage(value: float, percentage: float) -> float:
        """Calculate a percentage of a value."""
        return (value * percentage) / 100
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It states the action ('calculate') but doesn't reveal any behavioral traits like error handling (e.g., for invalid inputs), performance characteristics, or output format. This is a significant gap for a tool with no structured safety or operational hints.

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, 'Calculate a percentage of a value.', which is front-loaded and wastes no words. Every part earns its place by directly stating the tool's purpose, making it efficient and easy to parse.

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 low complexity (2 parameters, no annotations, no output schema), the description is incomplete. It doesn't explain how the calculation is performed (e.g., formula: value * percentage/100), what the output looks like, or any edge cases. For a basic math tool, this leaves too much ambiguity for reliable agent use.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate for undocumented parameters. It mentions 'percentage of a value', which hints at the two parameters ('value' and 'percentage'), but doesn't clarify their semantics, such as whether 'percentage' is a decimal (e.g., 0.1) or a whole number (e.g., 10), or the expected output format. This adds minimal value beyond the schema's basic structure.

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

Purpose3/5

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

The description 'Calculate a percentage of a value' states what the tool does with a specific verb ('calculate') and resource ('percentage of a value'), but it's somewhat vague about the exact operation. It doesn't clearly distinguish from siblings like 'multiply' or 'divide', which could also be used for percentage calculations, though the name 'calculate_percentage' provides some differentiation.

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. Given siblings like 'multiply' and 'divide' that could handle percentage calculations, there's no indication of when this specialized tool is preferred, such as for direct percentage formulas or simplified input handling. This leaves usage context implied at best.

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