Skip to main content
Glama

Get component styles

get_component_styles
Read-onlyIdempotent

Read grouped layout and paint styles for one component ID, with counts and sample element IDs. Paginated and optionally limited to a y range. Set expanded=true for individual elements and rectangles; excludes text, animation, and media source bytes.

Input Schema

NameRequiredDescriptionDefault
pageYesCaptured page key returned by list_pages or get_application_manifest, not a URL or filesystem path.
viewYesExact stored profile key from list_pages.views (desktop, mobile, numbered profiles or a device label); do not pass the operating system here.
yEndNoNon-negative vertical end coordinate in captured CSS pixels; default 0 selects one viewport from yStart. A vertical fragment may span at most two viewport heights.
limitNoMaximum items returned, clamped to 1..50. Default 10.
offsetNoZero-based result offset for pagination. Negative values are treated as zero; default is 0.
yStartNoNon-negative vertical start coordinate in captured CSS pixels; default 0. When both bounds are 0, component layers use the component bounds and page layers use the first viewport.
productYesProduct key, for example finance-ozon-ru
versionYesExact capture version returned by list_versions. Pin the same version across related calls; do not use latest as an alias.
expandedNoReturn individual element style records instead of deduplicated style groups. Default false.
componentIdYesCaptured root element ID from get_page_components or get_page_outline. Must belong to the selected page, view and pinned version.
environmentNoEnvironment ID from the selected backend platform type in list_platforms.options.platforms[].environments[].id (backend implementation). Omit only when the version has one captured environment. Use captured pairs from list_platforms/list_versions for actual availability.

Output Schema

NameRequiredDescriptionDefault
resultYesPaginated individual styles or deduplicated style groups

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed10 schema fields changed
    • addedInput schema / properties / componentId / description
      Added value: +"Captured root element ID from get_page_components or get_page_outline. Must belong to the selected page, view and pinned version."
    • addedInput schema / properties / expanded / description
      Added value: +"Return individual element style records instead of deduplicated style groups. Default false."
    • addedInput schema / properties / limit / description
      Added value: +"Maximum items returned, clamped to 1..50. Default 10."
    • addedInput schema / properties / offset / description
      Added value: +"Zero-based result offset for pagination. Negative values are treated as zero; default is 0."
    • addedInput schema / properties / page / description
      Added value: +"Captured page key returned by list_pages or get_application_manifest, not a URL or filesystem path."
    • addedInput schema / properties / product / description
      Added value: +"Product key, for example finance-ozon-ru"
    • addedInput schema / properties / version / description
      Added value: +"Exact capture version returned by list_versions. Pin the same version across related calls; do not use latest as an alias."
    • addedInput schema / properties / yEnd / description
      Added value: +"Non-negative vertical end coordinate in captured CSS pixels; default 0 selects one viewport from yStart. A vertical fragment may span at most two viewport heights."
    • addedInput schema / properties / yStart / description
      Added value: +"Non-negative vertical start coordinate in captured CSS pixels; default 0. When both bounds are 0, component layers use the component bounds and page layers use the first viewport."
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "$defs": {
      +    "rect": {
      +      "additionalProperties": true,
      +      "description": "Captured CSS-pixel rectangle",
      +      "properties": {
      +        "height": {
      +          "description": "height",
      +          "type": "number"
      +        },
      +        "width": {
      +          "description": "width",
      +          "type": "number"
      +        },
      +        "x": {
      +          "description": "x",
      +          "type": "number"
      +        },
      +        "y": {
      +          "description": "y",
      +          "type": "number"
      +        }
      +      },
      +      "type": "object"
      +    }
      +  },
      +  "$schema": "https://json-schema.org/draft/2020-12/schema",
      +  "additionalProperties": false,
      +  "description": "Structured result. Existing text or image content remains available in content.",
      +  "properties": {
      +    "result": {
      +      "additionalProperties": true,
      +      "description": "Paginated individual styles or deduplicated style groups",
      +      "properties": {
      +        "componentId": {
      +          "anyOf": [
      +            {
      +              "description": "Count or zero-based index",
      +              "type": "integer"
      +            },
      +            {
      +              "type": "null"
      +            }
      +          ]
      +        },
      +        "hasMore": {
      +          "description": "Whether this condition holds",
      +          "type": "boolean"
      +        },
      +        "items": {
      +          "description": "Result entries",
      +          "items": {
      +            "additionalProperties": true,
      +            "description": "Expanded element style or grouped style",
      +            "properties": {
      +              "backgroundColor": {
      +                "anyOf": [
      +                  {
      +                    "description": "backgroundColor",
      +                    "type": "string"
      +                  },
      +                  {
      +                    "type": "null"
      +                  }
      +                ]
      +              },
      +              "backgroundImage": {
      +                "anyOf": [
      +                  {
      +                    "description": "backgroundImage",
      +                    "type": "string"
      +                  },
      +                  {
      +                    "type": "null"
      +                  }
      +                ]
      +              },
      +              "border": {
      +                "anyOf": [
      +                  {
      +                    "description": "border",
      +                    "type": "string"
      +                  },
      +                  {
      +                    "type": "null"
      +                  }
      +                ]
      +              },
      +              "borderRadius": {
      +                "anyOf": [
      +                  {
      +                    "description": "borderRadius",
      +                    "type": "string"
      +                  },
      +                  {
      +                    "type": "null"
      +                  }
      +                ]
      +              },
      +              "boxShadow": {
      +                "anyOf": [
      +                  {
      +                    "description": "boxShadow",
      +                    "type": "string"
      +                  },
      +                  {
      +                    "type": "null"
      +                  }
      +                ]
      +              },
      +              "clipPath": {
      +                "anyOf": [
      +                  {
      +                    "description": "clipPath",
      +                    "type": "string"
      +                  },
      +                  {
      +                    "type": "null"
      +                  }
      +                ]
      +              },
      +              "color": {
      +                "anyOf": [
      +                  {
      +                    "description": "color",
      +                    "type": "string"
      +                  },
      +                  {
      +                    "type": "null"
      +                  }
      +                ]
      +              },
      +              "count": {
      +                "description": "Count or zero-based index",
      +                "type": "integer"
      +              },
      +              "elementIds": {
      +                "description": "Result entries",
      +                "items": {
      +                  "anyOf": [
      +                    {
      +                      "description": "Count or zero-based index",
      +                      "type": "integer"
      +                    },
      +                    {
      +                      "type": "null"
      +                    }
      +                  ]
      +                },
      +                "type": "array"
      +              },
      +              "id": {
      +                "anyOf": [
      +                  {
      +                    "description": "Count or zero-based index",
      +                    "type": "integer"
      +                  },
      +                  {
      +                    "type": "null"
      +                  }
      +                ]
      +              },
      +              "layout": {
      +                "anyOf": [
      +                  {
      +                    "additionalProperties": true,
      +                    "description": "Measured layout",
      +                    "properties": {},
      +                    "type": "object"
      +                  },
      +                  {
      +                    "type": "null"
      +                  }
      +                ]
      +              },
      +              "maskImage": {
      +                "anyOf": [
      +                  {
      +                    "description": "maskImage",
      +                    "type": "string"
      +                  },
      +                  {
      +                    "type": "null"
      +                  }
      +                ]
      +              },
      +              "opacity": {
      +                "anyOf": [
      +                  {
      +                    "description": "opacity",
      +                    "type": "string"
      +                  },
      +                  {
      +                    "type": "null"
      +                  }
      +                ]
      +              },
      +              "parent": {
      +                "anyOf": [
      +                  {
      +                    "description": "Count or zero-based index",
      +                    "type": "integer"
      +                  },
      +                  {
      +                    "type": "null"
      +                  }
      +                ]
      +              },
      +              "rect": {
      +                "anyOf": [
      +                  {
      +                    "$ref": "#/$defs/rect"
      +                  },
      +                  {
      +                    "type": "null"
      +                  }
      +                ]
      +              },
      +              "tag": {
      +                "anyOf": [
      +                  {
      +                    "description": "Text value",
      +                    "type": "string"
      +                  },
      +                  {
      +                    "type": "null"
      +                  }
      +                ]
      +              },
      +              "zIndex": {
      +                "anyOf": [
      +                  {
      +                    "description": "zIndex",
      +                    "type": "string"
      +                  },
      +                  {
      +                    "type": "null"
      +                  }
      +                ]
      +              }
      +            },
      +            "required": [
      +              "id",
      +              "tag",
      +              "layout",
      +              "color",
      +              "backgroundColor",
      +              "backgroundImage",
      +              "border",
      +              "borderRadius",
      +              "boxShadow",
      +              "opacity",
      +              "zIndex",
      +              "clipPath",
      +              "maskImage"
      +            ],
      +            "type": "object"
      +          },
      +          "type": "array"
      +        },
      +        "layer": {
      +          "description": "Text value",
      +          "type": "string"
      +        },
      +        "offset": {
      +          "description": "Count or zero-based index",
      +          "type": "integer"
      +        },
      +        "total": {
      +          "description": "Count or zero-based index",
      +          "type": "integer"
      +        },
      +        "truncated": {
      +          "description": "Whether this condition holds",
      +          "type": "boolean"
      +        },
      +        "yEnd": {
      +          "description": "Measured value",
      +          "type": "number"
      +        },
      +        "yStart": {
      +          "description": "Measured value",
      +          "type": "number"
      +        }
      +      },
      +      "required": [
      +        "layer",
      +        "componentId",
      +        "yStart",
      +        "yEnd",
      +        "truncated",
      +        "total",
      +        "offset",
      +        "hasMore",
      +        "items"
      +      ],
      +      "type": "object"
      +    }
      +  },
      +  "required": [
      +    "result"
      +  ],
      +  "type": "object"
      +}
  2. First observed

