Skip to main content
Glama
kelseyee

Calculator MCP

by kelseyee

factorial

Calculate the factorial of an integer by multiplying all positive integers up to that number. Use this tool to compute mathematical permutations and combinations.

Instructions

计算整数阶乘

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nYes

Implementation Reference

  • The 'factorial' tool handler, decorated with @mcp.tool() for registration in FastMCP. Computes the factorial of an integer n using math.factorial(n). Includes input type hint (int) and output (int), with docstring describing the function.
    @mcp.tool() def factorial(n: int) -> int: """计算整数阶乘""" return math.factorial(n)
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/kelseyee/mcp_calculator'

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