MCP tools

mastercss_inspect_class

Inspect one Master CSS class and return semantic parts, generated rules, variables, and CSS text.

Contract

Check how one class is interpreted by the active manifest. Use mastercss_trace_class when the question is whether project scanning actually finds it.

Input

context
stringOptional

Semantic context. Defaults to project; entry discovery or compilation failures are reported without falling back. Select preset explicitly for standalone preset queries. Values: project, preset.

className
stringRequired

One complete Master CSS class, including any selector or condition suffix. Minimum length: 1.

mode
stringOptional

Mode passed to class inspection. Omit to use the active manifest’s default behavior.

Complete input schema
JSON
{  "$schema": "http://json-schema.org/draft-07/schema#",  "type": "object",  "properties": {    "context": {      "type": "string",      "enum": [        "project",        "preset"      ]    },    "className": {      "type": "string",      "minLength": 1    },    "mode": {      "type": "string"    }  },  "required": [    "className"  ]}

Example

Call mastercss_inspect_class from a connected MCP client with these arguments:

Arguments
{  "className": "p-md"}

Inspect a preset spacing class in the connected workspace.

Output

The result includes className, matchStatus, cssSyntaxStatus, cssValueStatus, browserSupport, rules, semantic inspection data, and the generated css string. Check manifest.status and entries before using custom tokens. A matched class alone does not establish that it appears in scanned source.

Every tool returns an object with version: 3, metadata, diagnostics and result. Success payload fields described above live in result.data; failure has result.status: "error" and a required { code, message } error. JSON text equals structuredContent. Tool errors set isError. Metadata records actual context, package/language/binding versions, manifest fingerprint, entries and dependencies; unavailable information is null or an empty array.

