MCP tools

mastercss_scan_project

Scan source files, register stylesheet entries, and report scanner state and generated CSS metadata.

Contract

Inspect scanned files, stylesheet entries, generated CSS, and optional missing-class checks for a chosen source scope.

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.

patterns
string[]Optional

Source paths or glob patterns relative to the server root. Omit to use the tool’s default source scope. Absolute patterns and parent traversal are rejected.

classes
string[]Optional

Complete class names to check against the generated output. This does not add classes to source or safelist them.

includeCss
booleanOptional

Include the generated stylesheet in css.text. Omitted by default.

Complete input schema
JSON
{  "$schema": "http://json-schema.org/draft-07/schema#",  "type": "object",  "properties": {    "context": {      "type": "string",      "enum": [        "project",        "preset"      ]    },    "patterns": {      "type": "array",      "items": {        "type": "string"      }    },    "classes": {      "type": "array",      "items": {        "type": "string"      }    },    "includeCss": {      "type": "boolean"    }  }}

Example

Call mastercss_scan_project from a connected MCP client with these arguments:

Arguments
{  "patterns": [    "src/button.html"  ],  "classes": [    "p-md"  ],  "includeCss": true}

Use an existing source file. The requested class is checked against actual scan output.

Output

Read summary and diagnostics, then files, stylesheets, scanner state, css, and missingCSS. The report includes the configured root and manifest status. Check the discovered stylesheet entries before attributing a missing rule to extraction.

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": {}                },                "files": {                  "type": "array",                  "items": {                    "type": "object",                    "properties": {                      "filePath": {                        "type": "string"                      },                      "source": {                        "type": "string"                      },                      "scanned": {                        "type": "boolean"                      },                      "changed": {                        "type": "boolean"                      },                      "discovered": {                        "type": "object",                        "properties": {                          "latent": {                            "type": "array",                            "items": {                              "type": "string"                            }                          },                          "valid": {                            "type": "array",                            "items": {                              "type": "string"                            }                          },                          "invalid": {                            "type": "array",                            "items": {                              "type": "string"                            }                          },                          "usedNative": {                            "type": "array",                            "items": {                              "type": "string"                            }                          }                        },                        "required": [                          "latent",                          "valid",                          "invalid",                          "usedNative"                        ],                        "additionalProperties": false                      }                    },                    "required": [                      "filePath",                      "source",                      "scanned",                      "changed",                      "discovered"                    ],                    "additionalProperties": false                  }                },                "scanner": {                  "type": "object",                  "properties": {                    "counts": {                      "type": "object",                      "properties": {                        "latent": {                          "type": "integer",                          "minimum": 0,                          "maximum": 9007199254740991                        },                        "valid": {                          "type": "integer",                          "minimum": 0,                          "maximum": 9007199254740991                        },                        "invalid": {                          "type": "integer",                          "minimum": 0,                          "maximum": 9007199254740991                        },                        "native": {                          "type": "integer",                          "minimum": 0,                          "maximum": 9007199254740991                        },                        "usedNative": {                          "type": "integer",                          "minimum": 0,                          "maximum": 9007199254740991                        },                        "safelist": {                          "type": "integer",                          "minimum": 0,                          "maximum": 9007199254740991                        },                        "blocklist": {                          "type": "integer",                          "minimum": 0,                          "maximum": 9007199254740991                        }                      },                      "required": [                        "latent",                        "valid",                        "invalid",                        "native",                        "usedNative",                        "safelist",                        "blocklist"                      ],                      "additionalProperties": false                    },                    "classes": {                      "type": "object",                      "properties": {                        "latent": {                          "type": "array",                          "items": {                            "type": "string"                          }                        },                        "valid": {                          "type": "array",                          "items": {                            "type": "string"                          }                        },                        "invalid": {                          "type": "array",                          "items": {                            "type": "string"                          }                        },                        "usedNative": {                          "type": "array",                          "items": {                            "type": "string"                          }                        },                        "native": {                          "type": "array",                          "items": {                            "type": "string"                          }                        },                        "safelist": {                          "type": "array",                          "items": {                            "type": "string"                          }                        },                        "blocklist": {                          "type": "array",                          "items": {                            "type": "string"                          }                        }                      },                      "required": [                        "latent",                        "valid",                        "invalid",                        "usedNative",                        "native",                        "safelist",                        "blocklist"                      ],                      "additionalProperties": false                    },                    "resetDependencies": {                      "type": "array",                      "items": {                        "type": "string"                      }                    }                  },                  "required": [                    "counts",                    "classes",                    "resetDependencies"                  ],                  "additionalProperties": false                },                "stylesheets": {                  "type": "object",                  "properties": {                    "entries": {                      "type": "array",                      "items": {                        "type": "object",                        "properties": {                          "filePath": {                            "type": "string"                          },                          "masterCSS": {                            "type": "boolean"                          },                          "pruneNativeCSS": {                            "type": "boolean"                          },                          "dependencies": {                            "type": "array",                            "items": {                              "type": "string"                            }                          },                          "sourceDependencies": {                            "type": "array",                            "items": {                              "type": "string"                            }                          },                          "warnings": {                            "type": "array",                            "items": {                              "type": "string"                            }                          },                          "errors": {                            "type": "array",                            "items": {                              "type": "string"                            }                          }                        },                        "required": [                          "filePath",                          "masterCSS",                          "pruneNativeCSS",                          "dependencies",                          "sourceDependencies",                          "warnings",                          "errors"                        ],                        "additionalProperties": false                      }                    },                    "dependencies": {                      "type": "array",                      "items": {                        "type": "string"                      }                    },                    "warnings": {                      "type": "array",                      "items": {                        "type": "string"                      }                    },                    "errors": {                      "type": "array",                      "items": {                        "type": "object",                        "properties": {                          "filePath": {                            "type": "string"                          },                          "message": {                            "type": "string"                          }                        },                        "required": [                          "filePath",                          "message"                        ],                        "additionalProperties": false                      }                    }                  },                  "required": [                    "entries",                    "dependencies",                    "warnings",                    "errors"                  ],                  "additionalProperties": false                },                "css": {                  "type": "object",                  "properties": {                    "bytes": {                      "type": "number"                    },                    "text": {                      "type": "string"                    }                  },                  "required": [                    "bytes"                  ],                  "additionalProperties": {}                },                "summary": {                  "type": "object",                  "properties": {                    "files": {                      "type": "integer",                      "minimum": 0,                      "maximum": 9007199254740991                    },                    "stylesheets": {                      "type": "integer",                      "minimum": 0,                      "maximum": 9007199254740991                    },                    "diagnostics": {                      "type": "integer",                      "minimum": 0,                      "maximum": 9007199254740991                    },                    "errors": {                      "type": "integer",                      "minimum": 0,                      "maximum": 9007199254740991                    },                    "warnings": {                      "type": "integer",                      "minimum": 0,                      "maximum": 9007199254740991                    },                    "missingCSS": {                      "type": "integer",                      "minimum": 0,                      "maximum": 9007199254740991                    },                    "invalidClasses": {                      "type": "integer",                      "minimum": 0,                      "maximum": 9007199254740991                    }                  },                  "required": [                    "files",                    "stylesheets",                    "diagnostics",                    "errors",                    "warnings",                    "missingCSS",                    "invalidClasses"                  ],                  "additionalProperties": false                }              },              "required": [                "manifest",                "files",                "scanner",                "stylesheets",                "css",                "summary"              ],              "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