Skip to content

feat(mcp): add a scope to create_theme and a theme islands guide - #681

Open
simeonoff wants to merge 2 commits into
simeonoff/root-selectorfrom
simeonoff/mcp-theme-islands
Open

simeonoff wants to merge 2 commits into
simeonoff/root-selectorfrom
simeonoff/mcp-theme-islands

Conversation

@simeonoff

Copy link
Copy Markdown
Member

Stacked on #680.

  • create_theme takes an optional scope, the selector of a theme island. typography() and theme() go inside it, and the Angular output leaves out core(). The response includes the theme provider markup for Web Components, React and Blazor.
  • New theming://guidance/theme-islands resource: islands per platform, overlays, drag ghosts, prebuilt theme files in @scope and shadow roots.
  • The component theme guidance no longer says that Angular overlays render under body, which is only true before 21.2.

@desig9stein desig9stein left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

MCP server ignores scope

create_theme is registered without the scope field (packages/mcp/src/server.ts:196). The server drops it before it reaches the handler. An agent that asks for an island theme gets a normal global theme back, with no warning, on every platform and output. I checked this by calling the tool over the MCP protocol.

The tests don't catch it because they call handleCreateTheme directly. Please add scope to the registration, plus one test that calls the tool through the server. CLI-generated projects start the MCP server with npx -y igniteui-theming and no version, so they will pick this up as soon as it is released.

The rest of my review of the stack is on #680.

create_theme takes an optional scope, the selector of a theme island. typography() and theme() then go inside it, after the palette, and the Angular output leaves out core(), which the app includes once. The response includes the theme provider markup for Web Components, React and Blazor.

The new theming://guidance/theme-islands resource covers islands per platform, overlays, drag ghosts, prebuilt theme files in @scope and shadow roots. The component theme guidance no longer says that Angular overlays render under body, which is only true before 21.2.
The create_theme registration listed its parameters by hand and left out scope, so the server dropped it and returned a global theme. The contract tests now check that every tool registers each parameter of its schema, and that a theme island's output uses its scope.
@simeonoff
simeonoff force-pushed the simeonoff/mcp-theme-islands branch from f172467 to bf6fd91 Compare November 25, 2026 11:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants