MCPcopy Create free account
hub / github.com/GongShichen/LuminaCode / Tool

Interface Tool

tools/base.go:34–60  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

32 ToolUseID string `json:"tool_use_id"`
33 Content string `json:"content"`
34 IsError bool `json:"is_error"`
35}
36
37type Tool interface {
38 Name() string
39 Description() string
40 InputPrototype() any
41 Aliases() []string
42 DeprecatedAliases() map[string]string
43
44 DecodeInput(raw map[string]any) (any, error)
45 ValidateInput(ctx ExecutionContext, input any) (bool, string)
46 Execute(ctx context.Context, execCtx ExecutionContext, input any) (string, error)
47
48 IsReadOnly(input any) bool
49 IsConcurrencySafe(input any) bool
50 NeedsPermission(input any) bool
51 IsDestructive(input any) bool
52 HasCommandClassifier() bool
53 ConfirmsFilePaths() bool
54 SupportsSiblingAbort() bool
55 IsEnabled() bool
56
57 Timeout() time.Duration
58 MaxOutputChars() int
59 ShouldDefer() bool
60 SearchHint() string
61 FormatLargeResult(ctx context.Context, content string, maxChars int, toolUseID, sessionDir string) (string, error)
62 ToAPISchema() map[string]any
63}

Callers 64

mcpRowsFromRegistryFunction · 0.65
AddMethod · 0.65
deferredToolScoreFunction · 0.65
handleToolSearchQueryFunction · 0.65
RegisterMethod · 0.65
FilteredCopyMethod · 0.65
ActivateToolMethod · 0.65
GetAPISchemasFilteredMethod · 0.65
handleToolSearchSelectFunction · 0.65
handleToolSearchQueryFunction · 0.65
ToAPISchemaMethod · 0.65
MCPToolsMethod · 0.65

Implementers 1

BaseTooltools/base.go

Calls

no outgoing calls

Tested by

no test coverage detected