task_status
Retrieve details and status of a specific task within the MCP SFTP Orchestrator server to monitor execution progress and manage queued operations.
Instructions
Récupère les détails d'une seule tâche, avec un rappel si nécessaire.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | L'ID de la tâche à consulter. |
Implementation Reference
- server.js:485-491 (handler)The handler function for 'task_status' tool. It retrieves a job by ID from the queue, handles missing job error, formats the job for display, and returns it as JSON text content.async (params) => { const job = queue.getJob(params.id); if (!job) return { content: [{ type: "text", text: `ERREUR: Tâche '${params.id}' introuvable.` }], isError: true }; const displayJob = formatJobForDisplay(job); return { content: [{ type: "text", text: JSON.stringify(displayJob, null, 2) }] }; }
- server.js:478-484 (schema)The input schema for 'task_status' tool, defining a required 'id' string parameter.{ title: "Consulter une tâche par son ID", description: "Récupère les détails d'une seule tâche, avec un rappel si nécessaire.", inputSchema: z.object({ id: z.string().describe("L'ID de la tâche à consulter.") }) },
- server.js:476-492 (registration)The registration of the 'task_status' tool using server.registerTool, including schema and inline handler.server.registerTool( "task_status", { title: "Consulter une tâche par son ID", description: "Récupère les détails d'une seule tâche, avec un rappel si nécessaire.", inputSchema: z.object({ id: z.string().describe("L'ID de la tâche à consulter.") }) }, async (params) => { const job = queue.getJob(params.id); if (!job) return { content: [{ type: "text", text: `ERREUR: Tâche '${params.id}' introuvable.` }], isError: true }; const displayJob = formatJobForDisplay(job); return { content: [{ type: "text", text: JSON.stringify(displayJob, null, 2) }] }; } );