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

Function NewAgentTool

agent/agent_tool.go:33–43  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

31type AgentTool struct{ coretools.BaseTool }
32
33func NewAgentTool() *AgentTool {
34 return &AgentTool{BaseTool: coretools.BaseTool{Spec: coretools.ToolSpec{
35 Name: "Agent",
36 Description: "Launch a new agent to handle complex, multi-step tasks.\n\nAvailable agent types:\n- general-purpose: all tools.\n- Explore: read-only code search.\n- Plan: read-only implementation planning.\n- Coordinator: task orchestration only. Always use run_in_background=true when spawning workers. Never use sync mode. Use TaskWait to wait for workers. Never busy-poll with repeated TaskList calls. Use TaskList and TaskGet for inspection and result retrieval only. After all target workers settle, synthesize their results into one final answer. Workers are automatically isolated via git worktrees.\n- docs-lookup: documentation lookup.",
37 InputPrototype: AgentInput{},
38 TimeoutSeconds: AgentToolDefaultHardTimeoutSeconds,
39 ReadOnly: coretools.BoolPtr(false),
40 ConcurrencySafe: coretools.BoolPtr(true),
41 Destructive: coretools.BoolPtr(false),
42 }}}
43}
44
45func (t *AgentTool) ValidateInput(_ coretools.ExecutionContext, input any) (bool, string) {
46 in := derefAgentInput(input)

Calls

no outgoing calls