MCPcopy Index your code
hub / github.com/docker/docker-agent / Tools

Method Tools

pkg/tools/builtin/deferred/deferred.go:171–207  ·  view source on GitHub ↗
(context.Context)

Source from the content-addressed store, hash-verified

169}
170
171func (d *ToolSet) Tools(context.Context) ([]tools.Tool, error) {
172 d.mu.RLock()
173 defer d.mu.RUnlock()
174
175 result := []tools.Tool{
176 {
177 Name: ToolNameSearchTool,
178 Category: "deferred",
179 Description: "Search for available deferred tools by name or description. Use this to discover tools that can be activated.",
180 Parameters: tools.MustSchemaFor[SearchToolArgs](),
181 OutputSchema: tools.MustSchemaFor[string](),
182 Handler: tools.NewHandler(d.handleSearchTool),
183 Annotations: tools.ToolAnnotations{
184 Title: "Search Tool",
185 ReadOnlyHint: true,
186 },
187 },
188 {
189 Name: ToolNameAddTool,
190 Category: "deferred",
191 Description: "Activate a deferred tool by name, making it available for use. Use search_tool first to find available tools.",
192 Parameters: tools.MustSchemaFor[AddToolArgs](),
193 OutputSchema: tools.MustSchemaFor[string](),
194 Handler: tools.NewHandler(d.handleAddTool),
195 Annotations: tools.ToolAnnotations{
196 Title: "Add Tool",
197 ReadOnlyHint: true,
198 },
199 },
200 }
201
202 for _, tool := range d.activatedTools {
203 result = append(result, tool)
204 }
205
206 return result, nil
207}
208
209func (d *ToolSet) Start(ctx context.Context) error {
210 // Note: we are not responsible for starting the underlying toolsets here

Callers

nothing calls this directly

Implementers 15

StartableToolSetpkg/tools/startable.go
fakeToolSetpkg/tools/named_test.go
stubDescriberpkg/tools/startable_test.go
stubToolSetpkg/tools/startable_test.go
flappyToolSetpkg/tools/startable_test.go
listFlappyToolSetpkg/tools/startable_test.go
reportingToolSetpkg/tools/startable_test.go
reportingStartOnlyToolSetpkg/tools/startable_test.go
recoveryFailingToolSetpkg/tools/startable_test.go
codeModeToolpkg/tools/codemode/codemode.go
testToolSetpkg/tools/codemode/codemode_test.go
Toolsetpkg/tools/a2a/a2a.go

Calls 1

NewHandlerFunction · 0.92

Tested by

no test coverage detected