Skip to main content
Glama

calculate_percentage

Calculate a percentage of any given value using this mathematical tool. Input the base value and percentage to get the calculated result.

Instructions

Calculate a percentage of a value.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
percentageYes
valueYes

Implementation Reference

  • The main handler function for the 'calculate_percentage' tool. It is decorated with @mcp.tool(), which registers it in the MCP server. The function computes the specified percentage of the given value using the formula (value * percentage) / 100.
    @mcp.tool() def calculate_percentage(value: float, percentage: float) -> float: """Calculate a percentage of a value.""" return (value * percentage) / 100

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