Complete output schema
JSON
{  "$schema": "http://json-schema.org/draft-07/schema#",  "type": "object",  "properties": {    "version": {      "type": "number",      "const": 3    },    "metadata": {      "type": "object",      "properties": {        "versions": {          "anyOf": [            {              "type": "object",              "properties": {                "languageVersion": {                  "type": "number"                },                "bindingAbiVersion": {                  "type": "number"                },                "packageVersion": {                  "type": "string"                }              },              "required": [                "languageVersion",                "bindingAbiVersion",                "packageVersion"              ],              "additionalProperties": {}            },            {              "type": "null"            }          ]        },        "context": {          "anyOf": [            {              "type": "string",              "enum": [                "project",                "preset"              ]            },            {              "type": "null"            }          ]        },        "manifestFingerprint": {          "type": [            "string",            "null"          ]        },        "entries": {          "type": "array",          "items": {            "type": "string"          }        },        "dependencies": {          "type": "array",          "items": {            "type": "string"          }        }      },      "required": [        "versions",        "context",        "manifestFingerprint",        "entries",        "dependencies"      ],      "additionalProperties": false    },    "diagnostics": {      "type": "array",      "items": {        "type": "object",        "properties": {          "code": {            "type": "string"          },          "phase": {            "type": "string"          },          "severity": {            "type": [              "string",              "number"            ]          },          "message": {            "type": "string"          },          "notes": {            "type": "array",            "items": {              "type": "string"            }          },          "alternatives": {            "type": "array",            "items": {              "type": "string"            }          },          "source": {            "type": "string"          },          "range": {            "anyOf": [              {                "type": "object",                "properties": {                  "start": {                    "type": "number"                  },                  "end": {                    "type": "number"                  }                },                "required": [                  "start",                  "end"                ],                "additionalProperties": false              },              {                "type": "object",                "properties": {                  "start": {                    "type": "object",                    "properties": {                      "line": {                        "type": "number"                      },                      "character": {                        "type": "number"                      }                    },                    "required": [                      "line",                      "character"                    ],                    "additionalProperties": false                  },                  "end": {                    "type": "object",                    "properties": {                      "line": {                        "type": "number"                      },                      "character": {                        "type": "number"                      }                    },                    "required": [                      "line",                      "character"                    ],                    "additionalProperties": false                  }                },                "required": [                  "start",                  "end"                ],                "additionalProperties": false              }            ]          }        },        "required": [          "message"        ],        "additionalProperties": {}      }    },    "result": {      "oneOf": [        {          "type": "object",          "properties": {            "status": {              "type": "string",              "const": "success"            },            "data": {              "type": "object",              "properties": {                "manifest": {                  "type": "object",                  "properties": {                    "context": {                      "type": "string",                      "enum": [                        "project",                        "preset"                      ]                    },                    "status": {                      "type": "string",                      "enum": [                        "loaded",                        "error"                      ]                    },                    "fingerprint": {                      "type": [                        "string",                        "null"                      ]                    },                    "entries": {                      "type": "array",                      "items": {                        "type": "string"                      }                    },                    "dependencies": {                      "type": "array",                      "items": {                        "type": "string"                      }                    },                    "versions": {                      "type": "object",                      "properties": {                        "languageVersion": {                          "type": "number"                        },                        "bindingAbiVersion": {                          "type": "number"                        },                        "packageVersion": {                          "type": "string"                        }                      },                      "required": [                        "languageVersion",                        "bindingAbiVersion",                        "packageVersion"                      ],                      "additionalProperties": {}                    }                  },                  "required": [                    "context",                    "status",                    "fingerprint",                    "entries",                    "dependencies"                  ],                  "additionalProperties": {}                },                "className": {                  "type": "string"                },                "matchStatus": {                  "type": "string",                  "enum": [                    "matched",                    "unmatched",                    "ambiguous",                    "syntax-error"                  ]                },                "cssSyntaxStatus": {                  "type": "string",                  "enum": [                    "valid",                    "invalid",                    "unknown",                    "not-checked"                  ]                },                "cssValueStatus": {                  "type": "string",                  "enum": [                    "valid",                    "invalid",                    "unknown",                    "not-checked"                  ]                },                "browserSupport": {                  "type": "string",                  "enum": [                    "supported",                    "unsupported",                    "unknown",                    "not-checked"                  ]                },                "checks": {                  "type": "array",                  "items": {                    "type": "object",                    "properties": {                      "name": {                        "type": "string"                      },                      "version": {                        "type": "string"                      },                      "phase": {                        "type": "string"                      },                      "scope": {                        "type": "string"                      }                    },                    "required": [                      "name",                      "version",                      "phase",                      "scope"                    ],                    "additionalProperties": false                  }                },                "declarations": {                  "type": "array",                  "items": {                    "type": "object",                    "properties": {                      "property": {                        "type": "string"                      },                      "value": {                        "type": "string"                      },                      "status": {                        "type": "string",                        "enum": [                          "valid",                          "invalid",                          "unknown",                          "not-checked"                        ]                      },                      "range": {                        "type": "object",                        "properties": {                          "start": {                            "type": "number"                          },                          "end": {                            "type": "number"                          }                        },                        "required": [                          "start",                          "end"                        ],                        "additionalProperties": false                      },                      "error": {                        "type": "string"                      }                    },                    "required": [                      "property",                      "value",                      "status"                    ],                    "additionalProperties": {}                  }                },                "rules": {                  "type": "array",                  "items": {                    "type": "object",                    "properties": {                      "className": {                        "type": "string"                      },                      "key": {                        "type": "string"                      },                      "layer": {                        "type": "string",                        "enum": [                          "base",                          "defaults",                          "components",                          "utilities"                        ]                      },                      "type": {                        "type": "number"                      },                      "sortTier": {                        "type": "number"                      },                      "text": {                        "type": "string"                      },                      "selectorText": {                        "type": "string"                      },                      "priority": {                        "type": "object",                        "properties": {                          "features": {                            "type": "array",                            "items": {                              "type": "object",                              "properties": {                                "domain": {                                  "type": "string"                                },                                "feature": {                                  "type": "string"                                },                                "unit": {                                  "type": "string"                                },                                "lower": {                                  "anyOf": [                                    {                                      "type": "object",                                      "properties": {                                        "value": {                                          "type": "number"                                        },                                        "inclusive": {                                          "type": "boolean"                                        }                                      },                                      "required": [                                        "value",                                        "inclusive"                                      ],                                      "additionalProperties": false                                    },                                    {                                      "type": "null"                                    }                                  ]                                },                                "upper": {                                  "anyOf": [                                    {                                      "type": "object",                                      "properties": {                                        "value": {                                          "type": "number"                                        },                                        "inclusive": {                                          "type": "boolean"                                        }                                      },                                      "required": [                                        "value",                                        "inclusive"                                      ],                                      "additionalProperties": false                                    },                                    {                                      "type": "null"                                    }                                  ]                                }                              },                              "required": [                                "domain",                                "feature",                                "unit",                                "lower",                                "upper"                              ],                              "additionalProperties": false                            }                          },                          "selector": {                            "type": "number"                          },                          "conditions": {                            "type": "array",                            "items": {                              "type": "string"                            }                          },                          "sortKey": {                            "type": "string"                          },                          "valuePriority": {                            "type": "number"                          }                        },                        "required": [                          "features",                          "selector"                        ],                        "additionalProperties": false                      },                      "nodes": {                        "type": "array",                        "items": {                          "type": "object",                          "properties": {                            "text": {                              "type": "string"                            }                          },                          "required": [                            "text"                          ],                          "additionalProperties": false                        }                      },                      "variableNames": {                        "type": "array",                        "items": {                          "type": "string"                        }                      },                      "animationNames": {                        "type": "array",                        "items": {                          "type": "string"                        }                      }                    },                    "required": [                      "className",                      "key",                      "layer",                      "type",                      "sortTier",                      "priority"                    ],                    "additionalProperties": false                  }                },                "variables": {                  "type": "array",                  "items": {                    "type": "object",                    "properties": {                      "key": {                        "type": "string"                      },                      "variable": {                        "type": "object",                        "properties": {                          "key": {                            "type": "string"                          },                          "name": {                            "type": "string"                          },                          "namespace": {                            "type": "string"                          },                          "type": {                            "type": "string"                          },                          "value": {                            "anyOf": [                              {                                "type": "string"                              },                              {                                "type": "number"                              },                              {                                "type": "boolean",                                "const": false                              },                              {                                "type": "array",                                "items": {                                  "type": [                                    "string",                                    "number"                                  ]                                }                              }                            ]                          },                          "numeric": {                            "type": "object",                            "properties": {                              "value": {                                "type": "number"                              },                              "unit": {                                "type": "string"                              }                            },                            "required": [                              "value"                            ],                            "additionalProperties": false                          },                          "dependencies": {                            "type": "array",                            "items": {                              "type": "string"                            }                          },                          "modes": {                            "type": "object",                            "propertyNames": {                              "type": "string"                            },                            "additionalProperties": {                              "type": "object",                              "properties": {                                "type": {                                  "type": "string",                                  "enum": [                                    "string",                                    "number"                                  ]                                },                                "value": {                                  "type": [                                    "string",                                    "number"                                  ]                                },                                "numeric": {                                  "type": "object",                                  "properties": {                                    "value": {                                      "type": "number"                                    },                                    "unit": {                                      "type": "string"                                    }                                  },                                  "required": [                                    "value"                                  ],                                  "additionalProperties": false                                }                              },                              "required": [                                "type",                                "value"                              ],                              "additionalProperties": false                            }                          },                          "inline": {                            "type": "boolean"                          },                          "static": {                            "type": "boolean"                          },                          "mode": {                            "type": "string"                          }                        },                        "required": [                          "key",                          "name",                          "type",                          "dependencies"                        ],                        "additionalProperties": false                      }                    },                    "required": [                      "key",                      "variable"                    ],                    "additionalProperties": false                  }                },                "diagnostics": {                  "type": "array",                  "items": {                    "type": "object",                    "properties": {                      "code": {                        "type": "string"                      },                      "phase": {                        "type": "string"                      },                      "severity": {                        "type": [                          "string",                          "number"                        ]                      },                      "message": {                        "type": "string"                      },                      "notes": {                        "type": "array",                        "items": {                          "type": "string"                        }                      },                      "alternatives": {                        "type": "array",                        "items": {                          "type": "string"                        }                      },                      "source": {                        "type": "string"                      },                      "range": {                        "anyOf": [                          {                            "type": "object",                            "properties": {                              "start": {                                "type": "number"                              },                              "end": {                                "type": "number"                              }                            },                            "required": [                              "start",                              "end"                            ],                            "additionalProperties": false                          },                          {                            "type": "object",                            "properties": {                              "start": {                                "type": "object",                                "properties": {                                  "line": {                                    "type": "number"                                  },                                  "character": {                                    "type": "number"                                  }                                },                                "required": [                                  "line",                                  "character"                                ],                                "additionalProperties": false                              },                              "end": {                                "type": "object",                                "properties": {                                  "line": {                                    "type": "number"                                  },                                  "character": {                                    "type": "number"                                  }                                },                                "required": [                                  "line",                                  "character"                                ],                                "additionalProperties": false                              }                            },                            "required": [                              "start",                              "end"                            ],                            "additionalProperties": false                          }                        ]                      }                    },                    "required": [                      "message"                    ],                    "additionalProperties": {}                  }                },                "css": {                  "type": "string"                }              },              "required": [                "manifest",                "className",                "matchStatus",                "cssSyntaxStatus",                "cssValueStatus",                "browserSupport",                "checks",                "declarations",                "rules",                "variables",                "css"              ],              "additionalProperties": {}            }          },          "required": [            "status",            "data"          ],          "additionalProperties": false        },        {          "type": "object",          "properties": {            "status": {              "type": "string",              "const": "error"            },            "error": {              "type": "object",              "properties": {                "code": {                  "type": "string"                },                "message": {                  "type": "string"                }              },              "required": [                "code",                "message"              ],              "additionalProperties": false            }          },          "required": [            "status",            "error"          ],          "additionalProperties": false        }      ]    }  },  "required": [    "version",    "metadata",    "diagnostics",    "result"  ],  "additionalProperties": false}

Project context and lifecycle

This operation does not write workspace files.

The local stdio server uses the workspace passed to --root. Confirm the root and intended CSS entries with mastercss_workspace_info before relying on project-dependent values.

See the MCP workflow guide for client setup and the preview/apply workflow.


© 2026 Aoyue Design LLC.MIT License
Trademark Policy