Skip to main content
Glama

task_status

Retrieve details and status of a specific task in the MCP SFTP Orchestrator's persistent queue for monitoring remote server operations.

Instructions

Récupère les détails d'une seule tâche, avec un rappel si nécessaire.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesL'ID de la tâche à consulter.

Implementation Reference

  • The main handler function for the 'task_status' tool. Retrieves the job by ID from the queue, checks if it exists, formats it using formatJobForDisplay, and returns the JSON stringified details.
    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) }] }; }
  • Input schema for the 'task_status' tool using Zod, requiring a single 'id' string parameter.
    inputSchema: z.object({ id: z.string().describe("L'ID de la tâche à consulter.") })
  • server.js:476-492 (registration)
    Registration of the 'task_status' tool on the MCP server, including title, description, input schema, and handler function.
    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) }] }; } );
  • Helper function used by the task_status handler to format the job object for display, adding a reminder message if the reminder time has passed for running jobs.
    function formatJobForDisplay(job) { const displayJob = { ...job }; if (job.status === 'running' && job.reminderAt && new Date() > new Date(job.reminderAt)) { displayJob.reminder = "ATTENTION: Le temps de rappel est écoulé. La tâche est peut-être terminée ou bloquée."; } return displayJob; }

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/fkom13/mcp-sftp-orchestrator'

If you have feedback or need assistance with the MCP directory API, please join our Discord server