Stitch MCP tool schemas are not exposed clearly enough for AI agents

Hi Google team,

I’m using Stitch through the Stitch MCP server with OpenAI Codex CLI acting as the MCP client/operator.

The problem is not that Stitch MCP tool arguments are undocumented. They are documented for humans. The problem is that the documentation/schema does not seem to be exposed to agents in a reliably machine-readable, tool-usable way.

As a result, Codex can often understand what a Stitch tool is supposed to do, but still cannot reliably determine the exact required argument shape for the MCP call. Without direct access to the actual tool contract, it starts hallucinating arguments and then gets the
generic error:

“Request contains an invalid argument.”

I ran into this not just with apply_design_system, but also with:

  • create_design_system
  • update_design_system
  • generate_screen_from_text

Exact example:

  • Tool: apply_design_system
  • Goal: apply an existing design system to a newly created screen
  • Inputs used:
    • assetId: existing design system asset ID
    • projectId: Stitch project ID
    • selectedScreenInstances: new screen ID returned by the generate/edit flow
  • Result:
    • Request contains an invalid argument.

What is unclear to the agent:

  • whether selectedScreenInstances expects screen IDs, screen instance IDs, or another resource shape
  • whether newly created screens are immediately valid for that call
  • what the authoritative request schema is for each MCP tool at runtime

The issue is that agents using the MCP server cannot reliably access that documentation/schema in a machine-readable form during tool use. As a workaround, when I manually copy the Stitch MCP documentation page, save it as Markdown locally, and attach it to the Codex session, Codex is then able to infer the correct arguments much more reliably and call the tools successfully. I’m also able to get Codex interact correctly with Stitch MCP server by documenting the arguments for each tool in a Codex skill, but that just duplicates publicly available documentation in a stale format, which is less than ideal.

Two concrete improvements would help a lot:

  • expose machine-readable schemas and canonical request/response examples for every Stitch MCP tool directly to MCP clients
  • make Request contains an invalid argument. much more specific, so the agent can see which field is missing, invalid, or in the wrong format

Stitch MCP is clearly useful for AI-agent workflows, but right now the MCP server does not expose its argument contracts clearly enough for reliable agent use.

Thanks,

Amadeusz