min
Determine the smallest number in a given list of numerical values using this mathematical tool, designed to simplify accurate calculations for precise analysis and problem-solving.
Instructions
Finds the minimum value from a list of numbers
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| numbers | Yes | Array of numbers to find the minimum of |
Implementation Reference
- src/index.ts:182-193 (registration)Registration of the 'min' tool, including description, input schema, and handler function that delegates to Statistics.min and returns the result as text content.mathServer.tool("min", "Finds the minimum value from a list of numbers", { numbers: z.array(z.number()).describe("Array of numbers to find the minimum of") }, async ({ numbers }) => { const value = Statistics.min(numbers) return { content: [{ type: "text", text: `${value}` }] } })
- src/Classes/Statistics.ts:84-88 (helper)Static method in Statistics class that computes the minimum value using Math.min spread operator on the numbers array.static min(numbers: number[]) { const minValue = Math.min(...numbers); return minValue }