Skip to main content
Glama

inspect_styles

Inspect computed CSS styles and box model properties for a selector to debug layout issues, check flex/grid behavior, and verify spacing, sizing, overflow, and z-index.

Instructions

Inspect computed CSS styles and box model (display, position, width/height, margin, padding, flex/grid, overflow, z-index, font-size) for a selector.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "selector": "<selector>"
    },
    "name": "inspect_styles"
  }
}

Input Schema

NameRequiredDescriptionDefault
selectorYesCSS selector of the element
propertiesNoSpecific CSS properties to inspect (e.g. ["display", "flex-direction", "width", "overflow"]). If omitted, returns key layout & box model properties.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A3.5/5.0
Behavior3/5

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

No annotations are supplied, so the description carries the full burden; it does disclose substantive behavior by listing the concrete property families returned and the default set returned when 'properties' is omitted. It says nothing about read-only safety, what happens when the selector matches multiple elements or none, or whether a page must already be open.

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?

A single front-loaded sentence with no filler; the parenthetical enumeration is long but carries real information about default output. Slight redundancy with the schema's own examples keeps it from a 5.

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

Completeness3/5

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

For a two-parameter read tool with no annotations and no output schema, the description covers what is inspected but leaves the caller guessing on edge cases: multiple matches, no match, error behavior, and whether a page must be loaded. Adequate but with clear gaps.

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?

Schema coverage is 100%, so the baseline is 3, but the description adds meaning to the default behavior of the optional 'properties' parameter by enumerating the exact properties that constitute the default set (display, position, margin, padding, flex/grid, overflow, z-index, font-size). It adds nothing further about selector syntax, but the schema already handles that.

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

Purpose4/5

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

Uses a specific verb plus resource: 'Inspect computed CSS styles and box model ... for a selector', and enumerates the property classes covered. It distinguishes itself in scope from page- or layout-level siblings by tying inspection to a single selector, though it never names an alternative tool.

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

Usage Guidelines3/5

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

The intended use (getting computed styles for one element) is only implied by the description; there is no explicit when-to-use vs. when-not guidance and no mention of when to prefer inspect_element or audit_layout. The scope statement is enough for an agent to infer the basic case, but not to route between similar inspection tools.

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