Skip to main content
Glama

GenAIScript

Official
by microsoft
MIT License
43
2,820
  • Linux
  • Apple
system.math.genai.mts945 B
system({ title: "Math expression evaluator", description: "Register a function that evaluates math expressions", }) export default function (ctx: ChatGenerationContext) { const { defTool } = ctx defTool( "math_eval", "Evaluates a math expression. Do NOT try to compute arithmetic operations yourself, use this tool.", { type: "object", properties: { expression: { type: "string", description: "Math expression to evaluate using mathjs format. Use ^ for power operator.", }, }, required: ["expression"], }, async (args) => { const { context, expression } = args const res = String((await parsers.math(expression)) ?? "?") context.log(`math: ${expression} => ${res}`) return res } ) }

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/microsoft/genaiscript'

If you have feedback or need assistance with the MCP directory API, please join our Discord server