Skip to main content
Glama
fkom13

MCP SFTP Orchestrator

by fkom13

Exécuter une commande interactive (SSH)

task_exec_interactive

Execute SSH commands with interactive prompt handling for yes/no, password, and custom responses in remote server management.

Instructions

Exécute une commande SSH avec gestion des prompts interactifs (yes/no, passwords, etc.).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
aliasYesAlias du serveur cible.
cmdYesLa commande à exécuter.
interactiveNoMode interactif.
autoRespondNoRépondre automatiquement aux prompts standards.
responsesNoRéponses personnalisées aux prompts (clé: pattern, valeur: réponse).
timeoutNoTimeout personnalisé en secondes. Défaut 2 minutes.
rappelNoDéfinit un rappel en secondes.

Implementation Reference

  • Handler function that queues an interactive SSH job using the queue system, executes it via ssh.executeCommand, and returns the result or background status after waiting for completion.
    async (params) => {
        const job = queue.addJob({ 
            type: 'ssh', 
            ...params, 
            status: 'pending',
            interactive: params.interactive,
            autoRespond: params.autoRespond
        });
        history.logTask(job);
        ssh.executeCommand(job.id);
    
        const finalJob = await waitForJobCompletion(job.id, params.timeout || config.syncTimeout);
        if (finalJob) {
            return { content: [{ type: "text", text: `Résultat commande interactive (tâche ${finalJob.id}):\n${finalJob.output || JSON.stringify(finalJob, null, 2)}` }] };
        } else {
            return { content: [{ type: "text", text: `Tâche interactive ${job.id} initiée en arrière-plan.` }] };
        }
    }
  • Zod input schema defining parameters for the interactive SSH execution tool, including server alias, command, interactive mode, auto-respond, custom responses, timeout, and reminder.
    {
        title: "Exécuter une commande interactive (SSH)",
        description: "Exécute une commande SSH avec gestion des prompts interactifs (yes/no, passwords, etc.).",
        inputSchema: z.object({
            alias: z.string().describe("Alias du serveur cible."),
            cmd: z.string().describe("La commande à exécuter."),
            interactive: z.boolean().optional().default(true).describe("Mode interactif."),
            autoRespond: z.boolean().optional().default(true).describe("Répondre automatiquement aux prompts standards."),
            responses: z.record(z.string()).optional().describe("Réponses personnalisées aux prompts (clé: pattern, valeur: réponse)."),
            timeout: z.number().optional().describe("Timeout personnalisé en secondes. Défaut 2 minutes."),
            rappel: z.number().optional().describe("Définit un rappel en secondes.")
        })
  • server.js:545-578 (registration)
    MCP server registration of the 'task_exec_interactive' tool, including schema and inline handler function.
    server.registerTool(
        "task_exec_interactive",
        {
            title: "Exécuter une commande interactive (SSH)",
            description: "Exécute une commande SSH avec gestion des prompts interactifs (yes/no, passwords, etc.).",
            inputSchema: z.object({
                alias: z.string().describe("Alias du serveur cible."),
                cmd: z.string().describe("La commande à exécuter."),
                interactive: z.boolean().optional().default(true).describe("Mode interactif."),
                autoRespond: z.boolean().optional().default(true).describe("Répondre automatiquement aux prompts standards."),
                responses: z.record(z.string()).optional().describe("Réponses personnalisées aux prompts (clé: pattern, valeur: réponse)."),
                timeout: z.number().optional().describe("Timeout personnalisé en secondes. Défaut 2 minutes."),
                rappel: z.number().optional().describe("Définit un rappel en secondes.")
            })
        },
        async (params) => {
            const job = queue.addJob({ 
                type: 'ssh', 
                ...params, 
                status: 'pending',
                interactive: params.interactive,
                autoRespond: params.autoRespond
            });
            history.logTask(job);
            ssh.executeCommand(job.id);
    
            const finalJob = await waitForJobCompletion(job.id, params.timeout || config.syncTimeout);
            if (finalJob) {
                return { content: [{ type: "text", text: `Résultat commande interactive (tâche ${finalJob.id}):\n${finalJob.output || JSON.stringify(finalJob, null, 2)}` }] };
            } else {
                return { content: [{ type: "text", text: `Tâche interactive ${job.id} initiée en arrière-plan.` }] };
            }
        }
    );
Behavior2/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 mentions interactive prompt handling but lacks critical details: whether this executes commands remotely via SSH, what permissions are required, if it's read-only or destructive, error handling, or output format. For a tool with 7 parameters and no annotations, this is insufficient behavioral context.

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 - a single sentence that efficiently communicates the core functionality. It's front-loaded with the main purpose and includes a helpful parenthetical example of prompt types. Every word earns its place with zero redundancy.

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?

For a complex SSH execution tool with 7 parameters, no annotations, and no output schema, the description is incomplete. It doesn't explain what the tool returns, how SSH connections are established, authentication requirements, error conditions, or how it differs from sibling tools. The single-sentence description is insufficient for the tool's complexity and lack of supporting structured data.

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%, so all parameters are documented in the schema. The description doesn't add any parameter-specific information beyond what's already in the schema descriptions. It mentions interactive prompts generally, which relates to parameters like 'interactive', 'autoRespond', and 'responses', but provides no additional semantic context. Baseline 3 is appropriate when schema does the heavy lifting.

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 tool's purpose: 'Exécute une commande SSH avec gestion des prompts interactifs'. It specifies the verb ('exécute'), resource ('commande SSH'), and key capability ('gestion des prompts interactifs'). However, it doesn't explicitly differentiate from sibling tools like 'task_exec' or 'task_exec_sequence', which likely have related functionality.

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 usage guidance. It mentions handling interactive prompts (yes/no, passwords, etc.), which implies use cases requiring user interaction, but doesn't specify when to choose this tool over alternatives like 'task_exec' or 'task_exec_sequence'. No explicit when-not-to-use scenarios or prerequisites are provided.

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