TDQS

A4/5.0
Behavior4/5

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

Annotations already declare this a read-only, idempotent, non-destructive operation, so safety is covered. The description adds genuine behavioral context beyond that: pagination, optional y-range restriction, the fact that expanded changes the return shape to individual elements/rectangles, and what data is deliberately omitted. It stops short of mentioning auth, defaults, or rate limits.

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?

Three short sentences, front-loaded with purpose, then scope modifiers, then the highest-value flag. No filler or repetition, and the exclusion clause is placed where it does the most differentiating work.

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?

With 100% schema coverage and an output schema present, the description does not need to enumerate returns or parameters. It covers scope, exclusions, pagination, and the granularity toggle, which is sufficient for an 11-parameter read tool; only prerequisite guidance (which upstream calls supply componentId/page/view/version) is left entirely to the schema.

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 schema already documents all 11 parameters including expanded, yStart/yEnd, limit, and offset. The description largely restates these; its only marginal additions are clarifying that expanded yields 'individual elements and rectangles' and naming the excluded content categories. Baseline 3 applies when the schema carries the detail.

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?

States a specific verb and resource ('Read grouped layout and paint styles for one component ID') and then draws the boundary explicitly by excluding text, animation, and media source bytes, which is exactly what siblings like get_component_text and get_component_animations cover. An agent can route correctly 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 Guidelines3/5

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

The description implies usage via the expanded flag ('Set expanded=true for individual elements and rectangles'), giving a granularity choice, but it never states when to call this versus the sibling style/text/animation tools or what prerequisite calls must precede it. Usage is inferable from scope, not stated.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources