Skip to main content
Glama

CloudSwap

run_job

Run a stateless container job on the cheapest fitting machine (Vast.ai, RunPod or Shadeform), paid from your CloudSwap prepaid credits. A hold of the maximum price is taken first; you pay the real price after the run. Needs your CloudSwap API key as a Bearer token. Returns a job id: call get_job to follow it.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "command": "<command>"
    },
    "name": "run_job"
  }
}

Input Schema

NameRequiredDescriptionDefault
envNo
hoursNoexpected wall time on an AWS c7i-class CPU or the named GPU
imageNopublic container image, default python:3.12-slim
labelNo
trustNo
vcpusNo
mem_gbNo
commandYesshell command run in the container
regionsNoeu, us, asia or region codes
spot_okNojob may be interrupted and re-run
gpu_typeNoe.g. H100, A100, RTX 4090; omit for CPU jobs
gpu_countNo
max_hoursNohard time limit, 0.05 to 4
statelessNomust be true; stateful jobs are refused
data_in_gbNodata pulled from AWS per run (egress cost)
max_price_hrNoUSD per hour cap

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.2/5.0
Behavior4/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 well: it discloses the billing mechanism (a hold at max price, settled at real price after the run), the Bearer API key requirement, and the return value (a job id). It leaves out failure/refund behavior and how spot interruptions are handled, which matters for a paid mutation.

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?

Four short sentences, each earning its place: purpose, billing, auth, and return/follow-up are front-loaded in that order. No filler or restatement of the title.

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 16-parameter job-launch tool with no output schema, the definition covers the essentials an agent needs before calling: it is stateless-only, costs are capped and held, auth is required, and the result is an id. Remaining gaps around failure handling and interruption behavior are notable but secondary.

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 63% for 16 parameters, and the description only touches on statelessness, pricing caps and image/machine selection indirectly. It adds meaning about cost and auth but explains none of the individual parameters such as trust, regions, spot_ok or data_in_gb beyond what the schema already states.

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?

States a specific verb (run) and resource (stateless container job) plus the provider-selection behavior ('cheapest fitting machine (Vast.ai, RunPod or Shadeform)'). It also names the follow-up sibling get_job, so an agent can place it in the workflow without opening the schema.

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?

Clear when-to-use context: stateless container jobs only, with the explicit note that stateful jobs are refused, and a pointer to get_job for tracking. It does not mention quote_job, which is the obvious sibling for pre-run pricing, so the alternative guidance is incomplete rather than absent.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources