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

Function NewTaskGetTool

agent/agent_tool.go:324–337  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

322}
323
324func NewTaskGetTool() coretools.Tool {
325 return newTaskTool("TaskGet", "Get the latest details for one direct child task by task_id, including status, result text, error text, usage, and lifecycle metadata.", TaskGetInput{}, func(_ context.Context, execCtx coretools.ExecutionContext, input any) (string, error) {
326 rt, scope, err := runtimeAndScope(execCtx)
327 if err != "" {
328 return err, nil
329 }
330 in := derefTaskGet(input)
331 record := rt.GetTask(in.TaskID, scope)
332 if record == nil {
333 return fmt.Sprintf("Error: Task '%s' was not found in the current scope.", in.TaskID), nil
334 }
335 return jsonString(serializeTaskPayload(record.ToMap())), nil
336 })
337}
338
339func NewTaskWaitTool() coretools.Tool {
340 return newTaskTool("TaskWait", "Block without busy-polling until all specified direct child tasks reach a stable state, or until timeout_seconds elapses.", TaskWaitInput{}, func(ctx context.Context, execCtx coretools.ExecutionContext, input any) (string, error) {

Calls 7

newTaskToolFunction · 0.85
runtimeAndScopeFunction · 0.85
derefTaskGetFunction · 0.85
jsonStringFunction · 0.85
serializeTaskPayloadFunction · 0.85
GetTaskMethod · 0.80
ToMapMethod · 0.45