agent-nodejs
agent-nodejs copied to clipboard
feat(mcp-server): add action tools (getActionForm, executeAction)
Summary
Add MCP tools for working with Forest Admin actions:
getActionForm
- Load form fields for an action with dynamic form support
- Shows field types, options, validation, and widget metadata
- Supports multi-page forms
- Returns hints (canExecute, requiredFieldsMissing)
executeAction
- Execute actions with form values
- Support for file download responses (returns base64-encoded data)
- Activity logging with 'executeAction' action
Other changes
-
getActionEndpointshelper in schema-fetcher -
ActionEndpointsMapexport in agent-caller -
queryWithFileSupportmethod in agent-client HttpRequester -
executeWithFileSupportmethod in agent-client Action
Dependencies
This PR is based on #1389 (feat/update) and should be merged after it.
Test plan
- [x] Unit tests for getActionForm tool (25 tests)
- [x] Unit tests for executeAction tool (25 tests)
- [x] All agent-client tests pass (152 tests)
- [x] All mcp-server tests pass (414 tests)
🤖 Generated with Claude Code