Skip to main content
Glama
by microsoft
math-agent.genai.mjs1.1 kB
script({ title: "math-agent", model: "small", description: "A port of https://ts.llamaindex.ai/examples/agent", parameters: { question: { type: "string", default: "How much is 11 + 4? then divide by 3?", }, }, tests: { description: "Testing the default prompt", keywords: "5", }, }) defTool( "sum", "Use this function to sum two numbers", { a: 1, b: 2 }, ({ a, b }) => { console.log(`${a} + ${b}`) return `${a + b}` } ) defTool( "divide", "Use this function to divide two numbers", { type: "object", properties: { a: { type: "number", description: "The first number", }, b: { type: "number", description: "The second number", }, }, required: ["a", "b"], }, ({ a, b }) => { console.log(`${a} / ${b}`) return `${a / b}` } ) $`Answer the following arithmetic question: ${env.vars.question} `

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