Skip to main content
Glama
vipankumar87

MCP Multi-Tool Server

by vipankumar87

square_root

Calculate the square root of a number to solve mathematical problems or verify calculations. Enter a numeric value to get its square root result.

Instructions

Calculate the square root of a number.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
xYes

Implementation Reference

  • The handler function for the 'square_root' tool. It takes a float input 'x', validates that it is non-negative, and returns the square root using math.sqrt. Registered via the @mcp.tool() decorator.
    @mcp.tool()
    def square_root(x: float) -> float:
        """Calculate the square root of a number."""
        if x < 0:
            raise ValueError("Cannot calculate square root of negative number")
        return math.sqrt(x)

Tool Definition Quality

Score is being calculated. Check back soon.

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