invoke

package
v0.0.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 13, 2026 License: Apache-2.0 Imports: 13 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package invoke exposes Dapr service invocation as an MCP tool.

Index

Constants

View Source
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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL