-
Notifications
You must be signed in to change notification settings - Fork 10
feat(mcp-server): complete action support with files, dynamic forms, and CRUD operations #1349
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
17 new issues
|
|
Coverage Impact This PR will not change total coverage. 🚦 See full report on Qlty Cloud »🛟 Help
|
5a9a1e7 to
5dbcbd5
Compare
a650103 to
ef695fc
Compare
4bb3277 to
13bbc97
Compare
13bbc97 to
bdb1840
Compare
Auto code reviewNo issues found. Checked for bugs and CLAUDE.md compliance. 🤖 Generated with Claude Code - If this code review was useful, please react with 👍. Otherwise, react with 👎. |
1 similar comment
Auto code reviewNo issues found. Checked for bugs and CLAUDE.md compliance. 🤖 Generated with Claude Code - If this code review was useful, please react with 👍. Otherwise, react with 👎. |
- Add `create` tool to create records in a collection - Add `update` tool to update existing records - Add `delete` tool to delete one or more records - Add integration tests for all three tools (43 new tests) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]>
…port
- Rename tool from getHasMany to listRelated for clarity
- Rename has-many.ts to list-related.ts
- Add enableCount option with totalCount support (parallel execution)
- Change response format to always return { records: [...] }
- Add count() method to Relation class in agent-client
- Fix typo in error message for invalid relations
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <[email protected]>
- Update ForestField relationship type to include 'BelongsToMany' - Include BelongsToMany relations in error messages alongside HasMany - Add test for BelongsToMany relations in available relations error - Fix existing error tests with missing schema mocks 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]>
- Change description from "(hasMany)" to "one-to-many or many-to-many" - Simplify activity log label from "list hasMany relation" to "list relation" - Update related tests 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]>
- Add describeCollection tool to expose collection schema to AI - Add capabilities() method to Collection class in agent-client - Returns fields with types, operators, and relations - Falls back to forest schema if capabilities route unavailable - Fix integration test description mismatch 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]>
Add instruction to use this tool first before querying data 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]>
🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]>
- Add getActionForm tool to load action form fields - Add executeAction tool to execute actions with form values - Update describeCollection to include actions info - Update agent-caller to support action endpoints - Update activity-logs-creator for action activity logs 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]>
…onForm - Add optional `values` parameter to trigger change hooks for dynamic forms - Return layout information including page structure for multi-page forms - Enhance field response with description, enums, options, and isReadOnly - Enable progressive field discovery by calling getActionForm with values 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]>
executeAction improvements: - Handle all result types: Success, Webhook, Redirect - Return invalidatedRelations for cache invalidation - Document that File downloads are not supported via MCP getActionForm improvements: - Add full widget metadata (placeholder, min, max, step, etc.) - Include widget type name for UI hints - Support file picker constraints (extensions, size, count) - Include reference field for Collection type - Add search configuration for dynamic dropdowns 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]>
File upload:
- Accept file values as { name, mimeType, contentBase64 }
- Convert to data URI format expected by the agent
- Support both single files and file arrays (FileList)
File download:
- Add queryWithFileSupport to agent-client http-requester
- Add executeWithFileSupport method to Action class
- Handle binary responses with Content-Disposition header
- Return file content as base64 (max 5MB)
- Return FileTooLarge error for files exceeding limit
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <[email protected]>
11f5da7 to
f909651
Compare
Code fixes: - Fix potential TypeError on error.message in list-related.ts - Add SAFE_ARGUMENTS_FOR_LOGGING for all new tools - Fix html type (null -> undefined) in execute-action.ts - Make activity log creation non-blocking (no longer fails operations) - Add logging for silent deserialization fallback in http-requester New tests: - Add comprehensive tests for execute-action tool (file upload/download) - Add tests for get-action-form tool (widget metadata, layouts) - Add tests for queryWithFileSupport in http-requester - Add tests for executeWithFileSupport in action.ts 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]>
Auto code reviewNo issues found. Checked for bugs and CLAUDE.md compliance. 🤖 Generated with Claude Code |
🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]>
🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]>
Auto code reviewNo issues found. Checked for bugs in action form handling, dynamic forms, file upload/download support, and HTTP response handling. 🤖 Generated with Claude Code - If this code review was useful, please react with 👍. Otherwise, react with 👎. |
- Remove complex Boolean/Enum field detection from hints - Keep only canExecute and requiredFieldsMissing in hints - Update tool description to explain dynamic form behavior - Fix activity-logs-creator tests to match non-throwing behavior - Add example multi-page dynamic form action in dvd.ts 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]>
- Export ActivityLogAction type from activity-logs-creator - Use typed action parameter instead of string - Update list.ts to use ActivityLogAction type - Update tests with proper type assertions 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]>
- Remove createActivityLog call from getActionForm tool - Remove forestServerUrl parameter from declareGetActionFormTool - Remove getActionForm from ActivityLogAction type - Remove activity logging tests for getActionForm 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]>

Summary
This PR completes the MCP server implementation with full action support and CRUD operations.
New Tools
create- Create records in a collectionupdate- Update existing records by IDdelete- Delete one or more records by IDslistRelated- Query HasMany and BelongsToMany relationsdescribeCollection- Get collection schema including fields, relations, and actionsgetActionForm- Load action form fields with dynamic form supportexecuteAction- Execute actions with file upload/download supportAction Features
valuesparameter to trigger change hooks and discover dependent fields{ name, mimeType, contentBase64 }as field valuesFileTooLarge)Changes to agent-client
queryWithFileSupport()to http-requester for binary responsesexecuteWithFileSupport()to Action classTest plan
🤖 Generated with Claude Code