Skip to content

Conversation

louis030195
Copy link
Contributor

Summary

This PR makes workflow loading more intuitive by allowing plain file paths to be passed to the url parameter in execute_sequence, without requiring the file:// prefix.

Changes

  • Modified server_sequence.rs: Updated URL handling logic to accept plain file paths (any path that doesn't start with http:// or https://)
  • Updated utils.rs: Enhanced schema description for ExecuteSequenceArgs.url to document support for plain paths
  • Backwards compatible: Still supports file://, http://, and https:// URLs

Examples

Before (required file:// prefix):

{
  "tool_name": "execute_sequence",
  "arguments": {
    "url": "file://C:/workflows/myworkflow.yml"
  }
}

After (plain paths now work):

{
  "tool_name": "execute_sequence",
  "arguments": {
    "url": "myworkflow.yml"
  }
}

Or with absolute path:

{
  "tool_name": "execute_sequence",
  "arguments": {
    "url": "C:/workflows/myworkflow.yml"
  }
}

Benefits

  1. More intuitive: Users can specify workflows like regular files
  2. Less verbose: No need to remember file:// prefix for local files
  3. Backwards compatible: Old code using file:// still works
  4. Consistent with CLI: Most tools accept plain file paths

Testing

Build passes with cargo build --release and changes are minimal, focused on URL detection logic.

Co-Authored-By: Claude [email protected]

louis030195 and others added 2 commits October 13, 2025 18:11
Allow execute_sequence's url parameter to accept plain file paths without requiring the file:// prefix. This makes workflow loading more intuitive and user-friendly.

Changes:
- Modified server_sequence.rs to accept plain file paths (paths without http:// or https:// prefix)
- Updated ExecuteSequenceArgs schema description to reflect support for plain paths
- Backwards compatible - still supports file://, http://, and https:// URLs

Examples:
- Plain path: "workflow.yml" or "C:/workflows/myworkflow.yml"
- File URL: "file://C:/workflows/myworkflow.yml"
- HTTP: "https://example.com/workflow.yml"

Co-Authored-By: Claude <[email protected]>
…URLs

When using remote HTTP MCP servers (--url http://...), the CLI was
incorrectly sending file:// URLs that the remote server couldn't access.
This caused errors like "Failed to read local workflow file: The system
cannot find the path specified."

The fix adds a transport type check:
- For stdio transport (local): Use file:// URL (efficient, no verbose logs)
- For HTTP transport (remote): Send full workflow content

Changes:
- Added is_remote_http check using matches!(transport, Transport::Http(_))
- Modified condition from `if resolved_type == InputType::File`
  to `if resolved_type == InputType::File && !is_remote_http`
- Applied fix to both run_workflow() and run_workflow_once() functions

Tested with: terminator mcp run terminator.yml --url http://172.191.93.174:8080/mcp
Result: Successfully executed Chrome installation workflow on remote server

Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
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