MCPcopy
hub / github.com/codeaashu/claude-code / call

Function call

src/tools/TaskUpdateTool/TaskUpdateTool.ts:123–363  ·  view source on GitHub ↗
(
    {
      taskId,
      subject,
      description,
      activeForm,
      status,
      owner,
      addBlocks,
      addBlockedBy,
      metadata,
    },
    context,
  )

Source from the content-addressed store, hash-verified

121 return null
122 },
123 async call(
124 {
125 taskId,
126 subject,
127 description,
128 activeForm,
129 status,
130 owner,
131 addBlocks,
132 addBlockedBy,
133 metadata,
134 },
135 context,
136 ) {
137 const taskListId = getTaskListId()
138
139 // Auto-expand task list when updating tasks
140 context.setAppState(prev => {
141 if (prev.expandedView === 'tasks') return prev
142 return { ...prev, expandedView: 'tasks' as const }
143 })
144
145 // Check if task exists
146 const existingTask = await getTask(taskListId, taskId)
147 if (!existingTask) {
148 return {
149 data: {
150 success: false,
151 taskId,
152 updatedFields: [],
153 error: 'Task not found',
154 },
155 }
156 }
157
158 const updatedFields: string[] = []
159
160 // Update basic fields if provided and different from current value
161 const updates: {
162 subject?: string
163 description?: string
164 activeForm?: string
165 status?: TaskStatus
166 owner?: string
167 metadata?: Record<string, unknown>
168 } = {}
169 if (subject !== undefined && subject !== existingTask.subject) {
170 updates.subject = subject
171 updatedFields.push('subject')
172 }
173 if (description !== undefined && description !== existingTask.description) {
174 updates.description = description
175 updatedFields.push('description')
176 }
177 if (activeForm !== undefined && activeForm !== existingTask.activeForm) {
178 updates.activeForm = activeForm
179 updatedFields.push('activeForm')
180 }

Callers

nothing calls this directly

Calls 15

getTaskListIdFunction · 0.85
getTaskFunction · 0.85
isAgentSwarmsEnabledFunction · 0.85
getAgentNameFunction · 0.85
deleteTaskFunction · 0.85
getTeamNameFunction · 0.85
updateTaskFunction · 0.85
writeToMailboxFunction · 0.85
blockTaskFunction · 0.85
featureFunction · 0.85

Tested by

no test coverage detected