Skip to main content
Glama
fkom13

MCP SFTP Orchestrator

by fkom13

Transférer un fichier ou dossier (SFTP)

task_transfer

Initiates SFTP file transfers between local and remote servers, handling short tasks immediately and queuing longer transfers for background processing.

Instructions

Lance un transfert SFTP. Si la tâche prend moins de 30s, le résultat est direct. Sinon, elle passe en arrière-plan.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
aliasYesAlias du serveur cible.
directionYes
localYesChemin absolu local.
remoteYesChemin absolu distant.
rappelNoDéfinit un rappel en secondes.

Implementation Reference

  • Handler function that creates an SFTP transfer job, logs it, executes the transfer via sftp module, waits for synchronous completion or reports background execution.
        async (params) => {
            const job = queue.addJob({ type: 'sftp', ...params, status: 'pending' });
            history.logTask(job);
            sftp.executeTransfer(job.id);
    
            const finalJob = await waitForJobCompletion(job.id, config.syncTimeout);
            if (finalJob) {
                return { content: [{ type: "text", text: `Résultat direct (tâche ${finalJob.id}):
    ${JSON.stringify(finalJob, null, 2)}` }] };
            } else {
                return { content: [{ type: "text", text: `Tâche de transfert ${job.id} initiée en arrière-plan.` }] };
            }
        }
  • Tool metadata including title, description, and input schema using Zod for validation of parameters: alias, direction (upload/download), local path, remote path, optional rappel.
    {
        title: "Transférer un fichier ou dossier (SFTP)",
                    description: `Lance un transfert SFTP. Si la tâche prend moins de ${config.syncTimeout / 1000}s, le résultat est direct. Sinon, elle passe en arrière-plan.`, 
                    inputSchema: z.object({
                        alias: z.string().describe("Alias du serveur cible."),
                    direction: z.enum(['upload', 'download']),
                    local: z.string().describe("Chemin absolu local."),
                    remote: z.string().describe("Chemin absolu distant."),
                    rappel: z.number().optional().describe("Définit un rappel en secondes.")
                    })
    },
  • server.js:398-423 (registration)
    Registration of the 'task_transfer' tool using server.registerTool, including schema and inline handler function.
    server.registerTool(
        "task_transfer",
        {
            title: "Transférer un fichier ou dossier (SFTP)",
                        description: `Lance un transfert SFTP. Si la tâche prend moins de ${config.syncTimeout / 1000}s, le résultat est direct. Sinon, elle passe en arrière-plan.`, 
                        inputSchema: z.object({
                            alias: z.string().describe("Alias du serveur cible."),
                        direction: z.enum(['upload', 'download']),
                        local: z.string().describe("Chemin absolu local."),
                        remote: z.string().describe("Chemin absolu distant."),
                        rappel: z.number().optional().describe("Définit un rappel en secondes.")
                        })
        },
        async (params) => {
            const job = queue.addJob({ type: 'sftp', ...params, status: 'pending' });
            history.logTask(job);
            sftp.executeTransfer(job.id);
    
            const finalJob = await waitForJobCompletion(job.id, config.syncTimeout);
            if (finalJob) {
                return { content: [{ type: "text", text: `Résultat direct (tâche ${finalJob.id}):
    ${JSON.stringify(finalJob, null, 2)}` }] };
            } else {
                return { content: [{ type: "text", text: `Tâche de transfert ${job.id} initiée en arrière-plan.` }] };
            }
        }
Behavior4/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It effectively describes key behavioral traits: the 30-second threshold for direct vs. background execution and the task-based nature of the operation. However, it lacks details on error handling, authentication requirements, or rate limits.

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

Conciseness5/5

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

The description is extremely concise—two sentences that efficiently convey the core functionality and execution behavior. Every word earns its place, with no redundant or vague phrasing, making it easy to parse and understand quickly.

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

Completeness3/5

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

Given the complexity of an SFTP transfer tool with 5 parameters and no output schema, the description is minimally adequate. It covers the basic operation and execution mode but lacks details on return values, error conditions, or advanced usage scenarios, leaving gaps for an AI agent to infer.

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 80%, providing a solid baseline. The description adds no additional parameter semantics beyond what the schema already documents (e.g., alias for target server, direction with enum values). It does not explain parameter interactions or usage examples, so it meets but does not exceed the baseline.

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

Purpose5/5

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

The description clearly states the specific action ('Lance un transfert SFTP') and resource ('un fichier ou dossier'), distinguishing it from sibling tools like task_exec or task_transfer_multi. It precisely defines what the tool does without being tautological.

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

Usage Guidelines3/5

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

The description implies usage for SFTP file transfers but provides no explicit guidance on when to use this tool versus alternatives like task_transfer_multi. No prerequisites, exclusions, or comparisons to sibling tools are mentioned, leaving usage context incomplete.

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