evaluate

Pack: mathjs · Endpoint: https://gateway.pipeworx.io/mathjs/mcp

Evaluate mathematical expressions: arithmetic, algebra, trigonometry, statistics. Returns computed result. E.g., “2+2”, “sin(pi/2)”, “sqrt(16)”, “mean([1,2,3])”. Use when you need to calculate or simplify math.

Parameters

NameTypeRequiredDescription
expressionstringyesMathematical expression to evaluate (e.g., “2 + 3 * 4”, “sqrt(16)”, “sin(pi/2)”, “det([1,2;3,4])“)

Example call

Arguments

{
  "expression": "2 + 3 * 4"
}

curl

curl -X POST https://gateway.pipeworx.io/mathjs/mcp \
  -H 'Content-Type: application/json' \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"evaluate","arguments":{"expression":"2 + 3 * 4"}}}'

TypeScript (@pipeworx/sdk)

import { Pipeworx } from '@pipeworx/sdk';
const pipeworx = new Pipeworx();

const result = await pipeworx.call('evaluate', {
  "expression": "2 + 3 * 4"
});

More examples

{
  "expression": "sin(pi/2)"
}

Response shape

Always returns: expression, result

FieldTypeDescription
expressionstringThe mathematical expression that was evaluated
resultstringThe computed result of the expression
Full JSON Schema
{
  "type": "object",
  "properties": {
    "expression": {
      "type": "string",
      "description": "The mathematical expression that was evaluated"
    },
    "result": {
      "type": "string",
      "description": "The computed result of the expression"
    }
  },
  "required": [
    "expression",
    "result"
  ]
}

Connect

Add this to your MCP client config, or use one-click install buttons:

{
  "mcpServers": {
    "mathjs": {
      "url": "https://gateway.pipeworx.io/mathjs/mcp"
    }
  }
}

See Getting Started for client-specific install steps.

Regenerated from source · build May 9, 2026