Skip to main content
POST
Plan a swarm run

Authorizations

Authorization
string
header
required

MCPJam API key (sk_…). Create one at Settings → API keys. Guest sessions cannot use the API, and API keys cannot manage other API keys.

Path Parameters

projectId
string
required

ID of the hosted project that contains the server.

Body

application/json

The launch request, without idempotencyKey.

What a launch would start: exactly one of swarmRun, swarm or goals.

swarmRun
string

Launch this swarm run's goals again: its swarmRunId.

swarm
string

Launch this swarm's goals: those of its latest swarm run, or its goals if it has never run.

goals
object[]

Launch exactly these goals. With swarm, they launch for that swarm. Not with swarmRun or goalIds.

Required array length: 1 - 100 elements
goalIds
string[]

Launch only these goals of the swarm run or swarm.

Required array length: 1 - 100 elements
iterations
integer

Sessions per target for every goal that sets none of its own.

Required range: 1 <= x <= 5
environmentIds
string[]

Environments every goal that sets none of its own runs against, instead of its own targets.

Maximum array length: 10
expectedSponsored
integer

How many conversations you expect to be sponsored (paid from MCPJam's allowance instead of your organization's credits). The launch answers 409 with details.code: "swarm_funding_changed", starting nothing, when fewer would be.

Required range: x >= 0

Response

The plan.

What a launch would start, worked out with nothing written.

swarmId
string | null
required
sourceSwarmRunId
string | null
required
goals
object[]
required
problems
object[]
required

Empty when the launch can start.

sessionTotal
integer
required
funding
object

How the launch's sessions are funded, when the preview could say.