absolute
Returns the absolute value of a given number. Use it to determine magnitude regardless of sign.
Instructions
Absolute value.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| value | Yes |
Implementation Reference
- cruncher.js:498-513 (registration)Tool registration/definition for 'absolute' — includes name, annotations, description, and inputSchema (requires a single 'value' of type number).
{ name: "absolute", annotations: { title: "Absolute Value", readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false, }, description: "Absolute value.", inputSchema: { type: "object", properties: { value: { type: "number" } }, required: ["value"], }, }, - cruncher.js:508-512 (schema)Input schema for 'absolute': object with one property 'value' (number), required.
inputSchema: { type: "object", properties: { value: { type: "number" } }, required: ["value"], }, - cruncher.js:1492-1498 (handler)Handler implementation for 'absolute': returns Math.abs(value) — a one-liner delegate to JavaScript's Math.abs.
/** * Absolute value. * @param {Object} args - The arguments object. * @param {number} args.value - The number. * @returns {number} The absolute value of value. */ absolute: ({ value }) => Math.abs(value), - cruncher.js:148-149 (helper)The 'absolute' tool is listed in MAIN_THREAD_TOOLS set, meaning it executes synchronously on the main thread (no worker overhead).
"power", "sqrt", "logarithm", "natural_log", "absolute", // Constant lookup - cruncher.js:78-79 (helper)The 'absolute' tool is included in the 'standard' tool tier, meaning it is available in both standard and full modes.
"sqrt", "power", "absolute", "modulo", "factorial", "logarithm", "natural_log", "get_constant",