Skip to main content
Glama

Inspect website component

inspect_component
Read-onlyIdempotent

Use this when you need an exact style and state X-ray of a known element, role, or text target. Avoid it when you need portable HTML, scoped CSS, assets, and a screenshot; use clone_section.

Instructions

Use this when you need an exact style and state X-ray of a known element, role, or text target. Avoid it when you need portable HTML, scoped CSS, assets, and a screenshot; use clone_section. Return targeted computed styles, cascade rules, variables, box geometry, fonts, and interaction states. Cost: light. Session: uses one browser page for one URL. Does not write files. Possible follow-ups if evidence is still missing: clone_section, capture_motion, compare_replica.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlYesAbsolute http:// or https:// URL to inspect.
roleNoAccessible role, for example button or navigation.
textNoVisible text used with getByText targeting.
roleNameNoAccessible name used with role targeting.
selectorNoPlaywright CSS selector; pierces open shadow DOM.
timeoutMsNoNavigation timeout in milliseconds.
userAgentNoOptional browser user-agent override.
waitUntilNoPage lifecycle event to await before extraction.domcontentloaded
autoScrollNoScroll before targeting. Defaults off for fast component inspection; a zero-match retry still checks lazy content.
maxMatchesNoMaximum matching elements to return in detail.
maxScrollsNoMaximum scroll steps when scrolling is needed.
frameSelectorNoOptional iframe selector containing the target.
includeStatesNoCapture :hover, :focus, and :active computed styles via CDP (Chromium).
viewportWidthNoBrowser viewport width in CSS pixels.
viewportHeightNoBrowser viewport height in CSS pixels.
includeBoxModelNoInclude content, padding, border, and margin rectangles.
allowPrivateNetworkNoAllow localhost and private-network URLs. Enable only for trusted sites.
includeMatchedRulesNoInclude matched CSS rules, origins, and resolved custom properties.
includePlatformFontsNoInclude the platform fonts Chromium actually used.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
guidanceYes

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. Changed6 schema fields changedv0.10.1
    • addedOutput schema / properties / guidance
      Added value: +{
      +  "additionalProperties": false,
      +  "properties": {
      +    "cost": {
      +      "enum": [
      +        "light",
      +        "standard",
      +        "heavy"
      +      ],
      +      "type": "string"
      +    },
      +    "nextTools": {
      +      "description": "Candidate follow-ups; do not call them automatically or in parallel.",
      +      "items": {
      +        "enum": [
      +          "analyze_site",
      +          "analyze_html",
      +          "inspect_component",
      +          "capture_screenshot",
      +          "extract_assets",
      +          "extract_animations",
      +          "extract_layout",
      +          "clone_section",
      +          "capture_interactions",
      +          "extract_responsive",
      +          "compare_replica",
      +          "create_replication_kit",
      +          "capture_motion",
      +          "crawl_site"
      +        ],
      +        "type": "string"
      +      },
      +      "type": "array"
      +    },
      +    "sessionPolicy": {
      +      "enum": [
      +        "offline-document",
      +        "single-url",
      +        "multi-viewport",
      +        "dual-page",
      +        "site-crawl"
      +      ],
      +      "type": "string"
      +    },
      +    "summary": {
      +      "minLength": 1,
      +      "type": "string"
      +    },
      +    "tool": {
      +      "const": "inspect_component",
      +      "type": "string"
      +    },
      +    "warnings": {
      +      "description": "Non-fatal limitations or incomplete evidence from this run.",
      +      "items": {
      +        "type": "string"
      +      },
      +      "type": "array"
      +    },
      +    "writesFiles": {
      +      "type": "boolean"
      +    }
      +  },
      +  "required": [
      +    "tool",
      +    "summary",
      +    "nextTools",
      +    "warnings",
      +    "cost",
      +    "writesFiles",
      +    "sessionPolicy"
      +  ],
      +  "type": "object"
      +}
    • addedOutput schema / properties / result / additionalProperties
      Added value: +{}
    • addedOutput schema / properties / result / properties
      Added value: +{
      +  "elements": {
      +    "items": {
      +      "additionalProperties": {},
      +      "properties": {},
      +      "type": "object"
      +    },
      +    "type": "array"
      +  },
      +  "matches": {
      +    "maximum": 9007199254740991,
      +    "minimum": 0,
      +    "type": "integer"
      +  },
      +  "metadata": {
      +    "additionalProperties": {},
      +    "properties": {
      +      "analyzedAt": {
      +        "type": "string"
      +      },
      +      "finalUrl": {
      +        "type": "string"
      +      },
      +      "requestedUrl": {
      +        "type": "string"
      +      },
      +      "title": {
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "requestedUrl",
      +      "finalUrl",
      +      "title",
      +      "analyzedAt"
      +    ],
      +    "type": "object"
      +  },
      +  "selector": {
      +    "type": "string"
      +  },
      +  "warnings": {
      +    "description": "Non-fatal limitations or incomplete evidence from this run.",
      +    "items": {
      +      "type": "string"
      +    },
      +    "type": "array"
      +  }
      +}
    • addedOutput schema / properties / result / required
      Added value: +[
      +  "metadata",
      +  "selector",
      +  "matches",
      +  "elements",
      +  "warnings"
      +]
    • addedOutput schema / properties / result / type
      Added value: +"object"
    • changedOutput schema / required
      Previous value: -[
      -  "result"
      -]New value: +[
      +  "result",
      +  "guidance"
      +]
  2. Changed12 schema fields changedv0.10.0
    • changedInput schema / properties / autoScroll / default
      Previous value: -trueNew value: +false
    • changedInput schema / properties / autoScroll / description
      Previous value: -"Scroll through the page before extraction to trigger lazy-rendered content."New value: +"Scroll before targeting. Defaults off for fast component inspection; a zero-match retry still checks lazy content."
    • addedInput schema / properties / frameSelector
      Added value: +{
      +  "description": "Optional iframe selector containing the target.",
      +  "maxLength": 1000,
      +  "minLength": 1,
      +  "type": "string"
      +}
    • addedInput schema / properties / includeBoxModel
      Added value: +{
      +  "default": true,
      +  "description": "Include content, padding, border, and margin rectangles.",
      +  "type": "boolean"
      +}
    • addedInput schema / properties / includeMatchedRules
      Added value: +{
      +  "default": true,
      +  "description": "Include matched CSS rules, origins, and resolved custom properties.",
      +  "type": "boolean"
      +}
    • addedInput schema / properties / includePlatformFonts
      Added value: +{
      +  "default": true,
      +  "description": "Include the platform fonts Chromium actually used.",
      +  "type": "boolean"
      +}
    • changedInput schema / properties / maxScrolls / description
      Previous value: -"Maximum viewport-sized scroll steps when autoScroll is enabled."New value: +"Maximum scroll steps when scrolling is needed."
    • addedInput schema / properties / role
      Added value: +{
      +  "description": "Accessible role, for example button or navigation.",
      +  "maxLength": 100,
      +  "minLength": 1,
      +  "type": "string"
      +}
    • addedInput schema / properties / roleName
      Added value: +{
      +  "description": "Accessible name used with role targeting.",
      +  "maxLength": 500,
      +  "minLength": 1,
      +  "type": "string"
      +}
    • changedInput schema / properties / selector / description
      Previous value: -"CSS selector for the component, for example '.pricing-card' or 'header nav'."New value: +"Playwright CSS selector; pierces open shadow DOM."
    • addedInput schema / properties / text
      Added value: +{
      +  "description": "Visible text used with getByText targeting.",
      +  "maxLength": 500,
      +  "minLength": 1,
      +  "type": "string"
      +}
    • changedInput schema / required
      Previous value: -[
      -  "url",
      -  "selector"
      -]New value: +[
      +  "url"
      +]
  3. First observedv0.8.0

TDQS

A4.5/5.0
Behavior4/5

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

Annotations already establish readOnly, openWorld, idempotent, and non-destructive behavior. The description adds meaningful context beyond those: 'Cost: light,' 'Session: uses one browser page for one URL,' 'Does not write files,' and follow-up routing. This is more than the bare safety profile, though it could be more specific about rate limits or output-count behavior; no contradiction exists.

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?

Four sentences with no filler. The purpose is front-loaded, the alternative is given immediately, return values are listed compactly, and cost/session/file-write/follow-up notes each earn their place. Efficient and well-structured.

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 19 parameters, 13 siblings, rich annotations, and an output schema, the description is complete enough: it defines scope, names the main alternative, states what is returned, clarifies session/cost/side effects, and suggests follow-ups. The output schema handles return details, so nothing critical is missing for selecting and invoking the tool correctly.

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 description coverage is 100%, so the baseline is 3. The main description does not add parameter-level detail beyond what each schema property already states, though it does reinforce the targeting concept ('element, role, or text target') that maps to role/text/roleName/selector. This is adequate but not exceptional.

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 leads with a specific verb and resource: 'exact style and state X-ray of a known element, role, or text target.' It also enumerates concrete return values (computed styles, cascade rules, variables, box geometry, fonts, interaction states) and explicitly differentiates from clone_section, so an agent can distinguish it from siblings without opening the schema.

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?

The description gives an explicit when-to-use ('Use this when you need an exact style and state X-ray') and a when-not-to-use with a named alternative ('Avoid it when you need portable HTML, scoped CSS, assets, and a screenshot; use clone_section'). It also lists possible follow-up tools if evidence is missing, which further guides selection.

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

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/blackridder22/PicassoWeb'

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