MCPcopy Create free account
hub / github.com/docker/docker-agent / Tools

Method Tools

pkg/tools/builtin/shell/shell.go:596–648  ·  view source on GitHub ↗
(context.Context)

Source from the content-addressed store, hash-verified

594}
595
596func (t *ToolSet) Tools(context.Context) ([]tools.Tool, error) {
597 return []tools.Tool{
598 {
599 Name: ToolNameShell,
600 Category: "shell",
601 Description: `Executes the given shell command in the user's default shell.`,
602 Parameters: tools.MustSchemaFor[RunShellArgs](),
603 OutputSchema: tools.MustSchemaFor[string](),
604 Handler: tools.NewHandler(t.handler.RunShell),
605 Annotations: tools.ToolAnnotations{Title: "Shell"},
606 AddDescriptionParameter: true,
607 },
608 {
609 Name: ToolNameRunShellBackground,
610 Category: "shell",
611 Description: `Starts a shell command in the background and returns immediately with a job ID. Use this for long-running processes like servers, watches, or any command that should run while other tasks are performed.`,
612 Parameters: tools.MustSchemaFor[RunShellBackgroundArgs](),
613 OutputSchema: tools.MustSchemaFor[string](),
614 Handler: tools.NewHandler(t.handler.RunShellBackground),
615 Annotations: tools.ToolAnnotations{Title: "Background Job"},
616 AddDescriptionParameter: true,
617 },
618 {
619 Name: ToolNameListBackgroundJobs,
620 Category: "shell",
621 Description: `Lists all background jobs with their status, runtime, and other information.`,
622 OutputSchema: tools.MustSchemaFor[string](),
623 Handler: tools.NewHandler(t.handler.ListBackgroundJobs),
624 Annotations: tools.ToolAnnotations{Title: "List Background Jobs", ReadOnlyHint: true},
625 AddDescriptionParameter: true,
626 },
627 {
628 Name: ToolNameViewBackgroundJob,
629 Category: "shell",
630 Description: `Views the output and status of a specific background job by job ID.`,
631 Parameters: tools.MustSchemaFor[ViewBackgroundJobArgs](),
632 OutputSchema: tools.MustSchemaFor[string](),
633 Handler: tools.NewHandler(t.handler.ViewBackgroundJob),
634 Annotations: tools.ToolAnnotations{Title: "View Background Job Output", ReadOnlyHint: true},
635 AddDescriptionParameter: true,
636 },
637 {
638 Name: ToolNameStopBackgroundJob,
639 Category: "shell",
640 Description: `Stops a running background job by job ID. The process and all its child processes will be terminated.`,
641 Parameters: tools.MustSchemaFor[StopBackgroundJobArgs](),
642 OutputSchema: tools.MustSchemaFor[string](),
643 Handler: tools.NewHandler(t.handler.StopBackgroundJob),
644 Annotations: tools.ToolAnnotations{Title: "Stop Background Job"},
645 AddDescriptionParameter: true,
646 },
647 }, nil
648}
649
650// SetElicitationHandler wires the runtime's elicitation handler into the shell
651// toolset. It is used by the sudo askpass flow to prompt the user for their

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