think

package
v0.55.2 Latest Latest
Warning

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

Go to latest
Published: Dec 1, 2025 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// DefaultMaxThoughtLength is the default maximum length for thought input
	DefaultMaxThoughtLength = 2000
	// ThinkMaxLengthEnvVar is the environment variable for configuring max thought length
	ThinkMaxLengthEnvVar = "THINK_MAX_LENGTH"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ThinkRequest

type ThinkRequest struct {
	Thought string `json:"thought"`
	HowHard string `json:"how_hard"`
}

ThinkRequest represents the input parameters for the think tool

type ThinkResponse

type ThinkResponse struct {
	Thought   string    `json:"thought"`
	Timestamp time.Time `json:"timestamp"`
}

ThinkResponse represents the output of the think tool

type ThinkTool

type ThinkTool struct{}

ThinkTool implements a simple thinking tool for structured reasoning

func (*ThinkTool) Definition

func (t *ThinkTool) Definition() mcp.Tool

Definition returns the tool's definition for MCP registration

func (*ThinkTool) Execute

func (t *ThinkTool) Execute(ctx context.Context, logger *logrus.Logger, cache *sync.Map, args map[string]any) (*mcp.CallToolResult, error)

Execute executes the think tool

Jump to

Keyboard shortcuts

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