translate_muiscan
Transform muiscan JSON data into production-ready MUI web components for design-to-code workflows.
Instructions
Transform muiscan JSON to web components
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| json | Yes | The muiscan JSON to transform |
Implementation Reference
- server.js:72-84 (handler)The handler function for the 'translate_muiscan' tool. It extracts the 'json' argument from the request, passes it to transformNode, and returns the output as text content.if (request.params.name === "translate_muiscan") { const json = request.params.arguments.json; const output = transformNode(json); return { content: [ { type: "text", text: output, }, ], }; }
- server.js:52-65 (schema)The schema definition for the 'translate_muiscan' tool, including name, description, and input schema requiring a 'json' string.{ name: "translate_muiscan", description: "Transform muiscan JSON to web components", inputSchema: { type: "object", properties: { json: { type: "string", description: "The muiscan JSON to transform", }, }, required: ["json"], }, },
- server.js:49-68 (registration)Registration of the 'translate_muiscan' tool in the ListToolsRequestHandler, making it discoverable by clients.server.setRequestHandler(ListToolsRequestSchema, async () => { return { tools: [ { name: "translate_muiscan", description: "Transform muiscan JSON to web components", inputSchema: { type: "object", properties: { json: { type: "string", description: "The muiscan JSON to transform", }, }, required: ["json"], }, }, ], }; });
- transform.js:2-9 (helper)The transformNode helper function called by the handler. Currently a stub that echoes the input, with comments indicating intended use with MCP prompt for transformation.function transformNode(input) { // Here, 'input' is whatever text / muiscan snippet you paste in // The MCP uses your prompt to generate the proper <mui-*> output // For now, we just return the input directly, // because your MCP prompt contains all the rules return input; }