mastercss_lint_project
Run Master CSS class-list diagnostics and return fix proposals without writing files.
Contract
Run native class diagnostics over selected files. Use the project’s ESLint command separately for its parser, plugin settings, and team rules.
Input
Complete input schema
{ "$schema": "http://json-schema.org/draft-07/schema#", "type": "object", "properties": { "context": { "type": "string", "enum": [ "project", "preset" ] }, "patterns": { "type": "array", "items": { "type": "string" } }, "rules": { "type": "string" } }}Example
Call mastercss_lint_project from a connected MCP client with these arguments:
{ "patterns": [ "src/button.html" ], "rules": "sort-classes"}Check class order in an existing file without applying a fix.
Output
files contains files with diagnostics and any fix proposals; clean files are omitted. summary counts diagnostics, and manifest identifies the loaded entries. A manifest-loading failure is reported as a diagnostic.
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
{ "$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": { "root": { "type": "string" }, "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" }, "languageId": { "type": "string" }, "sourceKind": { "type": "string", "enum": [ "source", "stylesheet", "manifest" ] }, "diagnostics": { "type": "array", "items": { "type": "object", "properties": { "code": { "type": "string" }, "phase": { "type": "string" }, "severity": { "type": "string", "enum": [ "error", "warning" ] }, "message": { "type": "string" }, "notes": { "type": "array", "items": { "type": "string" } }, "alternatives": { "type": "array", "items": { "type": "string" } }, "source": { "type": "string", "const": "Master CSS" }, "range": { "type": "object", "properties": { "start": { "type": "number" }, "end": { "type": "number" } }, "required": [ "start", "end" ], "additionalProperties": false }, "loc": { "type": "object", "properties": { "start": { "type": "object", "properties": { "line": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "column": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 } }, "required": [ "line", "column" ], "additionalProperties": false }, "end": { "type": "object", "properties": { "line": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "column": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 } }, "required": [ "line", "column" ], "additionalProperties": false } }, "required": [ "start", "end" ], "additionalProperties": false }, "sourceKind": { "type": "string" }, "fixes": { "type": "array", "items": { "type": "object", "properties": { "kind": { "type": "string", "const": "class-list" }, "safety": { "type": "string", "const": "safe" }, "range": { "type": "object", "properties": { "start": { "type": "number" }, "end": { "type": "number" } }, "required": [ "start", "end" ], "additionalProperties": false }, "text": { "type": "string" }, "description": { "type": "string" }, "requiresFormatting": { "type": "boolean" } }, "required": [ "kind", "safety", "range", "text", "description", "requiresFormatting" ], "additionalProperties": false } } }, "required": [ "code", "severity", "message", "source", "range", "loc", "sourceKind" ], "additionalProperties": {} } } }, "required": [ "filePath", "languageId", "sourceKind", "diagnostics" ], "additionalProperties": false } }, "summary": { "type": "object", "properties": { "files": { "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 }, "fixable": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "safeFixes": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 } }, "required": [ "files", "diagnostics", "errors", "warnings", "fixable", "safeFixes" ], "additionalProperties": false } }, "required": [ "root", "manifest", "files", "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.