feat(mcp): add list and get tools for CSS templates and themes#16
Open
hbrooks wants to merge 7 commits into
Open
feat(mcp): add list and get tools for CSS templates and themes#16hbrooks wants to merge 7 commits into
hbrooks wants to merge 7 commits into
Conversation
Co-Authored-By: kasiazjc <kasiazjc@users.noreply.github.com>
… CSS templates and themes - Remove dead _humanize_timestamp helper from css_template/schemas.py and theme/schemas.py (never called; database/schemas.py has the canonical copy) - Add uuid field to CssTemplateInfo and serialize_css_template_object (CssTemplate inherits UUIDMixin) - Add uuid to CSS_TEMPLATE_DEFAULT_COLUMNS alongside theme's existing uuid - Register css_template and theme in get_schema tool so LLMs can discover column/filter/sort metadata for both new domains Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
… and theme Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
… for new model types - Add is_system, is_system_default, is_system_dark to ThemeInfo and serialize_theme_object so schema discovery columns are fully serializable - Add get_schema tests covering css_template and theme model types: default column assertions, search/sort columns, and request validation Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
pip install --upgrade uv downloads uv as a source distribution when no pre-built wheel matches the platform (python:3.11-slim-trixie), then fails to compile because cc is absent in the slim image. Using COPY --from=ghcr.io/astral-sh/uv:latest ships a statically-linked binary that works on any Linux regardless of glibc version, which is the approach uv's own documentation recommends for Dockerfiles.
… in tests FastMCP stores error payloads as JSON in content[0].text, not result.data. Fixes test_get_theme_info_not_found and test_get_css_template_info_not_found to match the pattern used consistently across all other MCP tool tests.
- Add UUID test for get_css_template_info with DAO call assertion - Assert DAO called with id_column="uuid" in get_theme_info UUID test - Add filter_columns_override to ModelGetSchemaCore to restrict advertised filters to the exact set the list tool accepts (fixes schema/API contract mismatch) - Define CSS_TEMPLATE_FILTER_COLUMNS and THEME_FILTER_COLUMNS constants - Use overrides in get_schema so css_template and theme only advertise template_name/theme_name as filterable (matching ListCssTemplatesRequest and ListThemesRequest validation) - Update get_schema tests to verify filter restriction without DAO mocks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Mirror of apache/superset#40343 by @aminghadersohi