Skip to main content
Glama

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
NameRequiredDescriptionDefault
numbersYesArray 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}` }] } })
  • 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 }

Other Tools

Related 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/EthanHenrickson/math-mcp'

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