agent-nodejs icon indicating copy to clipboard operation
agent-nodejs copied to clipboard

feat(mcp-server): add action tools (getActionForm, executeAction)

Open Scra3 opened this issue 1 month ago • 2 comments

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

  • getActionEndpoints helper in schema-fetcher
  • ActionEndpointsMap export in agent-caller
  • queryWithFileSupport method in agent-client HttpRequester
  • executeWithFileSupport method 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

Scra3 avatar Dec 22 '25 14:12 Scra3