-
Notifications
You must be signed in to change notification settings - Fork 36
Open
Labels
featuregood first issueGood for newcomersGood for newcomersmcpTailor-made MCP powering Skyflo.aiTailor-made MCP powering Skyflo.ai
Description
The k8s_patch tool accepts any string for patch_type and the k8s_get tool accepts any string for output format, but neither validates against the allowed values. Invalid values are passed to kubectl which returns cryptic errors. Other tools like k8s_rollout_undo already validate their enum-like parameters.
Scope
- MCP (
mcp/tools/kubectl.py):k8s_patch: Validate thatpatch_typeis one of"strategic","merge", or"json". Return a clear error listing the allowed values if an invalid type is provided.k8s_get: Validate thatoutput(when provided) is one of"wide","yaml","json","name". Return a clear error listing the allowed values if an invalid format is provided.- Follow the existing pattern from
k8s_rollout_undowhich validatesresource_typeagainst an allowed list.
Acceptance criteria
- Passing an invalid
patch_type(e.g.,"invalid") tok8s_patchreturns a clear error with the list of valid options. - Passing an invalid
outputformat (e.g.,"csv") tok8s_getreturns a clear error with valid options. - Valid values continue to work as expected.
- Validation follows the existing pattern in the codebase.
How to test manually
- Run the Engine and MCP server locally (see
engine/README.mdandmcp/README.md). - Trigger a
k8s_patchcall with an invalid patch type and verify a clear error is returned. - Trigger a
k8s_getcall with a valid output format and verify it works.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
featuregood first issueGood for newcomersGood for newcomersmcpTailor-made MCP powering Skyflo.aiTailor-made MCP powering Skyflo.ai