Skip to main content
Glama

inject_css

Inject CSS into a live page to trial fixes or hide overlays without touching source files. Revert changes instantly.

Instructions

Apply CSS to the LIVE page without touching source files — either declarations trialed on one element (applied !important so the trial always wins; reports which computed properties changed) or a raw page-wide rule block. THE fix-loop tool: explain_styles names the winning rule → inject_css the candidate fix → verify with measure_element/style_diff/annotated_screenshot → write the final declarations into the source once → revert:'all'. This replaces the slow edit-file → cache-bust → reload → re-snapshot cycle. Also the quick way to hide a cookie/consent overlay that occludes what you need (inject 'display:none'). Patches are trial-only: gone on navigation or revert.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
cssNoRaw CSS rule block(s) to inject page-wide, e.g. ".onetrust-banner { display: none }"
uidNoElement uid to patch (from page_snapshot / find_elements)
revertNoRemove a previous patch by id (e.g. 'p2'), or 'all' to remove every patch
selectorNoCSS selector (first match) — alternative to uid
declarationsNoDeclarations to trial on the target, e.g. "align-items: center; margin-top: 4px". Applied with !important so the trial always wins; requires uid or selector.
Behavior4/5

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

With no annotations, the description discloses that trials use !important, reports changed properties, and patches are temporary. It omits potential side effects like performance impact or security constraints, but covers key behavioral traits for a testing tool.

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 moderately long but well-organized with clear sections and front-loaded main action. Some redundancy could be trimmed, but it remains efficient and readable.

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

Completeness4/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 hints at return (reports changed properties for trial mode) but lacks full details on success/error messages. However, it sufficiently covers the tool's purpose, parameters, and usage context.

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

Parameters5/5

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

Schema has 100% parameter coverage; description adds contextual meaning: explains the dual functionality via parameters (css vs declarations+uid/selector), !important application, and revert behavior, going beyond schema descriptions.

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 it applies CSS to the live page for testing, with two modes (trial on one element with !important, or raw page-wide rules). It distinguishes from siblings like explain_styles and style_diff by positioning it as the fix-loop 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?

Explicitly outlines the workflow: explain_styles → inject_css → verify with measure_element/style_diff/annotated_screenshot → write source → revert. Also mentions use case for hiding overlays and warns patches are trial-only.

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/mi60dev/visionaire-engine'

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