MCP tools

mastercss_suggest_syntax

Return language-service completions and hover context for a document position.

Contract

Request language-service completion candidates and hover information at a position in an unsaved document.

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.

content
stringRequired

Complete source buffer.

filePath
stringRequired

Virtual workspace-relative path used to infer the source language; the buffer does not need to exist on disk.

position
objectRequired

Cursor position in the buffer.

position.line
integerRequired

Zero-based line index. Minimum: 0.

position.character
integerRequired

Zero-based UTF-16 code-unit offset on the line. Minimum: 0.

triggerCharacter
stringOptional

Character that triggered completion. Omit for an explicit completion request.

limit
integerOptional

Maximum completion items returned. Defaults to 50; total still reports the untruncated count. Minimum: 1. Maximum: 200.

Complete input schema
JSON
{  "$schema": "http://json-schema.org/draft-07/schema#",  "type": "object",  "properties": {    "context": {      "type": "string",      "enum": [        "project",        "preset"      ]    },    "content": {      "type": "string"    },    "filePath": {      "type": "string"    },    "position": {      "type": "object",      "properties": {        "line": {          "type": "integer",          "minimum": 0,          "maximum": 9007199254740991        },        "character": {          "type": "integer",          "minimum": 0,          "maximum": 9007199254740991        }      },      "required": [        "line",        "character"      ]    },    "triggerCharacter": {      "type": "string"    },    "limit": {      "type": "integer",      "minimum": 1,      "maximum": 200    }  },  "required": [    "content",    "filePath",    "position"  ]}

Example

Call mastercss_suggest_syntax from a connected MCP client with these arguments:

Arguments
{  "content": "<div class=\"p:\"></div>",  "filePath": "src/card.html",  "position": {    "line": 0,    "character": 14  },  "limit": 5}

The cursor follows p: in the class attribute.

Output

The result includes completions, their untruncated total, optional hover, and manifest status. A completion list is editor assistance; verify the selected class against the intended project and rendered UI.

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": {}                },                "completions": {                  "type": "array",                  "items": {                    "type": "object",                    "properties": {                      "label": {                        "type": "string"                      },                      "kind": {                        "type": "number"                      },                      "detail": {                        "type": "string"                      },                      "insertText": {                        "type": "string"                      },                      "sortText": {                        "type": "string"                      },                      "documentation": {                        "anyOf": [                          {                            "type": "string"                          },                          {                            "type": "object",                            "properties": {                              "kind": {                                "type": "string"                              },                              "value": {                                "type": "string"                              }                            },                            "required": [                              "kind",                              "value"                            ],                            "additionalProperties": false                          }                        ]                      }                    },                    "required": [                      "label"                    ],                    "additionalProperties": {}                  }                },                "total": {                  "type": "number"                }              },              "required": [                "manifest",                "completions",                "total"              ],              "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