Documentation
¶
Index ¶
- Constants
- type GeminiTool
- func (t *GeminiTool) ApplyResponseSizeLimit(output string, logger *logrus.Logger) string
- func (t *GeminiTool) Definition() mcp.Tool
- func (t *GeminiTool) Execute(ctx context.Context, logger *logrus.Logger, cache *sync.Map, ...) (*mcp.CallToolResult, error)
- func (t *GeminiTool) GetMaxResponseSize() int
- func (t *GeminiTool) GetTimeout() int
- func (t *GeminiTool) ProvideExtendedInfo() *tools.ExtendedHelp
Constants ¶
View Source
const ( DefaultTimeout = 300 // 5 minutes default timeout DefaultMaxResponseSize = 2 * 1024 * 1024 // 2MB default limit AgentTimeoutEnvVar = "AGENT_TIMEOUT" AgentMaxResponseSizeEnvVar = "AGENT_MAX_RESPONSE_SIZE" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GeminiTool ¶
type GeminiTool struct{}
GeminiTool implements the tools.Tool interface for the gemini CLI
func (*GeminiTool) ApplyResponseSizeLimit ¶ added in v0.21.1
func (t *GeminiTool) ApplyResponseSizeLimit(output string, logger *logrus.Logger) string
ApplyResponseSizeLimit truncates the response if it exceeds the configured size limit
func (*GeminiTool) Definition ¶
func (t *GeminiTool) Definition() mcp.Tool
Definition returns the tool's definition for MCP registration
func (*GeminiTool) Execute ¶
func (t *GeminiTool) Execute(ctx context.Context, logger *logrus.Logger, cache *sync.Map, args map[string]any) (*mcp.CallToolResult, error)
Execute executes the tool's logic by calling the gemini CLI
func (*GeminiTool) GetMaxResponseSize ¶ added in v0.21.1
func (t *GeminiTool) GetMaxResponseSize() int
GetMaxResponseSize returns the configured maximum response size
func (*GeminiTool) GetTimeout ¶ added in v0.44.0
func (t *GeminiTool) GetTimeout() int
GetTimeout returns the configured timeout or default
func (*GeminiTool) ProvideExtendedInfo ¶ added in v0.22.0
func (t *GeminiTool) ProvideExtendedInfo() *tools.ExtendedHelp
ProvideExtendedInfo provides detailed usage information for the gemini agent tool
Click to show internal directories.
Click to hide internal directories.