Skip to main content
Glama

get_element_styles

Retrieve all CSS styles of an element, including computed styles, using a CSS selector.

Instructions

获取指定元素的所有CSS样式(包括计算后的样式)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
selectorYesCSS选择器,用于定位元素
includeComputedNo是否包含计算后的样式(默认:true)
Behavior2/5

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

No annotations are provided, so the description must disclose behavior. It only states the action (get styles) without mentioning read-only nature, potential selector failure, or no side effects.

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?

Single sentence is concise and directly states the tool's purpose without superfluous words.

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?

Tool is simple with 2 parameters and no output schema. Description lacks details on return format (e.g., object of style properties). However, it is adequate for basic understanding.

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 covers both parameters (selector and includeComputed) with descriptions. The tool description adds no additional meaning beyond the schema, so baseline 3 applies.

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?

Description clearly states the action ('获取所有CSS样式') and resource ('指定元素'), differentiating from siblings like get_all_stylesheets and extract_css_classes.

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?

Description implies usage for retrieving element styles but does not explicitly state when to use or exclude alternatives like get_all_stylesheets or get_element_by_selector.

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

Install Server

Other Tools

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/hupeng9995/browser-mcp'

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