Skip to main content
Glama

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
NameRequiredDescriptionDefault
numberYesThe number to round up

Implementation Reference

  • 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}` }] } })
  • 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}` }] } })
  • Arithmetic.ceil static method implementing the ceiling operation using Math.ceil.
    static ceil(number: number) { const ceil = Math.ceil(number) return ceil }

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