Get Theme JSON
Returns the active theme's theme.json as the theme ships it — the settings it allows and the styles it defines — before any change made on this site. Pass a dotted path to read part of it. Read-only.
| Property | Value |
|---|---|
| Ability slug | mosmcp/theme-json-get |
| Wire tool name | mosmcp__theme-json-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, for example "settings.color" or "styles.blocks". |
Output schema
| Field | Type | Required |
|---|---|---|
| theme | string | Yes |
| version | integer | |
| top_level | string[] | |
| path | string | |
| value | object | array | string | number | integer | boolean | null | Yes |
| truncated | boolean | |
| size_bytes | integer | |
| notes | string[] |
Example
Sample prompt
Show me the colour settings my theme ships with in its theme.json.
Example request (json)
{
"jsonrpc": "2.0",
"id": 286,
"method": "tools/call",
"params": {
"name": "mosmcp__theme-json-get",
"arguments": {
"input": {
"path": "settings.color"
}
}
}
}Example response (json)
{
"jsonrpc": "2.0",
"id": 286,
"result": {
"isError": false,
"structuredContent": {
"theme": "twentytwentyfive",
"version": 3,
"top_level": [
"$schema",
"version",
"settings",
"styles",
"templateParts"
],
"path": "settings.color",
"value": {
"defaultPalette": false,
"palette": [
{
"slug": "base",
"name": "Base",
"color": "#FFFFFF"
}
]
},
"truncated": false,
"size_bytes": 612,
"notes": [
"This is the theme as shipped. Changes made on this site are layered on top; mosmcp/theme-styles-get shows the result."
]
}
}
}
Edge cases / errors
- Selected part larger than 64 KB -> truncated true, value returned as an empty object and a note asks for a narrower path.
- path that does not exist -> refused with mosmcp_styles_path_not_found.
- Active theme has no theme.json -> refused with mosmcp_no_global_styles (edit style.css via the theme-file abilities instead).
| << Previous | Next >> |
|---|---|
| Get Pattern | Get 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.