Documentation
¶
Overview ¶
Package invoke exposes Dapr service invocation as an MCP tool.
Index ¶
Constants ¶
const ( // DefaultHTTPVerb is used when the caller does not set one. DefaultHTTPVerb = http.MethodPost )
Variables ¶
This section is empty.
Functions ¶
func RegisterTools ¶
func RegisterTools(server *mcp.Server, client InvokeClient, metrics *telemetry.ToolMetrics)
RegisterTools registers the invoke_service tool on server. metrics may be nil.
Types ¶
type InvokeClient ¶
type InvokeClient interface {
InvokeMethodWithContent(ctx context.Context, appID, methodName, verb string, content *dapr.DataContent) ([]byte, error)
}
InvokeClient defines the interface for service invocation operations.
type InvokeServiceArgs ¶
type InvokeServiceArgs struct {
AppID string `json:"appID" jsonschema:"The Dapr application ID of the service to call (e.g., 'order-processor')."`
Method string `json:"method" jsonschema:"The method/endpoint on the target service to call (e.g., 'status')."`
Data string `json:"data,omitempty" jsonschema:"The body payload for the request, typically a JSON string."`
HTTPVerb string `` /* 127-byte string literal not displayed */
ContentType string `` /* 148-byte string literal not displayed */
Metadata map[string]string `` /* 162-byte string literal not displayed */
}
InvokeServiceArgs are the arguments of the invoke_service tool.