MCPcopy Create free account
hub / github.com/modelcontextprotocol/typescript-sdk / createTask

Function createTask

test/client/index.test.ts:2377–2388  ·  view source on GitHub ↗
(_args, extra)

Source from the content-addressed store, hash-verified

2375 },
2376 {
2377 async createTask(_args, extra) {
2378 const task = await extra.taskStore.createTask({
2379 ttl: extra.taskRequestedTtl
2380 });
2381
2382 const result = {
2383 content: [{ type: 'text', text: 'Tool executed successfully!' }]
2384 };
2385 await extra.taskStore.storeTaskResult(task.taskId, 'completed', result);
2386
2387 return { task };
2388 },
2389 async getTask(_args, extra) {
2390 const task = await extra.taskStore.getTask(extra.taskId);
2391 if (!task) {

Callers

nothing calls this directly

Calls 2

createTaskMethod · 0.65
storeTaskResultMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…