API Explorer
All surfaces (MCP, REST, CLI) call the same service methods.
Endpoint
Surface Parity
| Surface | Call Pattern |
|---|---|
| MCP | soma(action="greet", name="Alice") |
| REST | POST /v1/greet {"name":"Alice"} |
| CLI | soma greet --name Alice |
Return a greeting.
Parameters
cURL
curl -X POST http://localhost:40060/v1/greet \
-H "Content-Type: application/json" \
-d '{"name":"Alice"}'MCP equivalent
soma(action="greet", name="...")
Response
{
"greeting": "Hello, Alice!",
"target": "Alice"
}Echo a message back unchanged.
Parameters
cURL
curl -X POST http://localhost:40060/v1/echo \
-H "Content-Type: application/json" \
-d '{"message":"Hello!"}'MCP equivalent
soma(action="echo", message="...")
Response
{
"echo": "Hello!"
}Return server status and configuration info.
cURL
curl http://localhost:40060/v1/status
MCP equivalent
soma(action="status")
Response
{
"status": "ok",
"note": "stub"
}Inspect immutable Python environment cache state without executing provider code.
cURL
curl http://localhost:40060/v1/python/environments
MCP equivalent
soma(action="python_environment_status")
Response
{}Plan a bounded prune of stale non-ready Python environment cache entries.
Parameters
cURL
curl -X POST http://localhost:40060/v1/python/environments/prune-plan \
-H "Content-Type: application/json" \
-d '{"stale_before_unix_seconds":100,"max_entries":100}'MCP equivalent
soma(action="python_environment_prune_plan", stale_before_unix_seconds="...", max_entries="...")
Response
{}Apply a bounded prune of stale non-ready Python environment cache entries.
Parameters
cURL
curl -X POST http://localhost:40060/v1/python/environments/prune \
-H "Content-Type: application/json" \
-d '{"stale_before_unix_seconds":100,"max_entries":100,"confirm":true}'MCP equivalent
soma(action="python_environment_prune", stale_before_unix_seconds="...", max_entries="...", confirm="...")
Response
{}Repair the immutable environment for one managed Python provider.
Parameters
cURL
curl -X POST http://localhost:40060/v1/python/environments/repair \
-H "Content-Type: application/json" \
-d '{"provider_path":"Hello!","confirm":true}'MCP equivalent
soma(action="python_environment_repair", provider_path="...", confirm="...")
Response
{}Resolve, prepare, validate, and atomically activate an immutable update for one managed Python provider.
Parameters
cURL
curl -X POST http://localhost:40060/v1/python/environments/update \
-H "Content-Type: application/json" \
-d '{"provider_path":"Hello!","confirm":true}'MCP equivalent
soma(action="python_environment_update", provider_path="...", confirm="...")
Response
{}Inspect persistent Python worker health, quarantine, restart counts, and bounded redacted logs.
cURL
curl http://localhost:40060/v1/python/workers
MCP equivalent
soma(action="python_worker_status")
Response
{}Cancel one active persistent Python invocation by terminating its process tree.
Parameters
cURL
curl -X POST http://localhost:40060/v1/python/workers/cancel \
-H "Content-Type: application/json" \
-d '{"provider":"Hello!","confirm":true}'MCP equivalent
soma(action="python_worker_cancel", provider="...", confirm="...")
Response
{}Clear one persistent Python worker crash-loop quarantine.
Parameters
cURL
curl -X POST http://localhost:40060/v1/python/workers/reset \
-H "Content-Type: application/json" \
-d '{"provider":"Hello!","confirm":true}'MCP equivalent
soma(action="python_worker_reset", provider="...", confirm="...")
Response
{}Inspect the active Python provider generation and bounded rollback history.
cURL
curl http://localhost:40060/v1/python/generations
MCP equivalent
soma(action="python_generation_status")
Response
{}Atomically reactivate a retained Python provider generation.
Parameters
cURL
curl -X POST http://localhost:40060/v1/python/generations/rollback \
-H "Content-Type: application/json" \
-d '{"generation_id":100,"confirm":true}'MCP equivalent
soma(action="python_generation_rollback", generation_id="...", confirm="...")
Response
{}Inspect digest-bound Python graduation, conformance, activation, and rollback state.
Parameters
cURL
curl -X POST http://localhost:40060/v1/python/graduation/status \
-H "Content-Type: application/json" \
-d '{"workspace":"Hello!"}'MCP equivalent
soma(action="python_graduation_status", workspace="...")
Response
{}Scaffold, componentize, build, verify, compare, activate, or roll back a Python graduation workspace.
Parameters
cURL
curl -X POST http://localhost:40060/v1/python/graduation/apply \
-H "Content-Type: application/json" \
-d '{"operation":"Hello!","workspace":"Hello!","source":"Hello!","component":"Hello!","fixtures":"Hello!","wheelhouse":"Hello!","confirm":true}'MCP equivalent
soma(action="python_graduation_apply", operation="...", workspace="...", source="...", component="...", fixtures="...", wheelhouse="...", confirm="...")
Response
{}Ask the MCP client to collect a name, then return a personalised greeting.
REST availability
elicit_name is MCP-only because it requires an interactive MCP peer.
MCP equivalent
soma(action="elicit_name")
Response
{
"greeting": "Hello, Alice!",
"target": "Alice",
"elicited": true
}Collect scaffold setup intent through MCP elicitation and return JSON for the scaffold-project skill.
REST availability
scaffold_intent is MCP-only because it requires an interactive MCP peer.
MCP equivalent
soma(action="scaffold_intent")
Response
{
"kind": "soma_scaffold_intent",
"schema_version": 1
}Show the action reference.
cURL
curl http://localhost:40060/v1/help
MCP equivalent
soma(action="help")
Response
{
"actions": [
"greet",
"echo",
"status",
"help"
]
}