Help us shape the future of Go! Take the 2026 Go Developer Survey

toolmiddleware

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package toolmiddleware shares tool wrappers and invocation metadata between agent middleware and tool execution.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CallIDFromContext

func CallIDFromContext(ctx context.Context) (string, bool)

CallIDFromContext returns the call ID for the current tool invocation.

func WithCallID

func WithCallID(ctx context.Context, callID string) context.Context

WithCallID associates the current tool invocation's call ID with ctx.

Types

type Wrapper

type Wrapper func(tool.FuncTool) tool.FuncTool

Wrapper is an internal run option applied by tool execution to each function tool, independently of how the tool was registered.

func (Wrapper) MAFValue

func (w Wrapper) MAFValue() any

MAFValue implements agent.Option without depending on the agent package.

Jump to

Keyboard shortcuts

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