Get Global Styles
Returns the site's global styles: the colour palette, font families, font sizes, spacing sizes, content widths, site-wide colour and typography, element styles such as links and headings, and the site's own overrides of the theme. Includes pending draft changes. Pass a dotted path to read any deeper setting. Read-only.
Also known as: site colours, brand colours, fonts, typography, design system, theme styles.
| Property | Value |
|---|---|
| Ability slug | mosmcp/theme-styles-get |
| Wire tool name | mosmcp__theme-styles-get |
| Category | Theme: Templates and Styles (mosmcp-theme-blocks) |
| Plan | Free |
Required access
| Requirement | Value |
|---|---|
| Capability | edit_theme_options |
| Minimum default role | Administrator (Shop manager too when WooCommerce is active) |
| Annotations | readOnly: true · destructive: false · idempotent: true · openWorld: false |
Input schema
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
| path | string | — | Optional dotted path into the merged styles, for example "styles.elements.link" or "settings.typography". |
Output schema
| Field | Type | Required | Description |
|---|---|---|---|
| theme | string | Yes | |
| source | string | "draft" when a style change is pending, otherwise "live". | |
| has_overrides | boolean | ||
| palette | object[] | Yes | |
| palette[].slug | string | ||
| palette[].name | string | ||
| palette[].color | string | ||
| font_families | object[] | ||
| font_families[].slug | string | ||
| font_families[].name | string | ||
| font_families[].fontFamily | string | ||
| font_sizes | object[] | ||
| font_sizes[].slug | string | ||
| font_sizes[].name | string | ||
| font_sizes[].size | string | ||
| spacing_sizes | object[] | ||
| spacing_sizes[].slug | string | ||
| spacing_sizes[].name | string | ||
| spacing_sizes[].size | string | ||
| content_width | string | ||
| wide_width | string | ||
| site_styles | object | ||
| element_styles | object | ||
| overrides | object | Yes | Only what this site changed on top of the theme. |
| path_value | object | array | string | number | integer | boolean | null | ||
| notes | string[] |
Example
Sample prompt
What colours and fonts is my site using?
Example request (json)
{
"jsonrpc": "2.0",
"id": 284,
"method": "tools/call",
"params": {
"name": "mosmcp__theme-styles-get",
"arguments": {
"input": {}
}
}
}Example response (json)
{
"jsonrpc": "2.0",
"id": 284,
"result": {
"isError": false,
"structuredContent": {
"theme": "twentytwentyfive",
"source": "live",
"has_overrides": true,
"palette": [
{
"slug": "base",
"name": "Base",
"color": "#FFFFFF"
},
{
"slug": "contrast",
"name": "Contrast",
"color": "#111111"
}
],
"font_families": [
{
"slug": "manrope",
"name": "Manrope",
"fontFamily": "Manrope, sans-serif"
}
],
"font_sizes": [
{
"slug": "medium",
"name": "Medium",
"size": "1.125rem"
}
],
"spacing_sizes": [
{
"slug": "50",
"name": "Regular",
"size": "clamp(30px, 5vw, 50px)"
}
],
"content_width": "645px",
"wide_width": "1340px",
"site_styles": {
"color": {
"background": "var:preset|color|base",
"text": "var:preset|color|contrast"
}
},
"element_styles": {
"link": {
"color": {
"text": "currentColor"
}
}
},
"overrides": {
"styles": {
"color": {
"background": "#0b1f3a"
}
}
},
"notes": [
"Colours and sizes are usually referenced by preset, for example \"var:preset|color|primary\" in styles or \"var(--wp--preset--color--primary)\" in CSS."
]
}
}
}
Edge cases / errors
- Active theme has no theme.json -> refused with mosmcp_no_global_styles (edit style.css via the theme-file abilities instead).
- path that does not exist -> refused with mosmcp_styles_path_not_found, naming the missing segment.
- A style change is pending in the draft -> source is "draft" and the values include it, with a note that it is not live yet.
| << Previous | Next >> |
|---|---|
| Find Where a Pattern Is Used | Get Pattern |
For more information about the Secure MCP Server for WordPress plugin, explore the following resources:
Product Overview | Pricing | Try for Free | Documentation
If you have any questions regarding plugin configuration, pricing plans or licensing, please contact us or mail us at aisupport@xecurify.com.