MCPcopy Create free account
hub / github.com/Noumena-Network/code / validateInput

Function validateInput

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

Source from the content-addressed store, hash-verified

202- Works with all task types: background shells, async agents, and remote sessions`;
203 },
204 async validateInput({
205 task_id
206 }, {
207 getAppState
208 }) {
209 if (!task_id) {
210 return {
211 result: false,
212 message: 'Task ID is required',
213 errorCode: 1
214 };
215 }
216 const appState = getAppState();
217 const task = appState.tasks?.[task_id] as TaskState | undefined;
218 if (!task) {
219 return {
220 result: false,
221 message: `No task found with ID: ${task_id}`,
222 errorCode: 2
223 };
224 }
225 return {
226 result: true
227 };
228 },
229 async call(input: TaskOutputToolInput, toolUseContext, _canUseTool, _parentMessage, onProgress) {
230 const {
231 task_id,

Callers

nothing calls this directly

Calls 1

getAppStateFunction · 0.50

Tested by

no test coverage detected