Skip to main content
Glama

create-answers

Add multiple responses to one or more dynamic forms using UUIDs and field indexes with the 'create-answers' tool in the Dynamic Form MCP server.

Instructions

Agrega múltiples respuestas a uno o varios formularios mediante sus UUID y los índices de campo

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
answersYesArray de respuestas a crear

Implementation Reference

  • Handler function that creates answers for one or multiple forms by calling DynamicForm.createAnswers with the provided answers data.
    async ({ answers }) => { const form = new DynamicForm(); const { responses, error } = await form.createAnswers(answers); if (error) { return { content: [{ type: "text", text: `Error al crear las respuestas: ${error}` }] }; } return { content: [{ type: "text", text: JSON.stringify(responses, null, 2) }] }; }
  • Zod input schema defining an array of answers, each with a form UUID and field responses (index-value pairs).
    { answers: z .array( z.object({ uuid: z.string().uuid().describe("UUID del formulario"), fields: z .array( z.object({ index: z.number().describe("Índice del campo"), value: z.string().describe("Valor de la respuesta") }) ) .min(1) .describe("Lista de respuestas por campo") }) ) .min(1) .describe("Array de respuestas a crear"), },
  • src/index.ts:90-120 (registration)
    Registration of the 'create-answers' tool on the MCP server, including name, description, input schema, and handler function.
    server.tool( "create-answers", "Agrega múltiples respuestas a uno o varios formularios mediante sus UUID y los índices de campo", { answers: z .array( z.object({ uuid: z.string().uuid().describe("UUID del formulario"), fields: z .array( z.object({ index: z.number().describe("Índice del campo"), value: z.string().describe("Valor de la respuesta") }) ) .min(1) .describe("Lista de respuestas por campo") }) ) .min(1) .describe("Array de respuestas a crear"), }, async ({ answers }) => { const form = new DynamicForm(); const { responses, error } = await form.createAnswers(answers); if (error) { return { content: [{ type: "text", text: `Error al crear las respuestas: ${error}` }] }; } return { content: [{ type: "text", text: JSON.stringify(responses, null, 2) }] }; } );

Other Tools

Related Tools

Latest Blog Posts

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/backsoul/dynamicform-mcp'

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