fix(aws-healthomics-mcp-server): add workflow_type parameter to start_run for Ready2Run workflows - #4350
Open
steditt wants to merge 10 commits into
Open
fix(aws-healthomics-mcp-server): add workflow_type parameter to start_run for Ready2Run workflows#4350steditt wants to merge 10 commits into
steditt wants to merge 10 commits into
Conversation
Merge latest updates
steditt
requested review from
a team,
WIIASD,
a-li,
alxawan,
markjschreiber and
sabeelmansuri
as code owners
July 27, 2026 10:24
steditt
force-pushed
the
fix/start-run-workflow-type
branch
from
July 27, 2026 11:51
73f0810 to
1e96f01
Compare
… for Ready2Run workflows The start_run tool was missing the workflowType parameter that the AWS HealthOmics StartRun API requires when running Ready2Run workflows. Without it, the API defaults to PRIVATE and returns 'Workflow not found' for Ready2Run workflow IDs. Changes: - Add optional workflow_type parameter (PRIVATE|READY2RUN) to start_run - Pass workflowType to client.start_run() when provided - Validate workflow_type against allowed values - Add tests for READY2RUN, None (omitted), and invalid values
steditt
force-pushed
the
fix/start-run-workflow-type
branch
from
July 27, 2026 12:05
1e96f01 to
209e6bb
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #4350 +/- ##
==========================================
+ Coverage 93.04% 93.10% +0.05%
==========================================
Files 1031 1014 -17
Lines 86905 85879 -1026
Branches 14019 13835 -184
==========================================
- Hits 80865 79959 -906
+ Misses 3658 3581 -77
+ Partials 2382 2339 -43 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
…2RUN validation - Front-load 'REQUIRED for Ready2Run workflows' in workflow_type Field description to improve LLM tool-calling accuracy - Add pre-validation rejecting storage_type/storage_capacity when workflow_type is READY2RUN (fail fast with clear error instead of confusing downstream API error) - Remove redundant 'not applicable' prose from storage field descriptions since the validation now enforces it Addresses agent struggling with 5 retries before discovering that workflow_type='READY2RUN' is needed for AWS-provided workflows. The HealthOmics API returns a misleading ResourceNotFoundException when workflow_type is omitted for Ready2Run workflows. Part of: awslabs#4350
- Sort imports alphabetically (isort/I001) - Assert on result in test_start_run_invalid_workflow_type to fix unused variable warning (F841)
…ombo The test_start_run_with_workflow_type_ready2run test passed storage_type='STATIC' and storage_capacity=1200 alongside workflow_type='READY2RUN'. The new pre-validation correctly rejects this combination before reaching the API client, so the test never invoked mock_client.start_run (causing NoneType subscript error). Fix: use storage_type='DYNAMIC' and storage_capacity=None, which is the valid parameter set for Ready2Run workflows.
Use single-line plain ASCII description without em-dash or embedded quotes. This avoids potential serialization issues across tool schema boundaries (AgentCore Gateway indexes tool schemas at connect time).
steditt
force-pushed
the
fix/start-run-workflow-type
branch
from
July 28, 2026 16:05
cc7e75c to
b579dd4
Compare
…d code - Add tests for READY2RUN storage parameter validation - Add tests for VPC networking mode validation paths - Add tests for list_runs date filter pagination and truncation - Add test for list_run_tasks with pagination token - Add test for filter_runs_by_creation_time with malformed datetime - Refactor S3 URI test to exercise real try/except path - Remove unreachable else branch in list_runs (dead code) Coverage: 90% -> 100% for workflow_execution.py
steditt
force-pushed
the
fix/start-run-workflow-type
branch
from
July 29, 2026 05:09
d8c1d66 to
63f3613
Compare
a-li
approved these changes
Jul 29, 2026
Comment on lines
+238
to
+244
| # Validate workflow type (using shared utility from validation_utils) | ||
| if workflow_type is not None and isinstance(workflow_type, str): | ||
| validation_result = await validate_workflow_type(ctx, workflow_type) | ||
| if isinstance(validation_result, dict): | ||
| return validation_result | ||
| # Normalize workflow_type: only pass to API if it's a valid string | ||
| effective_workflow_type = workflow_type if isinstance(workflow_type, str) else None |
There was a problem hiding this comment.
nit: Consider using Literal typing for workflow_type instead of manual validation.
|
|
||
| @pytest.mark.asyncio | ||
| async def test_start_run_ready2run_with_storage_capacity_rejected(): | ||
| """Test READY2RUN workflow rejects storage_capacity parameter (line 249).""" |
There was a problem hiding this comment.
nit: Remove these line number labels in the docstring in case original file is modified. There are several of these in this test file.
| ) | ||
|
|
||
| # Should return an error dict from handle_tool_error | ||
| assert 'error' in str(result).lower() or isinstance(result, dict) |
There was a problem hiding this comment.
nit: This assertion always passes: the right operand is always true since start_run returns Dict[str, Any].
markjschreiber
enabled auto-merge
July 29, 2026 20:52
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Changes
The
start_runtool in the HealthOmics MCP server is missing theworkflowTypeparameter that the AWS HealthOmicsStartRunAPI requires when executing Ready2Run workflows. Without it, the API defaults toPRIVATEand returns "Workflow not found" for Ready2Run workflow IDs — even thoughListWorkflowsandGetWorkflowdiscover them correctly.This PR adds:
workflow_typeparameter (PRIVATEorREADY2RUN) to thestart_runtoolvalidate_workflow_type()utility fromvalidation_utils.py(same pattern aslist_workflowsandget_workflow)workflowTypetoclient.start_run()only when provided (backward compatible — omitting it preserves existing PRIVATE behavior)User experience
Before: An agent discovers a Ready2Run workflow via
ListWorkflows(workflow_type="READY2RUN"), retrieves its details viaGetWorkflow, butStartRunfails with:After: The agent can pass
workflow_type="READY2RUN"toStartRunand the run starts successfully:{ "workflow_id": "2174942", "workflow_type": "READY2RUN", "role_arn": "arn:aws:iam::123456789012:role/OmicsRole", "name": "scrnaseq-starsolo", "output_uri": "s3://my-bucket/outputs/", "parameters": {"samplename": "test", "protocol": "10XV3", "input": [...]}, "storage_type": "STATIC", "storage_capacity": 1200 }Checklist
If your change doesn't seem to apply, please leave them unchecked.
Is this a breaking change? N
RFC issue number: N/A (bug fix — extends existing parameter pattern to a missing tool)
Checklist:
Acknowledgment
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of the project license.