get-form
Retrieve the structure of an existing dynamic web form using its unique identifier (UUID) to access and manage form configurations.
Instructions
Obtiene la estructura de un formulario existente mediante su UUID
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| uuid | Yes | UUID del formulario |
Implementation Reference
- src/index.ts:66-73 (handler)The handler function for the 'get-form' tool. It creates a DynamicForm instance with the provided UUID, calls getFormulary() to retrieve the form structure, and returns it as a JSON string or an error message.async ({ uuid }) => { const form = new DynamicForm(uuid); const { formulary, error } = await form.getFormulary(); if (error) { return { content: [{ type: "text", text: `Error al obtener el formulario: ${error}` }] }; } return { content: [{ type: "text", text: JSON.stringify(formulary, null, 2) }] }; }
- src/index.ts:65-65 (schema)The input schema for the 'get-form' tool, defining a required 'uuid' parameter as a UUID string.{ uuid: z.string().uuid().describe("UUID del formulario") },
- src/index.ts:62-74 (registration)The registration of the 'get-form' tool via server.tool(), specifying the name, description, input schema, and handler function.server.tool( "get-form", "Obtiene la estructura de un formulario existente mediante su UUID", { uuid: z.string().uuid().describe("UUID del formulario") }, async ({ uuid }) => { const form = new DynamicForm(uuid); const { formulary, error } = await form.getFormulary(); if (error) { return { content: [{ type: "text", text: `Error al obtener el formulario: ${error}` }] }; } return { content: [{ type: "text", text: JSON.stringify(formulary, null, 2) }] }; } );