Skip to main content
Glama

Get global styles

get_global_styles
Read-only

Retrieve a block theme's global styles—palette, typography, spacing, and per-block styling—directly from theme.json and Site Editor overrides.

Instructions

Read a block theme's global styles — the palette, typography, spacing and per-block styling that theme.json defines and the Site Editor overrides. This is where a block theme's design tokens live.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
site_idNoWhich configured WordPress site to act on. Optional — with a single site configured it is used automatically; with several, the default site is used unless you name one. Run list_sites for valid ids.
Behavior3/5

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

Annotations already declare readOnlyHint: true and destructiveHint: false, so the description's 'Read' aligns with that. It adds conceptual value by explaining what global styles are, which goes beyond the annotations, but it does not disclose behavioral details like potential errors for non-block themes or the exact structure of the returned data. It does not contradict annotations.

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 sentences with zero wasted words. The core purpose is front-loaded ('Read a block theme's global styles'), and the elaboration in the second sentence is informative yet compact. Ideal length.

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?

For a simple read-only tool with one optional parameter and no output schema, the description explains what the tool returns conceptually (design tokens and their origin). It does not mention error cases or output format, but these are not critical for basic invocation. The description is complete enough for an agent to know when and why to use it.

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?

The schema fully documents the single optional parameter site_id with its description, achieving 100% coverage. The tool description adds no additional meaning about this parameter, so it relies on the schema, which is sufficient. No need to compensate.

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 clearly states the verb 'Read' and the resource 'a block theme's global styles', and elaborates with specific contents (palette, typography, spacing, per-block styling) and where they come from (theme.json, Site Editor overrides). This is specific enough to distinguish from the sibling update_global_styles and get_theme, even without explicit comparison.

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 by indicating it reads global styles, but it does not explicitly state when to use this tool versus alternatives (e.g., 'use update_global_styles to modify' or 'use get_theme for theme-level info'). It gives context (block themes) but no exclusions or direct alternative references.

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/alokemajumder/wpxmcp'

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