Skip to main content
Glama
dam2452

vastai-mcp

by dam2452

execute_command

Execute a whitelisted command on a stopped Vast.ai instance, like listing workspace files to check setup. Only for stopped instances; for running instances, use SSH instead.

Instructions

Execute a constrained remote command on a STOPPED instance (PUT /instances/command/{id}/).

Only works on instances whose actual_status is stopped (transient launch commands like downloading an image on first start). For running instances, the API rejects this with: "Execute command only avail on stopped instances. Use ssh to run commands on running instances." — use ssh_exec instead.

The API additionally enforces a command whitelist — unknown commands return 400 "Invalid command given". ls-style inspection commands are accepted; nvidia-smi, whoami, arbitrary binaries are not. For arbitrary commands on a running instance, use ssh_exec.

Examples: execute_command(instance_id=12345, command="ls /workspace")

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
commandYes
instance_idYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior5/5

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

With no annotations, description fully discloses behavioral details: API rejects on running instances with an exact error message, enforced command whitelist (400 'Invalid command given'), and which commands are accepted vs. rejected. It also clarifies that arbitrary commands require ssh_exec, giving the agent a complete mental model.

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 front-loaded with the most critical constraint (STOPPED instance) and uses paragraph breaks for readability. Every sentence adds value: error behavior, whitelist, alternatives, and example. It's appropriately sized for the complexity.

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?

Covers prerequisites, error scenarios, command whitelist details, alternatives, and an example. With an output schema present, the missing return-value documentation is acceptable. The description is fully self-contained for selecting and invoking the tool correctly.

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 coverage is 0%, but description compensates with a concrete example: execute_command(instance_id=12345, command="ls /workspace"). This clarifies both parameters' roles and command format. However, it doesn't explicitly define parameter types or constraints beyond the example, so it's strong but not exhaustive.

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 a specific verb+resource+scope: 'Execute a constrained remote command on a STOPPED instance'. It clearly distinguishes from sibling ssh_exec by explicitly noting it only works on stopped instances and directing running-instance commands to ssh_exec.

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?

Provides explicit when to use ('Only works on instances whose actual_status is stopped'), why (transient launch commands), and when not to (running instances API rejects with quoted error). Names the alternative (ssh_exec) and explains the command whitelist, including example accepted and rejected commands.

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