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

Function validateInput

src/tools/TaskOutputTool/TaskOutputTool.tsx:183–207  ·  view source on GitHub ↗
({
    task_id
  }, {
    getAppState
  })

Source from the content-addressed store, hash-verified

181- Works with all task types: background shells, async agents, and remote sessions`;
182 },
183 async validateInput({
184 task_id
185 }, {
186 getAppState
187 }) {
188 if (!task_id) {
189 return {
190 result: false,
191 message: 'Task ID is required',
192 errorCode: 1
193 };
194 }
195 const appState = getAppState();
196 const task = appState.tasks?.[task_id] as TaskState | undefined;
197 if (!task) {
198 return {
199 result: false,
200 message: `No task found with ID: ${task_id}`,
201 errorCode: 2
202 };
203 }
204 return {
205 result: true
206 };
207 },
208 async call(input: TaskOutputToolInput, toolUseContext, _canUseTool, _parentMessage, onProgress) {
209 const {
210 task_id,

Callers

nothing calls this directly

Calls 1

getAppStateFunction · 0.50

Tested by

no test coverage detected