Documentation
¶
Index ¶
- Variables
- func RegisterTools(server *mcp.Server, specData []byte, client *http.Client, ...) error
- func ResolveSecretReference(ctx context.Context, value string) (string, bool, error)
- func RetryableClient(opts RetryableClientOptions) (*http.Client, error)
- type HeaderTransport
- type RegisterToolsOption
- type RetryableClientOptions
Constants ¶
This section is empty.
Variables ¶
var ( // Command is a variable that allows overriding the command creation for testing CommandContext = exec.CommandContext // LookPath is a variable that allows overriding the lookup behavior for testing LookPath = exec.LookPath )
Functions ¶
func RegisterTools ¶ added in v0.6.0
func RegisterTools(server *mcp.Server, specData []byte, client *http.Client, opts ...RegisterToolsOption) error
RegisterTools parses the given OpenAPI specification and registers tools on the provided MCP server. All HTTP calls are executed using the provided http.Client. If the client is nil, http.DefaultClient is used. By default, REST-aware MCP ToolAnnotations are attached to each tool. Pass options to change behavior.
func ResolveSecretReference ¶
ResolveSecretReference attempts to resolve a 1Password secret reference (e.g. op://vault/item/field) Returns the resolved value and whether it was a secret reference
func RetryableClient ¶
func RetryableClient(opts RetryableClientOptions) (*http.Client, error)
RetryableClient returns a new http.Client with a retryablehttp.Client configured per opts.
Types ¶
type HeaderTransport ¶
type HeaderTransport struct {
Base http.RoundTripper
Headers http.Header
}
HeaderTransport is a custom RoundTripper that adds default headers to requests
type RegisterToolsOption ¶ added in v0.6.1
type RegisterToolsOption func(*registerToolsConfig)
RegisterToolsOption configures RegisterTools behavior.
func WithoutAnnotations ¶ added in v0.6.1
func WithoutAnnotations() RegisterToolsOption
WithoutAnnotations disables attaching REST-aware MCP ToolAnnotations for generated tools.