{
  "tools": [
    {
      "name": "find_component",
      "title": "Find a Magma component",
      "description": "Find the Magma components that fit a need, described in words (\"a date range picker\", \"a dismissible notice\"). Returns the tags with what each one is for; read the one you pick with get_component.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "query": {
            "type": "string",
            "description": "What the component has to do, in a few words."
          },
          "limit": {
            "type": "number",
            "description": "How many to return, 8 by default."
          }
        },
        "required": [
          "query"
        ]
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "components": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "tag": {
                  "type": "string"
                },
                "summary": {
                  "type": "string"
                },
                "score": {
                  "type": "number"
                }
              },
              "required": [
                "tag",
                "summary",
                "score"
              ]
            }
          },
          "gap": {
            "type": "string",
            "description": "Set when Magma has nothing for the question: a gap to report."
          }
        },
        "required": [
          "components"
        ]
      },
      "annotations": {
        "readOnlyHint": true,
        "openWorldHint": false
      }
    },
    {
      "name": "get_component",
      "title": "Read the API of a Magma component",
      "description": "The API of one Magma component in the installed version: props with their type, allowed values and default, events with their detail, methods, slots, parts and public CSS custom properties (the only ones a product sets; the internal ones are counted, they may change in any release), the files of its usage guide (examples, mistakes), and in rules the rules of the design language that govern it (the relations and rules of the domains of the design language it carries or that write it, each with its domain and its text; the whole domain with get_guide). Use it before writing the component.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "tag": {
            "type": "string",
            "description": "The tag, such as \"mds-button\", or the wrapper name, such as \"MdsButton\"."
          }
        },
        "required": [
          "tag"
        ]
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "tag": {
            "type": "string"
          },
          "summary": {
            "type": "string"
          },
          "props": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "name": {
                  "type": "string"
                },
                "attribute": {
                  "type": "string"
                },
                "type": {
                  "type": "string"
                },
                "values": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "default": {
                  "type": "string"
                },
                "required": {
                  "type": "boolean"
                },
                "description": {
                  "type": "string"
                }
              },
              "required": [
                "name",
                "type",
                "required",
                "description"
              ]
            }
          },
          "events": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "name": {
                  "type": "string"
                },
                "detail": {
                  "type": "string"
                },
                "description": {
                  "type": "string"
                }
              },
              "required": [
                "name",
                "detail",
                "description"
              ]
            }
          },
          "methods": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "name": {
                  "type": "string"
                },
                "signature": {
                  "type": "string"
                },
                "description": {
                  "type": "string"
                }
              },
              "required": [
                "name",
                "signature",
                "description"
              ]
            }
          },
          "slots": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "name": {
                  "type": "string"
                },
                "description": {
                  "type": "string"
                }
              },
              "required": [
                "name",
                "description"
              ]
            }
          },
          "parts": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "name": {
                  "type": "string"
                },
                "description": {
                  "type": "string"
                }
              },
              "required": [
                "name",
                "description"
              ]
            }
          },
          "cssProperties": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "name": {
                  "type": "string"
                },
                "description": {
                  "type": "string"
                },
                "static": {
                  "type": "boolean",
                  "description": "It takes a value of its own (an illustration colour), not a token or a role."
                }
              },
              "required": [
                "name",
                "description"
              ]
            }
          },
          "internalCssProperties": {
            "type": "integer",
            "description": "How many more it has, internal: not to be set, they may change in any release."
          },
          "files": {
            "type": "object",
            "properties": {
              "api": {
                "type": "string"
              },
              "examples": {
                "type": "string"
              },
              "mistakes": {
                "type": "string"
              }
            }
          },
          "rules": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "from": {
                  "type": "string",
                  "description": "The domain of the design language, such as rhythm."
                },
                "rule": {
                  "type": "string",
                  "description": "The rule, or for a relation of the domain the answer it gives."
                },
                "serves": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  ]
                },
                "use": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "carried-by": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "carried-by-planned": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "checked-by": {
                  "type": "string"
                },
                "lint": {
                  "type": "string"
                },
                "lint-planned": {
                  "type": "string"
                },
                "note": {
                  "type": "string"
                },
                "preview": {
                  "type": "string",
                  "description": "The path of its preview, when it has one."
                }
              },
              "required": [
                "id",
                "from",
                "rule"
              ]
            }
          }
        },
        "required": [
          "tag",
          "summary",
          "props",
          "events",
          "methods",
          "slots",
          "parts",
          "cssProperties",
          "internalCssProperties",
          "files",
          "rules"
        ]
      },
      "annotations": {
        "readOnlyHint": true,
        "openWorldHint": false
      }
    },
    {
      "name": "get_usage",
      "title": "Write a Magma component in HTML, React or Angular",
      "description": "How to write one Magma component in a framework: the import, the element or wrapper name, every prop and event as that framework writes them (attribute, React prop and onMdsX handler, Angular [input] and (output)), an example and the traps of that framework.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "tag": {
            "type": "string",
            "description": "The tag, such as \"mds-input\"."
          },
          "framework": {
            "type": "string",
            "enum": [
              "html",
              "react",
              "angular"
            ],
            "description": "html (web components), react (magma-react) or angular (magma-angular)."
          }
        },
        "required": [
          "tag",
          "framework"
        ]
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "tag": {
            "type": "string"
          },
          "framework": {
            "type": "string"
          },
          "import": {
            "type": "string"
          },
          "element": {
            "type": "string"
          },
          "props": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "name": {
                  "type": "string"
                },
                "written": {
                  "type": "string"
                },
                "values": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                }
              },
              "required": [
                "name",
                "written"
              ]
            }
          },
          "events": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "name": {
                  "type": "string"
                },
                "written": {
                  "type": "string"
                },
                "detail": {
                  "type": "string"
                }
              },
              "required": [
                "name",
                "written",
                "detail"
              ]
            }
          },
          "example": {
            "type": "string"
          },
          "notes": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "required": [
          "tag",
          "framework",
          "import",
          "element",
          "props",
          "events",
          "example",
          "notes"
        ]
      },
      "annotations": {
        "readOnlyHint": true,
        "openWorldHint": false
      }
    },
    {
      "name": "list_tokens",
      "title": "List Magma roles and tokens",
      "description": "The Magma roles and tokens of the installed version, each with what it is for, its CSS custom property, its light value and the Tailwind class that reads it. Search them in words (\"secondary text\", \"card background\", \"radius\"). By default only the semantic roles, what UI code paints with.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "query": {
            "type": "string",
            "description": "What the token is for, or part of its name."
          },
          "tier": {
            "type": "string",
            "enum": [
              "semantic",
              "primitive",
              "all"
            ],
            "description": "semantic (default): the roles; primitive: the raw scales; all."
          },
          "limit": {
            "type": "number",
            "description": "How many to return, 30 by default."
          }
        }
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "tokens": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "css": {
                  "type": "string"
                },
                "path": {
                  "type": "string"
                },
                "tier": {
                  "type": "string"
                },
                "type": {
                  "type": "string"
                },
                "description": {
                  "type": "string"
                },
                "value": {
                  "type": "string"
                },
                "classes": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                }
              },
              "required": [
                "path",
                "tier",
                "type",
                "classes"
              ]
            }
          },
          "total": {
            "type": "number"
          },
          "gap": {
            "type": "string",
            "description": "Set when Magma has nothing for the question: a gap to report."
          }
        },
        "required": [
          "tokens",
          "total"
        ]
      },
      "annotations": {
        "readOnlyHint": true,
        "openWorldHint": false
      }
    },
    {
      "name": "suggest_role",
      "title": "Find the Magma role for a colour",
      "description": "The semantic role to use instead of a raw colour: a literal (#f5f5f5, rgb(...), oklch(...)), a Tailwind class (bg-gray-100, text-tone-neutral-03, shadow-gray-900/20) or a palette step (--tone-neutral-09). Returns the nearest roles by their light value, for the use the class or the hint says (text, border, background, shadow; background when neither says), each with the class to write: the utility and the opacity of the class given, else the utility of the use.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "color": {
            "type": "string",
            "description": "The colour, class or custom property to replace."
          },
          "use": {
            "type": "string",
            "enum": [
              "text",
              "border",
              "background",
              "shadow"
            ],
            "description": "What it paints; read from the class when there is one."
          }
        },
        "required": [
          "color"
        ]
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "input": {
            "type": "string"
          },
          "use": {
            "type": "string"
          },
          "value": {
            "type": "string"
          },
          "roles": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "css": {
                  "type": "string"
                },
                "class": {
                  "type": "string"
                },
                "description": {
                  "type": "string"
                },
                "value": {
                  "type": "string"
                },
                "distance": {
                  "type": "number"
                }
              },
              "required": [
                "css",
                "class",
                "value",
                "distance"
              ]
            }
          }
        },
        "required": [
          "input",
          "use",
          "value",
          "roles"
        ]
      },
      "annotations": {
        "readOnlyHint": true,
        "openWorldHint": false
      }
    },
    {
      "name": "explain_class",
      "title": "Explain a class in Magma",
      "description": "What a Tailwind class does with the Magma theme: the token it reads and its value, the Magma utility it is, or the trap it falls in (p-4 is 0.01rem in Magma, not 16px; bg-white ignores the theme). Variants, ! and opacity are read through.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "class": {
            "type": "string",
            "description": "One class, such as \"p-4\", \"bg-surface-raised\" or \"md:text-title-h3\"."
          }
        },
        "required": [
          "class"
        ]
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "class": {
            "type": "string"
          },
          "utility": {
            "type": "string"
          },
          "kind": {
            "type": "string",
            "enum": [
              "magma-utility",
              "token",
              "spacing-step",
              "raw-palette",
              "tailwind-palette",
              "arbitrary",
              "keyword",
              "other"
            ]
          },
          "description": {
            "type": "string"
          },
          "tokens": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "css": {
                  "type": "string"
                },
                "value": {
                  "type": "string"
                },
                "description": {
                  "type": "string"
                }
              },
              "required": [
                "css"
              ]
            }
          },
          "value": {
            "type": "string"
          },
          "suggestion": {
            "type": "string"
          }
        },
        "required": [
          "class",
          "utility",
          "kind",
          "description",
          "tokens"
        ]
      },
      "annotations": {
        "readOnlyHint": true,
        "openWorldHint": false
      }
    },
    {
      "name": "find_icon",
      "title": "Find a Magma icon slug",
      "description": "Icon slugs that exist in the sets the project installed (mi/<variant>/<name> from @material-icons/svg, mdi/<name> from @mdi/svg, mgg/<name> from svg-icons). Search by meaning (\"delete\", \"send email\"), or pass a slug to check that it exists before writing it in icon=\"...\".",
      "inputSchema": {
        "type": "object",
        "properties": {
          "query": {
            "type": "string",
            "description": "What the icon shows, in words."
          },
          "slug": {
            "type": "string",
            "description": "A slug to check, such as \"mi/baseline/send\"."
          },
          "set": {
            "type": "string",
            "enum": [
              "mi",
              "mdi",
              "mgg"
            ],
            "description": "Search one set only."
          },
          "variant": {
            "type": "string",
            "enum": [
              "baseline",
              "outline",
              "round",
              "sharp"
            ],
            "description": "The Material Icons variant of the slugs found: baseline (default), outline, round, sharp."
          },
          "limit": {
            "type": "number",
            "description": "How many to return, 12 by default."
          }
        }
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "sets": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "set": {
                  "type": "string"
                },
                "package": {
                  "type": "string"
                },
                "installed": {
                  "type": "boolean"
                }
              },
              "required": [
                "set",
                "package",
                "installed"
              ]
            }
          },
          "exists": {
            "type": "boolean"
          },
          "icons": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "slug": {
                  "type": "string"
                },
                "set": {
                  "type": "string"
                },
                "name": {
                  "type": "string"
                }
              },
              "required": [
                "slug",
                "set",
                "name"
              ]
            }
          },
          "gap": {
            "type": "string",
            "description": "Set when Magma has nothing for the question: a gap to report."
          }
        },
        "required": [
          "sets",
          "icons"
        ]
      },
      "annotations": {
        "readOnlyHint": true,
        "openWorldHint": false
      }
    },
    {
      "name": "get_guide",
      "title": "Read a Magma guide",
      "description": "The guides Magma ships for agents (installation, conventions, color, typography, theming, lint...) and the domains of the design language, the rules of composition (kind design-language, such as rhythm: the space between elements): without arguments the list with their sections, with a guide its headings (a domain also the previews of its cases and rules, for render_preview), with a guide and a section the text of that section only. Read the section you need, not the whole file.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "guide": {
            "type": "string",
            "description": "The guide, such as \"color\", \"conventions\", \"lint\", or a domain, \"rhythm\"."
          },
          "section": {
            "type": "string",
            "description": "A heading of the guide, or part of it, such as \"Boolean\"."
          }
        }
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "guides": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "name": {
                  "type": "string"
                },
                "title": {
                  "type": "string"
                },
                "sections": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "kind": {
                  "type": "string",
                  "description": "design-language: a domain of the design language."
                }
              },
              "required": [
                "name",
                "title",
                "sections"
              ]
            }
          },
          "guide": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "sections": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "heading": {
                  "type": "string"
                },
                "level": {
                  "type": "number"
                }
              },
              "required": [
                "heading",
                "level"
              ]
            }
          },
          "section": {
            "type": "string"
          },
          "text": {
            "type": "string"
          },
          "previews": {
            "type": "array",
            "description": "For a domain: the previews of its cases and of its rules, for render_preview (pattern with case or rule, and example from 2).",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "kind": {
                  "type": "string",
                  "enum": [
                    "case",
                    "rule"
                  ]
                },
                "file": {
                  "type": "string"
                },
                "example": {
                  "type": "number"
                }
              },
              "required": [
                "id",
                "kind",
                "file"
              ]
            }
          }
        }
      },
      "annotations": {
        "readOnlyHint": true,
        "openWorldHint": false
      }
    },
    {
      "name": "get_pattern",
      "title": "Read a Magma pattern",
      "description": "The patterns Magma ships: the solution to a task across components (where a message goes, confirming an action, an empty, a loading or a failed part), the same in every product; first the domains of the design language (kind design-language), the rules of composition every pattern stands on (the space between elements, ...), then the building blocks (kind block), the sections of a page that come back in several patterns (the page header). Without arguments the list, in layerDir the folder of the layers of this project (its magma/patterns/) and in layerErrors what is wrong in them; with need the patterns for it; with id the pattern (its variables, cases, always-true rules and open choices, with the layer of this project applied, and in layerFile the file that layer is read from, to write or change); with id and situation, the values of its variables you know, the one case to follow (in use the parts of its solution, each with its role and the component to write, in the order of its preview, a value in angle brackets the text of the application; with its preview when Magma has one: the stage, as markup, the elements marked data-stage the context of the case and not part of it, what to try in it and the paths of its images, light and dark, to show where the stage cannot run, and in rules the rules of the domains it relies on, each with its domain, its text and the path of its preview; the other examples of the case in examples), or which variables are still to settle; for a block, the regions that show, in the order of the page, and when the values match one of its situations, every variable given, the preview of that situation as for a case (the stage, what to try, the other examples); with id and section the text of that section. Ask before building a flow or the head of a page, compose from the parts of the case or the regions it gives, then add what your situation needs, and follow its rules.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "A pattern, such as \"message-placement\"."
          },
          "need": {
            "type": "string",
            "description": "The task in words, such as \"tell the user a save failed\"."
          },
          "situation": {
            "type": "object",
            "description": "With id: the values of the variables of the pattern you know, such as {\"about\": \"action\", \"outcome\": \"failure\"}.",
            "additionalProperties": {
              "type": "string"
            }
          },
          "section": {
            "type": "string",
            "description": "With id: a section of the pattern, such as \"Behaviour over time\"."
          }
        }
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "patterns": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "title": {
                  "type": "string"
                },
                "group": {
                  "type": "string"
                },
                "kind": {
                  "type": "string"
                },
                "status": {
                  "type": "string"
                },
                "layer": {
                  "type": "string"
                },
                "need": {
                  "type": "string"
                },
                "validatedOn": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                }
              },
              "required": [
                "id",
                "title",
                "kind",
                "status",
                "need"
              ]
            }
          },
          "pattern": {
            "type": "object"
          },
          "id": {
            "type": "string"
          },
          "renamedFrom": {
            "type": "string"
          },
          "layerDir": {
            "type": "string",
            "description": "The folder of this project's layers and own patterns, where get_pattern reads them."
          },
          "layerFile": {
            "type": "string",
            "description": "The file this project's layer of the pattern is read from, written or not yet: write or change the layer there."
          },
          "layerErrors": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "answer": {
            "type": "object"
          },
          "candidates": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "missing": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "variable": {
                  "type": "string"
                },
                "values": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "means": {
                  "type": "string"
                }
              },
              "required": [
                "variable",
                "values"
              ]
            }
          },
          "section": {
            "type": "string"
          },
          "text": {
            "type": "string"
          },
          "gap": {
            "type": "string",
            "description": "Set when Magma has nothing for the question: a gap to report."
          }
        }
      },
      "annotations": {
        "readOnlyHint": true,
        "openWorldHint": false
      }
    },
    {
      "name": "check_markup",
      "title": "Check a snippet with the Magma lint",
      "description": "Run the Magma lint on a snippet before writing it: prop values outside their union, \"false\" booleans, icon-only controls without a name, raw palette classes (templates and @apply), raw colours and prefers-color-scheme queries (CSS). Uses the ESLint, Stylelint and parsers the project installed; strict preset by default, so every finding is shown.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string",
            "description": "The snippet."
          },
          "language": {
            "type": "string",
            "enum": [
              "html",
              "angular",
              "jsx",
              "tsx",
              "css",
              "scss"
            ],
            "description": "html, angular (an Angular template), jsx, tsx, css or scss."
          },
          "preset": {
            "type": "string",
            "enum": [
              "recommended",
              "strict"
            ],
            "description": "strict (default) or recommended, the severities of an existing product."
          }
        },
        "required": [
          "code",
          "language"
        ]
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "language": {
            "type": "string"
          },
          "preset": {
            "type": "string"
          },
          "findings": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "rule": {
                  "type": "string"
                },
                "severity": {
                  "type": "string",
                  "enum": [
                    "error",
                    "warning"
                  ]
                },
                "message": {
                  "type": "string"
                },
                "line": {
                  "type": "number"
                },
                "column": {
                  "type": "number"
                }
              },
              "required": [
                "rule",
                "severity",
                "message",
                "line",
                "column"
              ]
            }
          }
        },
        "required": [
          "language",
          "preset",
          "findings"
        ]
      },
      "annotations": {
        "readOnlyHint": true,
        "openWorldHint": false
      }
    },
    {
      "name": "check_setup",
      "title": "Check the Magma integration of the project",
      "description": "Look at the project and list what its Magma integration misses, each with the guide that fixes it: design-tokens and styles installed in the range magma depends on, the React or Angular wrapper at magma's version, the fonts of the typography, an icon set, the icon path, the lint in ESLint and Stylelint, this server in the client configuration. Names the folder it read as the project and how the server found it. Read-only.",
      "inputSchema": {
        "type": "object",
        "properties": {}
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "root": {
            "type": "string",
            "description": "The folder read as the project."
          },
          "rootFrom": {
            "type": "string",
            "enum": [
              "option",
              "start",
              "install"
            ],
            "description": "How the server found it: named by --root (option), the folder the client started it in (start), the project the command runs magma from, inside that folder (install)."
          },
          "magma": {
            "type": "string"
          },
          "ok": {
            "type": "boolean"
          },
          "checks": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "ok": {
                  "type": "boolean"
                },
                "detail": {
                  "type": "string"
                },
                "guide": {
                  "type": "string"
                }
              },
              "required": [
                "id",
                "ok",
                "detail",
                "guide"
              ]
            }
          }
        },
        "required": [
          "root",
          "magma",
          "ok",
          "checks"
        ]
      },
      "annotations": {
        "readOnlyHint": true,
        "openWorldHint": false
      }
    },
    {
      "name": "render_preview",
      "title": "Render Magma markup as an image",
      "description": "Render HTML with Magma components on the magma installed in the project, offline, and get the image (to look at, and to show the person) with its file, and a report of what in it is not representative: a component unknown or not hydrated, an element with no size, a component that shows one flat colour, a console error, an icon, a font or an image that did not load, a word broken across lines, content cut. Instead of markup, pattern and case render the preview Magma ships for that case of a pattern (for a building block, case is the id of one of its situations), pattern and rule the preview of a rule of a domain of the design language, and example another example of either. Render each option before asking a person to decide on an interface. Needs playwright-core in the project and Chrome or Edge on the machine; writes the image into node_modules/.cache/magma/previews.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "markup": {
            "type": "string",
            "description": "The HTML to render, the body of a page: mds-* components, plain elements, a <style> for the layout; a <script> runs, offline. Images as data: URLs."
          },
          "pattern": {
            "type": "string",
            "description": "Instead of markup, with case: a pattern of get_pattern, such as \"message-placement\"."
          },
          "case": {
            "type": "string",
            "description": "With pattern: one of its cases, such as \"action-failed-in-place\", or for a building block the id of one of its situations, such as \"requests-of-an-office\" of \"page-header\"; its preview is rendered with the height and the language it declares."
          },
          "rule": {
            "type": "string",
            "description": "With pattern, instead of case: a rule of a domain of the design language with a preview, such as \"stacked\" of \"actions\" (get_guide lists them)."
          },
          "example": {
            "type": "integer",
            "minimum": 1,
            "description": "With case or rule: which example of it, 1 (default) for the first, 2 on for the others get_pattern lists in examples."
          },
          "widths": {
            "type": "array",
            "items": {
              "type": [
                "string",
                "integer"
              ]
            },
            "maxItems": 4,
            "description": "The viewport widths, one image each: a Magma breakpoint (mobile, tablet, desktop, wide, ...) or pixels from 320 to 2000. Default [\"desktop\"]."
          },
          "height": {
            "type": "integer",
            "minimum": 100,
            "maximum": 2000,
            "description": "The viewport height. Default: the height of the content. Give one for an overlay (modal, drawer, toast), which sits on the viewport."
          },
          "mode": {
            "type": "string",
            "enum": [
              "light",
              "dark"
            ],
            "description": "light (default) or dark."
          },
          "theme": {
            "type": "string",
            "description": "A named theme of the installed styles (data-theme-name). Default: the base theme, the page with no data-theme-name."
          },
          "lang": {
            "type": "string",
            "description": "The lang of the page, such as \"it\": the components localise their own texts from it."
          }
        }
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "magma": {
            "type": "string"
          },
          "mode": {
            "type": "string"
          },
          "theme": {
            "type": "string"
          },
          "preview": {
            "type": "object",
            "properties": {
              "pattern": {
                "type": "string"
              },
              "case": {
                "type": "string"
              },
              "rule": {
                "type": "string"
              },
              "example": {
                "type": "integer"
              },
              "file": {
                "type": "string"
              },
              "try": {
                "type": "string"
              }
            },
            "required": [
              "pattern",
              "file"
            ]
          },
          "representative": {
            "type": "boolean"
          },
          "images": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "width": {
                  "type": "number"
                },
                "height": {
                  "type": "number"
                },
                "file": {
                  "type": "string"
                },
                "representative": {
                  "type": "boolean"
                },
                "problems": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "kind": {
                        "type": "string"
                      },
                      "element": {
                        "type": "string"
                      },
                      "detail": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "kind",
                      "detail"
                    ]
                  }
                }
              },
              "required": [
                "width",
                "height",
                "file",
                "representative",
                "problems"
              ]
            }
          }
        },
        "required": [
          "magma",
          "mode",
          "representative",
          "images"
        ]
      },
      "annotations": {
        "readOnlyHint": false,
        "openWorldHint": false,
        "destructiveHint": false,
        "idempotentHint": true
      }
    }
  ]
}
