Summary
The MCP server currently does not expose an invoke tool, even though func invoke already exists as a CLI command. After deploying a Function through the MCP workflow, agents have no MCP-native way to verify the deployment by sending a test request.
Related to #3646 (LFX: End-to-End Agentic Workflow).
Current Behavior
- Agent deploys a Function using the
deploy MCP tool
- Agent wants to validate the deployed Function
- No
invoke MCP tool exists
- Validation requires external shell commands or manual HTTP requests outside the MCP workflow
Expected Behavior
An MCP invoke tool should allow agents to:
- send requests to deployed or locally running Functions
- support HTTP and CloudEvent invocation formats
- optionally provide request body and content type
- return invocation response details
Why This Matters
The current MCP workflow supports create → build → deploy, but there is no MCP-native mechanism for validating the deployed Function afterward.
Adding invoke would help complete the Function lifecycle exposed to agents and improve the end-to-end workflow envisioned in #3646.
Possible Implementation Direction
A new pkg/mcp/tools_invoke.go tool could wrap the existing func invoke command following the same registration and handler patterns already used by tools such as tools_create.go.
The implementation could expose fields such as:
- path
- invocation format
- request body
- content type
- target mode (local/remote)
Tool registration and tests could follow the existing MCP tool patterns already used throughout pkg/mcp.
Notes
func invoke already exists as a fully implemented CLI command in cmd/invoke.go
- Invocation is effectively a read-only operation, so it should not require write-enabled MCP mode
Summary
The MCP server currently does not expose an
invoketool, even thoughfunc invokealready exists as a CLI command. After deploying a Function through the MCP workflow, agents have no MCP-native way to verify the deployment by sending a test request.Related to #3646 (LFX: End-to-End Agentic Workflow).
Current Behavior
deployMCP toolinvokeMCP tool existsExpected Behavior
An MCP
invoketool should allow agents to:Why This Matters
The current MCP workflow supports create → build → deploy, but there is no MCP-native mechanism for validating the deployed Function afterward.
Adding
invokewould help complete the Function lifecycle exposed to agents and improve the end-to-end workflow envisioned in #3646.Possible Implementation Direction
A new
pkg/mcp/tools_invoke.gotool could wrap the existingfunc invokecommand following the same registration and handler patterns already used by tools such astools_create.go.The implementation could expose fields such as:
Tool registration and tests could follow the existing MCP tool patterns already used throughout
pkg/mcp.Notes
func invokealready exists as a fully implemented CLI command incmd/invoke.go