Skip to main content
Glama

Measurements for one element

inspect_element
Read-only

Measure a single element's box model, computed typography, colors, and spacing to answer design questions with exact values instead of images.

Instructions

Returns the box model, computed typography, colours and spacing for a single element. Use it when a design question needs numbers rather than a picture.

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": "inspect_element"
  }
}

Input Schema

NameRequiredDescriptionDefault
elementNoA number from the most recent annotate_interactive on this tab. Easier and safer than retyping a selector.
selectorNoA CSS selector for the element to measure.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.3

TDQS

A3.7/5.0
Behavior3/5

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

The annotations already declare readOnlyHint and openWorldHint, so the description doesn't need to restate safety. It adds the useful note that output is quantitative measurement data, but says nothing about whether measurement requires the element to be visible, whether the page is scrolled, or what happens on a missing or hidden target.

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

Conciseness5/5

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

Two short sentences, front-loaded with the return content and followed by the selection cue. Every clause contributes and there is no filler.

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 carries the burden of conveying return content, and it does so only at a categorical level, not the shape of the measurement payload. For a read-only measurement tool with fully documented parameters this is adequate but leaves the return structure vague.

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

Parameters3/5

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

Schema coverage is 100%, and both parameters carry their own descriptions, including the pointer to the most recent annotate_interactive. The description adds no further meaning about the element-versus-selector choice or what happens if both are supplied, so it sits at the baseline.

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?

The description names a specific verb and resource and enumerates exactly what is returned: box model, computed typography, colours and spacing for one element. The closing clause implicitly separates it from visual-capture siblings, but it doesn't name those siblings, so the differentiation is left for the agent to infer.

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

Usage Guidelines4/5

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

"Use it when a design question needs numbers rather than a picture" gives a clear selection condition that steers away from screenshot-style tools. It stops short of naming an explicit alternative or stating exclusions such as when to prefer raw selector collection.

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