aminghadersohi opened a new pull request, #40349:
URL: https://github.com/apache/superset/pull/40349

   ### SUMMARY
   
   Adds two new MCP (Model Context Protocol) tools for the `tag` domain, 
enabling AI assistants to discover and inspect Superset tags:
   
   - **`list_tags`**: Lists tags with filtering (column-based), text search, 
pagination, sorting, and `select_columns` projection. Backed by `TagDAO.list`, 
using `ModelListCore`.
   - **`get_tag_info`**: Returns metadata for a single tag by numeric ID. 
Backed by `TagDAO.find_by_id`, using `ModelGetInfoCore`.
   
   Key design decisions:
   - `TagFilter.col` is limited to `name` and `type` (the only 
indexed/filterable columns)
   - `TagInfo` extends the shared `system.schemas.TagInfo` base to avoid 
duplication
   - `select_columns` filtering is implemented via 
`@model_serializer(mode="wrap")` on `TagInfo`
   - Default response columns are `id`, `name`, `type` (excludes heavy audit 
fields)
   - `search` and `filters` are mutually exclusive (validated at the schema 
level)
   - Also adds the `ct` (contains/ilike) operator to `ColumnOperatorEnum` and 
`TYPE_OPERATOR_MAP`, which was documented but missing from the enum
   
   ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
   
   N/A — backend-only MCP tools
   
   ### TESTING INSTRUCTIONS
   
   1. Run the new unit tests:
      ```bash
      pytest tests/unit_tests/mcp_service/tag/tool/test_tag_tools.py -v
      ```
   2. Connect an MCP client to a running Superset instance and invoke 
`list_tags` / `get_tag_info`.
   
   ### ADDITIONAL INFORMATION
   
   - [ ] Has associated issue:
   - [ ] Required feature flags:
   - [ ] Changes UI
   - [ ] Includes DB Migration (follow approval process in 
[SIP-59](https://github.com/apache/superset/issues/13351))
     - [ ] Migration is atomic, supports rollback & is backwards-compatible
     - [ ] Confirm DB migration upgrade and downgrade tested
     - [ ] Runtime estimates and downtime expectations provided
   - [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]

Reply via email to