aminghadersohi opened a new pull request, #40342: URL: https://github.com/apache/superset/pull/40342
### SUMMARY Adds four MCP tools for annotation layers and their annotations, completing discovery coverage for the annotation layer menu item: - **`list_annotation_layers`** — list annotation layers with filtering (by name), text search (name + description), column selection, ordering, and 1-based pagination - **`get_annotation_layer_info`** — retrieve a single annotation layer by integer ID - **`list_layer_annotations`** — list annotations scoped to a specific layer (`layer_id` required), with filtering (by short description), text search (short + long description), and pagination - **`get_layer_annotation_info`** — retrieve a single annotation by `layer_id` + `annotation_id`, with membership validation (returns not_found if the annotation belongs to a different layer) All tools use `ModelListCore` / `ModelGetInfoCore` for DRY consistency with existing chart, dashboard, dataset, and database tools. ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF N/A — MCP server tools, no UI changes. ### TESTING INSTRUCTIONS Unit tests cover all four tools: ```bash pytest tests/unit_tests/mcp_service/annotation_layer/tool/test_annotation_layer_tools.py -v ``` Tests verify: - Schema validation (filter column restrictions, search + filter mutual exclusion) - Basic listing, empty results, search pass-through, pagination metadata - Not-found error responses - Layer-scoped annotation listing (layer_id filter always prepended) - Annotation membership validation (wrong layer → not_found error) ### 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]
