Skip to main content
Glama
dam2452

vastai-mcp

by dam2452

ssh_exec

Execute arbitrary commands on a running Vast.ai instance over SSH. Resolves host and port automatically while keeping your private key secure locally.

Instructions

Execute a command on a running instance over SSH (paramiko).

Resolves the instance's ssh_host/ssh_port automatically. The private key stays local — never sent to the Vast.ai API.

key_path defaults to the VASTAI_MCP_SSH_KEY_PATH env var if set.

Examples: ssh_exec(instance_id=12345, command="nvidia-smi") ssh_exec(instance_id=12345, command="ls /workspace", key_path="/home/me/.ssh/id_ed25519") ssh_exec(instance_id=12345, command="python train.py", user="root", timeout=300)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
userNoroot
commandYes
timeoutNo
key_pathNo
instance_idYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior4/5

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

No annotations are present, so the description carries the full burden. It discloses key non-obvious behaviors: automatic host/port resolution, private key never sent to the API, and key_path falling back to VASTAI_MCP_SSH_KEY_PATH env var. It does not detail failure modes or return formats, but an output schema exists to cover returns.

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 compact and front-loaded with the core purpose, followed by a short security note and three illustrative examples. Every sentence adds value; no fluff or redundancy.

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

Completeness4/5

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

For a tool with no annotations, the description covers authentication, connection resolution, and key path defaults, and the output schema handles return value documentation. It gives examples for common commands but does not discuss shell environment or failure behavior, which would be nice but not essential.

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?

Schema description coverage is 0%, so the description compensates. Three examples illustrate all five parameters, and it explicitly explains key_path's env-var default. It does not explicitly state timeout units or null key_path behavior in prose, but the examples and schema defaults provide adequate meaning.

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?

Description opens with 'Execute a command on a running instance over SSH (paramiko)', clearly identifying the action, resource, and transport. It distinguishes itself from sibling tools like ssh_transfer (file transfer) and execute_command (potentially API-based) by emphasizing direct SSH command execution.

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

Usage Guidelines4/5

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

The description provides clear context: it automatically resolves ssh_host/ssh_port, requires a local private key, and includes practical examples. It does not explicitly name alternative tools or state when not to use it, but the 'over SSH' qualifier and examples supply enough situational guidance.

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/dam2452/vastai-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server