MCPcopy Create free account
hub / github.com/CommandCodeAI/BaseAI / calculator

Function calculator

examples/astro/baseai/tools/calculator.ts:3–5  ·  view source on GitHub ↗
({expression}: {expression: string})

Source from the content-addressed store, hash-verified

1import * as math from 'mathjs';
2
3export async function calculator({expression}: {expression: string}) {
4 return math.evaluate(expression);
5}
6
7const toolCalculator = () => ({
8 run: calculator,

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected