Skip to main content
Glama

pbi_emulate_theme

Emulate the prefers-color-scheme media query in WebView to simulate light, dark, or no preference. Power BI report canvases do not restyle based on this CSS signal.

Instructions

Force the WebView media query prefers-color-scheme to light/dark/no-preference (via page.emulateMedia). Returns {emulated, scheme}. NOTE (verified 2026-07-15): the signal flips correctly (matchMedia reflects it) but Power BI Desktop reports do NOT restyle on prefers-color-scheme — report theming is driven by theme.json + app settings, not this CSS signal — so this is effectively INERT for PBI report canvases (it would matter only for a generic web app). Kept for completeness; do not expect a visual change. RESET to "no-preference" when done.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
schemeYes
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description fully discloses behavior: it returns {emulated, scheme}, notes that it is effectively inert for PBI report canvases, and why. Also mentions the verification date and limitations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is front-loaded with the action and return, then provides essential context. The middle sentence is somewhat long but packs necessary nuance. No unnecessary words.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given no output schema, the description explains the return object. It covers behavior, limitations, and reset advice. All relevant context for an AI agent to use correctly is present.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The description adds meaning beyond the schema by listing the three enum values (light, dark, no-preference) and explaining their role. Although schema coverage is 0%, the description compensates well.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: forcing the WebView media query prefers-color-scheme to light/dark/no-preference. It distinguishes itself from siblings by being a media query emulation tool, not a UI interaction or data retrieval tool.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Provides explicit context on when to use the tool (testing prefers-color-scheme), and importantly, when not to expect visual changes in PBI report canvases. Advises resetting to 'no-preference' when done, giving clear usage boundaries.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/bibiibjorn/pbi-webview2'

If you have feedback or need assistance with the MCP directory API, please join our Discord server