factorial
Calculate the factorial of any integer using Calculator MCP. Input a number to compute its factorial efficiently, ideal for mathematical and programming applications.
Instructions
计算整数阶乘
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| n | Yes |
Implementation Reference
- calculator.py:43-46 (handler)The 'factorial' tool handler, registered via @mcp.tool() decorator. Takes an integer n and returns its factorial using math.factorial. Schema inferred from type hints (n: int) -> int and docstring.@mcp.tool() def factorial(n: int) -> int: """计算整数阶乘""" return math.factorial(n)