Skip to main content
Glama

request-human-review-with-form

Initiate a human review process by submitting form data to the gotoHuman MCP server. Use a form ID and dynamically fetched schema to structure field data, optionally add metadata, and assign specific reviewers.

Instructions

Request a human review with a form. NOTE: If you don't have a form ID yet, list all available forms using the list-forms tool first. To know what to pass for fieldData, you need to fetch the schema for the form fields using the get-form-schema tool.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
assignToUsersNoOptional list of user emails to assign the review to
fieldDataYesThe field data to include in the review request. Note that this is a dynamic schema that you need to fetch first using the get-form-schema tool.
formIdYesThe form ID to request a human review for
metadataNoOptional additional data that will be incl. in the webhook response after form submission. Incl. everything required to proceed with your workflow.

Implementation Reference

  • The handler function that implements the core logic for the 'request-human-review-with-form' tool. It creates a review request using GotoHuman, adds field data, metadata, and assignees, sends the request, and returns the review ID and link.
    async ({ formId, fieldData, metadata, assignToUsers }) => { try { const gotoHuman = new GotoHuman(); const reviewRequest = gotoHuman.createReview(formId); // Add all field data dynamically Object.entries(fieldData).forEach(([key, value]) => { reviewRequest.addFieldData(key, value); }); // Add optional metadata if provided if (metadata) { Object.entries(metadata).forEach(([key, value]) => { reviewRequest.addMetaData(key, value); }); } // Assign to specific users if provided if (assignToUsers) { reviewRequest.assignToUsers(assignToUsers); } const response = await reviewRequest.sendRequest(); return { content: [{ type: "text", text: JSON.stringify({ success: true, reviewId: response.reviewId, reviewLink: response.gthLink }) }] }; } catch (error) { return { content: [{ type: "text", text: JSON.stringify({ success: false, error: error instanceof Error ? error.message : "Unknown error occurred" }) }], isError: true }; } }
  • Zod schema defining the input parameters for the 'request-human-review-with-form' tool, including formId, fieldData, optional metadata, and optional assignToUsers.
    const requestHumanReviewSchema = { formId: z.string().describe("The form ID to request a human review for"), fieldData: z.record(z.string(), z.any()).describe("The field data to include in the review request. Note that this is a dynamic schema that you need to fetch first using the get-form-schema tool."), metadata: z.record(z.string(), z.string()).optional().describe("Optional additional data that will be incl. in the webhook response after form submission. Incl. everything required to proceed with your workflow."), assignToUsers: z.array(z.string()).optional().describe("Optional list of user emails to assign the review to") };
  • src/index.ts:100-151 (registration)
    MCP server tool registration for 'request-human-review-with-form', specifying the tool name, description, input schema, and handler function.
    server.tool( "request-human-review-with-form", "Request a human review with a form. NOTE: If you don't have a form ID yet, list all available forms using the list-forms tool first. To know what to pass for fieldData, you need to fetch the schema for the form fields using the get-form-schema tool.", requestHumanReviewSchema, async ({ formId, fieldData, metadata, assignToUsers }) => { try { const gotoHuman = new GotoHuman(); const reviewRequest = gotoHuman.createReview(formId); // Add all field data dynamically Object.entries(fieldData).forEach(([key, value]) => { reviewRequest.addFieldData(key, value); }); // Add optional metadata if provided if (metadata) { Object.entries(metadata).forEach(([key, value]) => { reviewRequest.addMetaData(key, value); }); } // Assign to specific users if provided if (assignToUsers) { reviewRequest.assignToUsers(assignToUsers); } const response = await reviewRequest.sendRequest(); return { content: [{ type: "text", text: JSON.stringify({ success: true, reviewId: response.reviewId, reviewLink: response.gthLink }) }] }; } 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