Skip to main content
Glama
backsoul

Dynamic Form MCP

by backsoul

create-answers

Add multiple responses to dynamic forms using UUIDs and field indices to populate form data efficiently.

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

  • The handler function for the 'create-answers' tool. It creates a new DynamicForm instance and calls createAnswers with the provided answers array, handling errors and returning the responses as JSON.
    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 for the 'create-answers' tool, defining an array of answers each with uuid and fields array (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' MCP tool using server.tool, 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) }] };
      }
    );
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries full burden. It discloses the tool adds answers (a write operation) but lacks behavioral details like permission requirements, whether answers are editable after creation, rate limits, error handling, or what happens on success. For a mutation tool with zero annotation coverage, this is a significant gap.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence in Spanish that front-loads the key action and parameters. It wastes no words and is appropriately sized for the tool's complexity.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given no annotations and no output schema, the description is incomplete for a mutation tool. It doesn't explain what the tool returns, error conditions, or behavioral traits like idempotency. While the schema covers inputs well, the overall context lacks necessary operational details.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema fully documents the single parameter 'answers' and its nested structure (UUIDs, field indices, values). The description adds minimal semantics by mentioning UUIDs and field indices, but doesn't clarify format or constraints beyond what the schema provides. Baseline 3 is appropriate when schema does the heavy lifting.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('Agrega múltiples respuestas') and the target resource ('a uno o varios formularios'), with specific identifiers ('mediante sus UUID y los índices de campo'). It distinguishes from siblings like 'create-form' (which creates forms) and 'get-answers' (which retrieves answers). However, it doesn't explicitly contrast with 'get-form', though the verb 'Agrega' implies creation versus retrieval.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites (e.g., existing forms), exclusions (e.g., invalid UUIDs), or comparisons to siblings like 'get-answers' for reading answers. Usage is implied by the action but not explicitly stated.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other 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