Skip to main content
Glama
fkom13

MCP SFTP Orchestrator

by fkom13

Obtenir le statut de Fail2Ban

get_fail2ban_status

Check Fail2Ban service status to monitor intrusion prevention across all jails or specific ones like sshd. Retrieve ban counts and active status for security oversight.

Instructions

Récupère les informations du service Fail2Ban, pour toutes les jails ou une jail spécifique.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
aliasYesAlias du serveur cible.
jailNoNom d'une jail spécifique à inspecter (ex: sshd). Laissez vide pour un statut général.

Implementation Reference

  • Handler function executes 'sudo fail2ban-client status' command on the specified server via SSH queue, returns raw output or error.
        async (params) => {
            try {
                const cmd = `sudo fail2ban-client status ${params.jail || ''}`.trim();
                const job = queue.addJob({
                    type: 'ssh',
                    alias: params.alias,
                    cmd: cmd
                });
                ssh.executeCommand(job.id);
                const result = await waitForJobCompletion(job.id, config.syncTimeout);
    
                if (!result || result.status !== 'completed') {
                    throw new Error(result ? result.error : `Timeout de la commande de monitoring pour ${params.alias}`);
                }
    
                // Pour cette version, nous retournons la sortie brute.
                return { content: [{ type: "text", text: result.output }] };
            } catch (e) {
                const errorPayload = {
                    toolName: "get_fail2ban_status",
                    errorCode: "MONITORING_ERROR",
                    errorMessage: e.message
                };
                return { content: [{ type: "text", text: JSON.stringify(errorPayload, null, 2) }], isError: true };
            }
        }
    );
  • Input schema using Zod: requires server alias, optional jail name.
    {
        title: "Obtenir le statut de Fail2Ban",
        description: "Récupère les informations du service Fail2Ban, pour toutes les jails ou une jail spécifique.",
        inputSchema: z.object({
            alias: z.string().describe("Alias du serveur cible."),
            jail: z.string().optional().describe("Nom d'une jail spécifique à inspecter (ex: sshd). Laissez vide pour un statut général.")
        })
    },
  • server.js:341-341 (registration)
    Registration of the tool via server.registerTool, including name, schema, and handler.
    server.registerTool(
Behavior2/5

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

No annotations are provided, so the description carries the full burden. It states it retrieves information, implying a read-only operation, but doesn't disclose behavioral traits such as whether it requires specific permissions, potential rate limits, error conditions, or the format of returned data. The description is minimal and lacks context beyond the basic action.

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 a single, efficient sentence that front-loads the purpose and includes key usage details. There is no wasted language, and it effectively communicates the tool's scope in a compact form.

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 tool's moderate complexity (2 parameters, no output schema, no annotations), the description is minimally adequate. It covers the basic purpose and parameter intent but lacks details on behavior, output format, or integration with sibling tools. For a monitoring tool with no annotations, more context would be beneficial.

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 clear descriptions for both parameters (alias and jail). The description adds marginal value by clarifying that leaving jail empty gives a general status, but doesn't provide additional semantics beyond what the schema already covers, such as examples of jail names or alias usage.

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 the resource 'informations du service Fail2Ban', specifying it can be for all jails or a specific one. It distinguishes from siblings like get_services_status by focusing on Fail2Ban, but doesn't explicitly contrast with other monitoring tools like get_docker_logs or get_system_resources.

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 by mentioning 'pour toutes les jails ou une jail spécifique' (for all jails or a specific jail), which suggests when to use the jail parameter. However, it doesn't provide explicit guidance on when to choose this tool over alternatives like get_services_status or other monitoring siblings, nor does it mention prerequisites or exclusions.

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