aminghadersohi opened a new pull request, #40351: URL: https://github.com/apache/superset/pull/40351
### SUMMARY Adds a new `create_layer_annotation` MCP tool that allows AI assistants to add annotations to existing annotation layers. The tool follows the established MCP mutation pattern and runs `CreateAnnotationCommand`, which validates: - The annotation layer exists - The short description is unique within the layer - End datetime is not before start datetime **New files:** - `superset/mcp_service/annotation_layer/schemas.py` — Pydantic request/response schemas - `superset/mcp_service/annotation_layer/tool/create_layer_annotation.py` — MCP tool implementation - `superset/mcp_service/annotation_layer/__init__.py` and `tool/__init__.py` — module init files **Modified:** - `superset/mcp_service/app.py` — registers the new tool on startup ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF N/A — backend MCP service tool, no UI changes. ### TESTING INSTRUCTIONS 1. Start the Superset MCP service 2. Connect an MCP client 3. Call `create_layer_annotation` with a valid `layer_id`, `short_descr`, `start_dttm`, and `end_dttm` 4. Verify the annotation is created and the tool returns the annotation `id` 5. Test error cases: invalid `layer_id` (returns error in response), duplicate `short_descr` (returns validation error), `end_dttm` before `start_dttm` ### ADDITIONAL INFORMATION - [ ] Has associated issue: - [ ] Required feature flags: - [ ] Changes UI - [ ] Includes DB Migration - [x] Introduces new feature or API - [ ] Removes existing feature or API -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
