Skip to main content
Glama

computed_style

Retrieves an element's resolved CSS values—including shorthands and custom properties like --brand—and its viewport bounding box for style inspection.

Instructions

An element's computed CSS, including shorthands and custom properties like --brand, and its box in the viewport.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "computed_style"
  }
}

Input Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.2.1

TDQS

C2.9/5.0
Behavior2/5

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

No annotations are supplied, so the description carries the whole burden. It discloses the return content (shorthands, custom properties, viewport box), which is genuinely useful, but says nothing about which element is targeted, whether a page must be open, whether it is a pure read, or how failures surface. For a zero-annotation tool that is a significant gap.

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 sentence with no filler, and the informative part (shorthands, custom properties, viewport box) is front-loaded. It is efficient but also under-specified for the information an agent actually needs, so it stops short of 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?

With no output schema, the description must explain returns and it does so adequately. However, for a tool with zero parameters the critical missing piece is how the subject element is determined, which the description never addresses. Complete on outputs, incomplete on the mechanics of invocation.

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 tool takes no parameters and schema coverage is 100%, so there is nothing for the description to disambiguate at the parameter level. Baseline 4 applies. The unresolved question is not a parameter's meaning but how the target element is chosen, which is arguably a contextual rather than parameter concern.

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

Purpose3/5

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

The description identifies the resource precisely — computed CSS with shorthands, custom properties like `--brand`, plus viewport box — which is more specific than the name alone. But it is a noun phrase with no verb, and it never states which element the style is computed for, even though the tool takes zero parameters. An agent knows what it gets but not what it acts on.

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

Usage Guidelines2/5

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

There is no when-to-use guidance and no reference to alternatives. Siblings such as dom_html, evaluate_script, or page_report plausibly overlap (reading page state), yet nothing routes the agent between them. Usage must be fully inferred from the name.

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