list-forms
Retrieve all available review forms to integrate human approval steps into AI agents and automations. First, fetch form schemas using get-form-schema for field details.
Instructions
List all available review forms. NOTE: You need to fetch the schema for the form fields first using the get-form-schema tool.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/index.ts:25-51 (handler)Handler function for the 'list-forms' tool: creates a GotoHuman instance and fetches available review forms, returning them as JSON or error.async () => { try { const gotoHuman = new GotoHuman({origin: "mcp-server", originV: version}); const forms = await gotoHuman.fetchReviewForms(); return { content: [{ type: "text", text: JSON.stringify({ success: true, forms: forms }) }] }; } catch (error) { return { content: [{ type: "text", text: JSON.stringify({ success: false, error: error instanceof Error ? error.message : "Unknown error occurred" }) }], isError: true }; } }
- src/index.ts:22-52 (registration)Registers the 'list-forms' tool using server.tool, with empty input schema and the handler function."list-forms", "List all available review forms. NOTE: You need to fetch the schema for the form fields first using the get-form-schema tool.", {}, async () => { try { const gotoHuman = new GotoHuman({origin: "mcp-server", originV: version}); const forms = await gotoHuman.fetchReviewForms(); return { content: [{ type: "text", text: JSON.stringify({ success: true, forms: forms }) }] }; } catch (error) { return { content: [{ type: "text", text: JSON.stringify({ success: false, error: error instanceof Error ? error.message : "Unknown error occurred" }) }], isError: true }; } } );
- src/index.ts:24-24 (schema)Empty input schema for the 'list-forms' tool (no parameters required).{},