Back to all tools
Free / no key

Math calculator

Use this when customers ask for calculations (totals, percentages, simple formulas). The agent sends the expression to the public mathjs API and returns the result.

Setup

  1. Open Create agent or Edit agent and add a custom tool.
  2. Copy the fields below into the form. No API key is required.
  3. Optionally mention evaluate_math in your prompt when the customer needs a calculation.

Copy into custom tool form

Copy each value into the matching field when you add a custom tool on the create or edit agent page. Replace any YOUR_… placeholders with your real credentials.

Tool name

evaluate_math

Description

Evaluate a math expression when the customer asks for a calculation. Use this for arithmetic, percentages, unit-style expressions supported by mathjs.

Endpoint URL

Paste into Endpoint URL (https:// is added automatically).

api.mathjs.org/v4/

HTTP method

GET

Tool inputs (all)

1. expression (string) Math expression to evaluate, e.g. 2*(3+4) or 15% of 80 as 0.15*80

Tool input: expression

Input name

expression

Input type

string

Input description

Math expression to evaluate, e.g. 2*(3+4) or 15% of 80 as 0.15*80

Reference value

Use this as the request query or body value and choose “Tool input” in the form.

{{expression}}

Request query (all)

expr: {{expression}}

Field name

expr

Field value

{{expression}}
Math custom tool for AI agents | CXWizard