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

   ## Summary
   
   Adds a `create_dataset` MCP tool that lets callers register an existing 
physical
   database table as a Superset dataset — the programmatic equivalent of
   **Data → Datasets → + Dataset** in the UI.
   
   - **`CreateDatasetRequest` schema** — `database_id`, `schema`, `table_name`, 
optional `owners`
   - **`create_dataset` tool** — wraps `CreateDatasetCommand`, returns 
`DatasetInfo` (same
     shape as `get_dataset_info`) so the `id` feeds directly into 
`generate_chart` or
     `generate_explore_link`
   - **Typed error handling** — distinct `error_type` values for exists / 
not-found /
     validation / internal errors so callers can act on each case
   - **Unit tests** — success, owners, each error case, full `DatasetInfo` shape
   - **`DEFAULT_INSTRUCTIONS`** updated to list the new tool
   
   ## Motivation
   
   The MCP service already exposes `create_virtual_dataset` for SQL-based 
datasets. This
   PR adds the physical-table counterpart so agents can complete the full
   "find DB → register table → chart it" workflow without manual UI steps.
   
   ## Test plan
   
   - [ ] `pytest 
tests/unit_tests/mcp_service/dataset/tool/test_create_dataset.py -x`
   - [ ] Existing dataset tool tests still pass
   - [ ] `pre-commit run --files 
superset/mcp_service/dataset/tool/create_dataset.py 
superset/mcp_service/dataset/schemas.py`


-- 
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