Skip to main content
Glama
fkom13

MCP SFTP Orchestrator

by fkom13

Consulter une tâche par son ID

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;
    }
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries full burden but only mentions 'avec un rappel si nécessaire' as behavioral context. It lacks details on permissions, rate limits, error handling, or what 'rappel' entails (e.g., notification type). This is insufficient for a tool with potential side effects like reminders.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that front-loads the core purpose. However, the vague phrase 'avec un rappel si nécessaire' adds minimal value and could be more precise, slightly reducing conciseness.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given no annotations and no output schema, the description is incomplete. It doesn't explain what details are returned (e.g., status, metadata) or the reminder mechanism, leaving significant gaps for a tool that retrieves task details and potentially triggers reminders.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, with the single parameter 'id' fully documented in the schema. The description adds no additional parameter semantics beyond what the schema provides, so it meets the baseline score of 3 without compensating value.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb ('Récupère' - retrieves) and resource ('détails d'une seule tâche' - details of a single task), making the purpose specific. However, it doesn't explicitly differentiate from sibling tools like 'task_history' or 'task_logs' which might also retrieve task-related information, preventing a perfect score.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides minimal guidance with 'avec un rappel si nécessaire' (with a reminder if necessary), which hints at optional behavior but doesn't clarify when to use this tool versus alternatives like 'task_history' or 'task_logs'. No explicit when/when-not rules or sibling comparisons are included.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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