Skip to main content
Glama
gotohuman

gotoHuman MCP

Official

get-form-schema

Retrieve form schemas for human review requests in AI workflows, enabling structured data collection during approval processes.

Instructions

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

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
formIdYesThe form ID to fetch the schema for

Implementation Reference

  • The handler function for the 'get-form-schema' tool. It creates a GotoHuman instance, fetches the form fields schema using fetchSchemaForFormFields(formId), and returns it as JSON in the MCP response format. Handles errors by returning an error response.
    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 }; } }
  • Input schema for the 'get-form-schema' tool, defining the required 'formId' parameter as a string using Zod.
    { formId: z.string().describe("The form ID to fetch the schema for") },
  • src/index.ts:55-89 (registration)
    Registration of the 'get-form-schema' tool on the MCP server, 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 }; } } );

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