Update Global Styles
Changes the site's global styles — background and text colours, fonts, font sizes, spacing, link and heading styles, the colour palette — staged in the theme draft. For headings only, use styles.elements.heading (or h1 to h6); styles.typography changes the text of the whole site. Pass only what should change: objects merge into the current styles, lists such as a palette are replaced whole, and null removes a setting. WordPress's own validator runs on the result, and anything it does not recognise is reported rather than silently kept.
Also known as: change site colours, change fonts, rebrand, restyle, change typography, dark background.
| Property | Value |
|---|---|
| Ability slug | mosmcp/theme-styles-update |
| Wire tool name | mosmcp__theme-styles-update |
| 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: false · destructive: false · idempotent: true · openWorld: false |
Input schema
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
| styles | object | — | Style changes in theme.json form, for example {"color":{"background":"#0b1f3a","text":"#ffffff"},"elements":{"link":{"color":{"text":"var:preset|color|accent-1"}}}}. | |
| settings | object | — | Setting changes in theme.json form, for example {"color":{"palette":[{"slug":"brand","name":"Brand","color":"#e4572e"}]}}. |
Output schema
| Field | Type | Required | Description |
|---|---|---|---|
| staged | boolean | Yes | |
| target | string | ||
| change | string | ||
| draft | object | Yes | |
| draft.exists | boolean | ||
| draft.change_count | integer | ||
| draft.templates | string[] | ||
| draft.template_parts | string[] | ||
| draft.global_styles | string | ||
| draft.patterns | string[] | ||
| draft.files | string[] | ||
| draft.site_identity | string[] | Pending logo and site icon changes. | |
| draft.custom_css | string[] | Pending change to the Customizer's Additional CSS. A block theme's Additional CSS is part of global styles. | |
| draft.theme_settings | string[] | Pending theme (Customizer) settings. | |
| draft.created | string | ||
| draft.updated | string | ||
| draft.preview_ready | boolean | ||
| next_step | string | ||
| notes | string[] | ||
| ignored | string[] | Paths WordPress did not recognise and dropped. |
Example
Sample prompt
Make my site background dark navy with white text.
Example request (json)
{
"jsonrpc": "2.0",
"id": 298,
"method": "tools/call",
"params": {
"name": "mosmcp__theme-styles-update",
"arguments": {
"input": {
"styles": {
"color": {
"background": "#0b1f3a",
"text": "#ffffff"
}
}
}
}
}
}Example response (json)
{
"jsonrpc": "2.0",
"id": 298,
"result": {
"isError": false,
"structuredContent": {
"staged": true,
"target": "the global styles",
"change": "updated",
"draft": {
"exists": true,
"change_count": 1,
"templates": [],
"template_parts": [],
"global_styles": "background colour, text colour",
"patterns": [],
"files": [],
"created": "2026-09-29 10:12:04",
"updated": "2026-09-29 10:14:37",
"preview_ready": true
},
"next_step": "Nothing has changed on the live site yet. Preview the draft with mosmcp/theme-draft-preview, then publish it with mosmcp/theme-draft-publish.",
"notes": [],
"ignored": []
}
}
}
Edge cases / errors
- Neither styles nor settings given (or both empty) -> refused with mosmcp_styles_patch_empty.
- Values that are not valid CSS colours are not staged and are listed in ignored/notes; paths WordPress does not recognise are dropped and reported in ignored.
- Result identical to the current styles (e.g. all keys unrecognised or already set) -> refused with mosmcp_styles_no_change.
- An empty value changes nothing - pass null to remove a setting. Lists such as a palette replace the whole list. Active theme has no theme.json -> refused with mosmcp_no_global_styles (edit style.css via the theme-file abilities instead).
| << Previous | Next >> |
|---|---|
| Save Pattern | Update Theme Template |
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.