Skip to main content
Glama
stitch-native

stitch-native

stitch_to_compose

Convert Stitch screen HTML into a Jetpack Compose Material 3 composable and report off-token colors and warnings.

Instructions

Convert a Stitch screen to a Jetpack Compose (Material 3) composable. Reports off-token colours and warnings.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "stitch_to_compose"
  }
}

Input Schema

NameRequiredDescriptionDefault
urlNoHTTPS download URL of the screen HTML (a public https URL; Stitch downloadUrls need OAuth, so pass that HTML via html instead).
htmlNoStitch screen HTML (the export, including the tailwind-config script).
modeNostate: stateless screen with a State struct + sample, Identifiable rows, a tab Picker, localized keys and callbacks (no ViewModel).layout
nameNoGenerated view/composable name.StitchScreen
pathNoPath to a Stitch HTML file. Used when html is not given.
configNostitch-native.json contents: {"targets": ["swiftui","compose","html"], "colors": {token|#hex: expr}, "colorsHtml": {token|#hex: cssValue}, "fonts": {token: expr}, "icons": {material: sfSymbol}, "iconsCompose": {material: "Icons.X.Y"}, "iconsHtml": {material: text or inline svg}, "preview": {"colorScheme": "dark|light"}}. Alias: map. Without config, config_path or map, the server looks for stitch-native.json next to `path` and in its parent directories (first one found).
config_pathNoPath to a stitch-native.json. Used when config is not given.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.7.1

TDQS

B3.4/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are supplied, so the description carries the full behavioral burden. It discloses one genuine behavioral trait beyond the schema – that output includes reporting of off-token colours and warnings – but says nothing about whether composables are written to disk or returned in the response, whether network access is performed on the url, determinism, or failure modes, which matters for a 7-parameter code-generation tool.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two sentences, front-loaded with the conversion and then the output side-effect, with zero filler. It is efficient, though arguably too sparse for the tool's 7-parameter surface with a nested config object.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With 7 parameters, a nested config object, no annotations and no output schema, the definition leaves gaps an agent must fill from the schema alone: what is actually returned or written, how config resolution interacts with path, and how this tool relates to the sibling config/token tools. Adequate to invoke, but not complete enough to predict results.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100% and each parameter (url, html, mode, name, path, config, config_path) already carries rich documentation including defaults and precedence. The description adds no parameter-level meaning beyond the schema, so the baseline of 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb (convert), a specific source (a Stitch screen) and a specific target (Jetpack Compose Material 3 composable). This cleanly separates it from stitch_to_swiftui, stitch_to_html and stitch_to_ir, though the description never names those siblings to reinforce the distinction.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Guidance is implied rather than stated: the agent must infer that this is the tool to pick when the project targets Jetpack Compose. There is no explicit when-to-use or when-not clause, no mention of stitching routing through stitch_to_ir or of preferring init_config/extract_tokens for configuration work.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.