ceiling
Rounds a number up to the nearest integer using Math-MCP's mathematical functions. Submit the number to obtain the ceiling value for accurate numerical calculations.
Instructions
Rounds a number up to the nearest integer
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| number | Yes | The number to round up |
Implementation Reference
- src/index.ts:235-244 (handler)MCP tool handler for 'ceiling': calls Arithmetic.ceil on input and returns result as text content.}, async ({ number }) => { const value = Arithmetic.ceil(number) return { content: [{ type: "text", text: `${value}` }] } })
- src/index.ts:234-234 (schema)Zod schema for the 'ceiling' tool input: a single number.number: z.number().describe("The number to round up"),
- src/index.ts:233-244 (registration)Registration of the 'ceiling' MCP tool on the mathServer, specifying name, description, input schema, and handler.mathServer.tool("ceiling", "Rounds a number up to the nearest integer", { number: z.number().describe("The number to round up"), }, async ({ number }) => { const value = Arithmetic.ceil(number) return { content: [{ type: "text", text: `${value}` }] } })
- src/Classes/Arithmetic.ts:72-75 (helper)Arithmetic.ceil static method implementing the ceiling operation using Math.ceil.static ceil(number: number) { const ceil = Math.ceil(number) return ceil }