Skip to main content
Glama
cygnussystems

cygnus-ssh-mcp

Official

ssh_conn_verify_sudo

Check if remote sudo or administrator elevation works before running privileged commands, detecting passwordless or password-based access to avoid failed tool calls.

Instructions

Check whether elevated access is available on the remote system, without running any privileged command. Call this before using use_sudo=True on other tools if you're not sure elevation will succeed.

On Linux/macOS: probes whether sudo is available and whether it needs a password (via a passwordless sudo -n check, then a password-based check if that fails). Tools called afterward with use_sudo=True will use whichever mode this detected.

On Windows: there is no per-command elevation - checks whether the current SSH session itself is already running as Administrator. If it's not, no tool call can become elevated; you must reconnect as an Administrator account instead.

Returns: Dictionary with: - available (bool): True if sudo/elevation can be used at all (passwordless OR password-based on Linux/macOS; same as passwordless on Windows, since there's no separate password-based mode there) - passwordless (bool): True if no password is needed (passwordless sudo, or an already-elevated Windows session) - requires_password (bool): True if sudo works but needs a password (always False on Windows)

Long-running calls: if this takes longer than the server's wait cap (default 50s), it
returns {"status": "in_progress", "handle_id": ...} instead of the result - the work keeps
running. Get the result by polling ssh_cmd_check_status(handle_id=...), which returns this
tool's normal response once finished. Do not call it again meanwhile. Only one such
operation runs at a time; another one started meanwhile fails with a 'busy' error.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.3.0

TDQS

A4.8/5.0
Behavior5/5

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

With no annotations, the description carries the full burden and does so well: it guarantees no privileged command is executed, explains platform-specific detection logic (passwordless vs. password-based sudo on Linux/macOS; session-level Administrator check on Windows), documents return semantics, and discloses the long-running/in_progress behavior and busy error. This is unusually rich behavioral disclosure.

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 well front-loaded and organized with clear labels ('On Linux/macOS:', 'On Windows:', 'Returns:', 'Long-running calls:'). It is somewhat long, and the detailed Returns block partially duplicates the existing output schema, but every section still aids correct invocation.

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

Completeness5/5

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

For a zero-parameter, cross-platform capability-check tool with long-running behavior, the description covers purpose, platform-specific semantics, return fields, and timeout/polling mechanics. An agent has everything needed to call it and to handle the in_progress case without consulting other sources.

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

Parameters4/5

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

The tool takes zero parameters, so there are no parameter semantics to add; the baseline for 0 params is 4. The description correctly introduces no parameters and instead documents platform behavior, which is the relevant information here.

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 states a precise verb and resource ('Check whether elevated access is available on the remote system') with an explicit scope constraint ('without running any privileged command'), which clearly distinguishes it from command-running siblings like ssh_cmd_run. An agent can identify it immediately as a pre-flight capability probe rather than an action tool.

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

Usage Guidelines5/5

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

It explicitly says when to call it ('Call this before using use_sudo=True on other tools if you're not sure elevation will succeed') and names the sibling to poll for long-running results (ssh_cmd_check_status(handle_id=...)). It also defines the concurrency limit ('Only one such operation runs at a time'), leaving little to inference.

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