Skip to main content
Glama

GenAIScript

Official
by microsoft
MIT License
43
2,820
  • Linux
  • Apple
system.user_input.genai.mts2.02 kB
system({ title: "Tools to ask questions to the user.", }) export default function (ctx: ChatGenerationContext) { const { defTool } = ctx defTool( "user_input_confirm", "Ask the user to confirm a message.", { type: "object", properties: { message: { type: "string", description: "Message to confirm", }, }, required: ["message"], }, async (args) => { const { context, message } = args context.log(`user input confirm: ${message}`) return await host.confirm(message) } ) defTool( "user_input_select", "Ask the user to select an option.", { type: "object", properties: { message: { type: "string", description: "Message to select", }, options: { type: "array", description: "Options to select", items: { type: "string", }, }, }, required: ["message", "options"], }, async (args) => { const { context, message, options } = args context.log(`user input select: ${message}`) return await host.select(message, options) } ) defTool( "user_input_text", "Ask the user to input text.", { type: "object", properties: { message: { type: "string", description: "Message to input", }, }, required: ["message"], }, async (args) => { const { context, message } = args context.log(`user input text: ${message}`) return await host.input(message) } ) }

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