Skip to content

Support multiple simulations per tool#79

Open
m-sanders wants to merge 1 commit into
Sunpeak-AI:mainfrom
m-sanders:fix/multiple-sims-per-tool
Open

Support multiple simulations per tool#79
m-sanders wants to merge 1 commit into
Sunpeak-AI:mainfrom
m-sanders:fix/multiple-sims-per-tool

Conversation

@m-sanders
Copy link
Copy Markdown

@m-sanders m-sanders commented May 30, 2026

The docs already advertise multiple .json fixtures targeting the same tool (e.g. show-albums.json + show-albums-empty.json), but in practice only the last one survived: mergeSimulationFixtures looked sims up by tool name and overwrote, and the dev MCP server registered the same UI tool twice and only showed the last registry.

  • mergeSimulationFixtures: group fixtures by tool. When a tool has multiple fixtures, drop the auto-discovered slot (unless one fixture's filename matches the tool) and key each entry by its filename. Single-fixture flow is unchanged.
  • createAppServer: skip duplicate UI tool registrations the same way plain tools already do. First simulation's toolResult is used for the fallback mock.
  • Tests: covered both via the existing inspect + mcp test files; mergeSimulationFixtures is now exported so tests call the real function instead of inlining the logic.

mergeSimulationFixtures keyed by tool name, so a second JSON fixture
targeting the same tool overwrote the first. Group by tool, drop the
auto-discovered slot when no fixture file reuses its name, and key each
fixture entry by its filename instead. Dedup UI tool registrations in
the dev MCP server so duplicate simulations no longer crash startup.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant