Skip to main content
Glama
by microsoft
import-prompty.genai.mjs789 B
script({ model: "small", tests: {}, }) const res = await runPrompt((ctx) => { ctx.importTemplate("src/templates/basic.prompty", { question: "what is the capital of france?", hint: "starts with p", n: 3, }) }) console.log(`inline: ${res.text}`) if (!/paris/i.test(res.text)) throw new Error("should not include paris") importTemplate("src/templates/basic.prompty", { question: "what is the capital of france?", hint: "starts with p", n: 5, }) const resError = await runPrompt((ctx) => { ctx.importTemplate("src/templates/basic.prompty", { questionTYPO: "what is the capital of france?", hint: "starts with p", n: 5, }) }) console.log(resError) if (!resError.error) throw new Error("should have failed")

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