Amin Ghadersohi
06276e76c5
fix(mcp): resolve ruff E501 and formatting issues to pass pre-commit
...
- Split long string literal in schema_validator.py line 202 (E501, 94 > 88 chars)
- Apply ruff format auto-fixes to big_number.py, handlebars.py, and test_get_chart_data.py
2026-05-20 21:20:08 +00:00
Amin Ghadersohi
eb2e6bd48e
refactor(mcp): complete plugin protocol — registry bootstrap, mypy fixes, test repairs
...
On top of the dead-code elimination in the previous commit:
- Add lazy _ensure_plugins_loaded() bootstrap to ChartTypeRegistry so the
registry is populated even without importing app.py (fixes isolated test runs)
- Delegate _RegistryProxy methods to module-level functions so bootstrap runs
- Guard register() against empty chart_type strings
- Add generate_name + resolve_viz_type to ChartTypePlugin Protocol and
BaseChartPlugin; delegate generate_chart_name/_resolve_viz_type in
chart_utils to the plugin registry
- Add _with_context static helper to BaseChartPlugin (shared by all plugins)
- Fix stale 'five methods' → 'eight methods' docstring in plugin.py
- Add TypeVar _C to normalize_column_names so mypy infers correct return type
- Fix broken tests: update _pre_validate_big_number_config → _pre_validate_chart_type,
remove deleted TestNormalizeXYConfig/TestNormalizeTableConfig classes,
update runtime validator tests for removed _validate_format_compatibility /
_validate_cardinality methods, add x is not None narrowing guards
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com >
2026-05-20 21:20:08 +00:00
Richard Fogaca Nienkotter
1e2d0b5f5b
fix(mcp): defer chart preview command imports ( #40164 )
2026-05-15 12:15:33 -03:00
Richard Fogaca Nienkotter
8fa5a75c70
fix(mcp): apply cached adhoc filters to chart retrieval ( #40099 )
2026-05-14 14:21:54 -03:00
Richard Fogaca Nienkotter
2a1dcb79e3
fix(mcp): expose table chart type labels in chart responses ( #40060 )
2026-05-13 16:38:31 -03:00
Richard Fogaca Nienkotter
fa06989ed7
fix(mcp): return requested update chart previews ( #40077 )
2026-05-12 21:23:49 -03:00
Amin Ghadersohi
ff7dc53853
fix(mcp): get_chart_sql drops x_axis on echarts_timeseries_* and only renders one query for mixed_timeseries ( #39865 )
2026-05-08 15:29:28 -04:00
Amin Ghadersohi
9ac4711ac8
fix(mcp): prevent DetachedInstanceError in get_chart_preview ( #39921 )
2026-05-07 11:44:11 -04:00
Amin Ghadersohi
4a21a5365f
fix(mcp): validate column refs in generate_explore_link, update_chart_preview, and update_chart ( #39797 )
2026-05-05 19:12:31 -04:00
Richard Fogaca Nienkotter
9459bc7bf4
fix(mcp): warn on invalid chart preview form data key ( #39891 )
...
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com >
2026-05-05 16:40:00 -03:00
Amin Ghadersohi
957b298ae1
fix(mcp): add default request parameter to list_charts and list_dashboards ( #39730 )
2026-04-30 18:04:39 -04:00
Richard Fogaca Nienkotter
c2b9272f4c
fix(mcp): sanitize read path output for LLM context ( #39738 )
2026-04-29 19:06:19 -03:00
Elizabeth Thompson
8d17c34068
feat(mcp): restore self-lookup via created_by_me flag ( #39638 )
...
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com >
2026-04-29 11:03:28 -07:00
Richard Fogaca Nienkotter
549aff7cf9
fix(mcp): clarify chart preview URL metadata ( #39731 )
2026-04-29 12:37:40 -03:00
Amin Ghadersohi
4b42f82f13
fix(mcp): restore typed ChartConfig in tool schemas for LLM visibility ( #39732 )
2026-04-28 19:46:57 -04:00
Richard Fogaca Nienkotter
d0abb66fdf
fix(mcp): default chart previews to ascii ( #39719 )
2026-04-28 13:30:39 -03:00
Mehmet Salih Yavuz
3f28f5d012
fix(mcp): surface structured errors for generate_chart validation failures ( #39484 )
...
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com >
2026-04-28 11:13:53 +03:00
Amin Ghadersohi
7774ec7e3c
fix(mcp): database filter columns, timeseries SQL, and unsaved chart datasource name ( #39636 )
2026-04-27 13:41:06 -04:00
Amin Ghadersohi
ad20285dd6
fix(mcp): sanitize chart config errors and accept field name aliases ( #39606 )
2026-04-24 21:30:43 -04:00
Richard Fogaca Nienkotter
d79eb5842a
fix(mcp): protect data-model metadata from dashboard viewers ( #39599 )
...
Co-authored-by: Elizabeth Thompson <eschutho@gmail.com >
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com >
2026-04-24 09:40:39 -03:00
Richard Fogaca Nienkotter
0d50fd676b
fix(mcp): hide user directory metadata from responses ( #39576 )
...
Co-authored-by: Elizabeth Thompson <eschutho@gmail.com >
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com >
2026-04-23 17:35:08 -03:00
Amin Ghadersohi
e6853894ab
chore(mcp): extract shared chart helpers and ASCII rendering into separate modules ( #39438 )
2026-04-21 20:10:49 -04:00
Gabriel Torres Ruiz
919daabe54
fix(mcp): clear stale query_context in update_chart so filters and row_limit are applied ( #39413 )
2026-04-21 14:34:21 -03:00
Amin Ghadersohi
6948e73ec7
feat(mcp): add get_chart_sql tool and expose chart filters in get_chart_info ( #38700 )
2026-04-20 17:50:10 -04:00
Mehmet Salih Yavuz
69f062b804
feat(mcp): add a preview flow to mcp chart updates ( #39383 )
...
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com >
2026-04-16 20:31:02 +03:00
Amin Ghadersohi
5f9fc31ae2
feat(mcp): add get_chart_type_schema tool for on-demand schema discovery ( #39142 )
2026-04-07 12:07:45 -04:00
Amin Ghadersohi
bf9aff19b5
fix(mcp): compress chart config schemas to reduce search_tools token usage ( #39018 )
2026-04-06 19:52:03 -04:00
Amin Ghadersohi
7be2acb2f3
fix(mcp): add description and certification fields to default list tool columns ( #39017 )
2026-04-06 13:37:52 -04:00
Amin Ghadersohi
7380a59ab8
fix(mcp): fix form_data null, dataset URL, ASCII preview, and chart rename ( #39109 )
2026-04-06 12:34:26 -04:00
Amin Ghadersohi
2c9cf0bd55
fix(mcp): enforce MAX_PAGE_SIZE limit on list tools to prevent oversized responses ( #38959 )
2026-03-30 16:48:03 -04:00
Amin Ghadersohi
6dc3d7ad9f
fix(mcp): add try/except around DAO re-fetch to handle session errors in multi-tenant ( #38859 )
2026-03-26 12:43:21 -04:00
Amin Ghadersohi
23a5e95884
fix(mcp): add permission checks to generate_dashboard and update_chart tools ( #38845 )
2026-03-25 16:37:48 -04:00
Kamil Gabryjelski
1d72480c17
fix(mcp): fix detached Slice instance error in chart/dashboard serialization ( #38767 )
...
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com >
2026-03-20 18:23:51 +01:00
Amin Ghadersohi
fc156d0014
fix(mcp): replace uuid with url and changed_on_humanized in default list columns ( #38566 )
...
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com >
2026-03-13 09:53:30 +01:00
Amin Ghadersohi
2a876e8b86
fix(mcp): add missing command.validate() to MCP chart data tools ( #38521 )
...
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com >
2026-03-10 09:50:41 +01:00
Amin Ghadersohi
3609cd9544
feat(mcp): add compile check to validate chart queries before returning ( #38408 )
2026-03-06 08:10:58 +01:00
Amin Ghadersohi
2a3567d2f1
fix(mcp): Remove unsupported thumbnail/preview URLs and internal fields from MCP schemas ( #38109 )
2026-02-23 12:44:12 +01:00
Amin Ghadersohi
5cd829f13c
fix(mcp): handle more chart types in get_chart_data fallback query construction ( #37969 )
...
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com >
2026-02-17 13:02:42 +01:00
Amin Ghadersohi
47db185e3b
fix(mcp): include x_axis column in query context for series charts with group_by ( #37639 )
2026-02-05 19:59:44 +01:00
Amin Ghadersohi
d0783da3e5
fix(mcp): Handle big_number charts and make semantic warnings non-blocking ( #37142 )
...
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com >
2026-01-16 18:19:06 +01:00
Amin Ghadersohi
047360641a
feat(mcp): change save_chart default to False for preview-first workflow ( #36935 )
...
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com >
2026-01-08 11:30:01 -08:00
Amin Ghadersohi
84279acd2f
feat(mcp): add unified get_schema tool for schema discovery ( #36458 )
...
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com >
2026-01-07 15:26:17 -08:00
Amin Ghadersohi
64ee48f147
fix(mcp): use chart.query_context for get_chart_data like the API does ( #36937 )
...
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com >
2026-01-07 16:32:45 -03:00
Amin Ghadersohi
fee4e7d8e2
feat(mcp): MCP service implementation (PRs 3-9 consolidated) ( #35877 )
2025-10-31 08:33:21 -07:00
Amin Ghadersohi
e1455057e7
feat(mcp): PR2 - Add chart listing and info tools with core infrastructure ( #35835 )
2025-10-28 10:39:40 -07:00