Skip to main content
Glama

get-form-schema

Retrieve the schema for form fields when requesting human review in AI workflows, ensuring proper input structure for approval processes.

Instructions

Get the schema to use for the 'fields' property when requesting a human review with a form.

Input Schema

NameRequiredDescriptionDefault
formIdYesThe form ID to fetch the schema for

Input Schema (JSON Schema)

{ "$schema": "http://json-schema.org/draft-07/schema#", "additionalProperties": false, "properties": { "formId": { "description": "The form ID to fetch the schema for", "type": "string" } }, "required": [ "formId" ], "type": "object" }

Implementation Reference

  • The asynchronous handler function that executes the logic for the 'get-form-schema' tool. It takes a formId, fetches the schema using GotoHuman.fetchSchemaForFormFields, and returns the schema or an error.
    async ({ formId }) => { try { const gotoHuman = new GotoHuman(); const formFieldsSchema = await gotoHuman.fetchSchemaForFormFields(formId); return { content: [{ type: "text", text: JSON.stringify({ success: true, formId: formId, fieldsSchema: formFieldsSchema, }) }] }; } catch (error) { return { content: [{ type: "text", text: JSON.stringify({ success: false, error: error instanceof Error ? error.message : "Unknown error occurred" }) }], isError: true }; } }
  • The input schema definition for the 'get-form-schema' tool, using Zod to validate the required 'formId' parameter.
    { formId: z.string().describe("The form ID to fetch the schema for") },
  • src/index.ts:55-89 (registration)
    The registration of the 'get-form-schema' tool on the MCP server using server.tool(), including name, description, input schema, and handler function.
    server.tool( "get-form-schema", "Get the schema to use for the 'fields' property when requesting a human review with a form.", { formId: z.string().describe("The form ID to fetch the schema for") }, async ({ formId }) => { try { const gotoHuman = new GotoHuman(); const formFieldsSchema = await gotoHuman.fetchSchemaForFormFields(formId); return { content: [{ type: "text", text: JSON.stringify({ success: true, formId: formId, fieldsSchema: formFieldsSchema, }) }] }; } catch (error) { return { content: [{ type: "text", text: JSON.stringify({ success: false, error: error instanceof Error ? error.message : "Unknown error occurred" }) }], isError: true }; } } );

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/gotohuman/gotohuman-mcp-server'

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