Skip to content

fix(mcp): dry runs honour tags, single flow files bring their subflows, failed starts say what to check - #278

Merged
riglar merged 1 commit into
devfrom
fix/mcp-tags-start-runflow
Oct 26, 2026
Merged

riglar merged 1 commit into
devfrom
fix/mcp-tags-start-runflow

Conversation

@riglar

@riglar riglar commented Oct 26, 2026

Copy link
Copy Markdown
Contributor

Three fixes to the MCP server.

Dry runs honour tags

dcd_run_cloud_test with dryRun: true listed every flow in the folder. It read the metadata of all flows instead of the ones that would run. Now it lists the flows left after includeTags, excludeTags and excludeFlows, the same list dcd cloud --dry-run prints.

Real runs were not affected: they already submitted only the filtered flows.

A single flow file brings the files it uses

run with path set to one flow file sent it as yaml on its own. A flow that uses other files (runFlow, runScript, addMedia and the like) then failed on the device with "Invalid File Path", naming a renamed file.

Now such a file is uploaded with its folder as a bundle, with flow set to the file. If it uses a file in a parent folder, the bundle starts at the folder that holds both. A missing file is reported before anything is sent. A file that uses no other files is still sent as yaml.

A failed start says what to check

A start_device call that fails without an answer may still have started a session, and a session is billed while it runs. An agent that just retried would end up with two devices.

The error now says so, and lists the open sessions started in the last two minutes (id, state, client label, created at). It tells the agent to use one of them or stop it, and to check list_devices before starting again. If none started, it says a retry is safe. A tool's own refusal (bad input, say) is passed through as before.

Testing

  • pnpm typecheck passes.
  • pnpm lint: 0 errors. The 24 warnings are already on dev; none are in these files.
  • pnpm test:unit: 514 passing. New tests cover:
    • a dry run with include or exclude tags lists the same flows as the CLI
    • which single files are bundled, including a shared parent folder and a missing subflow
    • a failed start listing only recent sessions
    • a start that answered is left alone
    • the message when the session list can't be read

🤖 Generated with Claude Code

…s, failed starts say what to check

- dcd_run_cloud_test with dryRun listed every flow in the folder, because it
  read the metadata of all flows rather than the ones that would run. It now
  lists the flows after includeTags, excludeTags and excludeFlows, as
  `dcd cloud --dry-run` does. Real runs already submitted only those flows.
- `run` with path set to one flow file sent it as yaml on its own, so a flow
  that uses other files (runFlow, runScript, addMedia and the like) failed on
  the device with an invalid file path. Such a file is now uploaded with its
  folder as a bundle, with flow set to the file. A file that uses no other
  files is still sent as yaml.
- A start_device call that fails without an answer may still have started a
  session, which is billed while it runs. The error now says so and lists
  the open sessions started in the last two minutes, so an agent checks
  list_devices instead of starting a second device.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@claude

claude Bot commented Oct 26, 2026

Copy link
Copy Markdown

Code review

No issues found. Checked for bugs and CLAUDE.md compliance.

@riglar
riglar merged commit 498f300 into dev Oct 26, 2026
9 checks passed
@riglar
riglar deleted the fix/mcp-tags-start-runflow branch October 26, 2026 17:10
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