***

title: MathSkill
slug: /reference/typescript/agents/skills/math
description: Evaluate mathematical expressions safely.
---------------------

For a complete index of all SignalWire documentation pages, fetch https://signalwire.com/docs/llms.txt

[add-skill]: /docs/server-sdks/reference/typescript/agents/agent-base/add-skill

[base-parameters]: /docs/server-sdks/reference/typescript/agents/skills#base-parameters

Evaluate mathematical expressions safely. Supports basic arithmetic (`+`, `-`, `*`,
`/`), exponentiation (`^`), modulo (`%`), and parentheses for grouping.

**Class:** `MathSkill`

**Tools:** `calculate`

**Env vars:** None

No custom parameters. This skill inherits only the [base parameters][base-parameters].

```typescript {5}
import { AgentBase, MathSkill } from '@signalwire/sdk';

const agent = new AgentBase({ name: 'assistant', route: '/assistant' });
agent.setPromptText('You are a helpful assistant.');
await agent.addSkill(new MathSkill());

agent.run();
```