levelrail

v1.5.18
io.github.glincker/levelrail Checked 2 hours ago Published 10 hours ago

Self-hosted MCP server for your Levelrail deployments, servers, databases and domains.

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

deploy_app

Point an app at a new image tag. Async: wait=true returns the outcome and failure diagnosis. Protected environments need confirm and another human's approval.

ParameterTypeDescription
image *stringimage reference to deploy, e.g. registry.example.com/org/app:tag
name *stringthe app's name
confirmbooleantrue to confirm a protected environment, else 409
max_wait_secondsintegerwait cap in seconds
waitbooleanblock for the outcome

diagnose_app_failure

Why an app's latest deploy failed or it crashloops: typed causes (WRONG_PORT, OOM_KILLED) with evidence and fixes. deploy_id: past attempt.

ParameterTypeDescription
name *stringthe app's name
deploy_idstringdiagnose this specific past deploy attempt instead of the app's newest one

disable_toolset

Remove toolsets' tools from this session's tool list.

ParameterTypeDescription
toolsets *arraytoolset names from list_toolsets

enable_toolset

Add toolsets' tools to this session's tool list.

ParameterTypeDescription
toolsets *arraytoolset names from list_toolsets

get_app

One app's desired state: image, port, domains, env, resources, health checks, command override, volumes, bind mounts.

ParameterTypeDescription
name *stringthe app's name

get_app_env

An app's plain env vars and the names (never values) of its secrets and sensitive vars. Use before set_app_env or unset_app_env.

ParameterTypeDescription
name *stringthe app's name

get_app_status

Get an app's current reconcile conditions (type, status, reason, message). Current status only, not history.

ParameterTypeDescription
name *stringthe app's name

get_attention

Everything needing attention, critical first: failing apps, offline nodes, certificates, backups, pending items.

list_apps

List apps (name, image, port, domains, limits), 50 per page. Pass next_offset as offset for more.

ParameterTypeDescription
environmentstringonly apps in this environment
fieldsstringkeys to keep per item
limitintegerpage size, default 50, max 200
offsetinteger

list_deploys

An app's deploy and reconcile conditions. Same data as get_app_status; no separate deploy history.

ParameterTypeDescription
name *stringthe app's name

list_toolsets

List toolsets with tool count and token cost. Enable one with enable_toolset.

preflight_app

Pre-deploy checks of an app's config (DNS, port, disk, memory, image pull, repo, env, mounts) with fixes. required_env verifies names.

ParameterTypeDescription
name *stringthe app's name
required_envarrayenv var names that must be set for the app to start

query_logs

Search an app's logs by level, time window, deploy and text: capped newest matches plus counts. Prefer over get_app_logs.

ParameterTypeDescription
app *stringthe app's name
deploy_idstringonly lines from this deploy attempt's window (from list_deploy_attempts)
levelstringminimum level: trace, debug, info, warn, error or fatal; unleveled lines are excluded
max_linesintegermost recent lines to return, default 100; output is also capped in bytes
sincestringstart of the window: a duration like 30m or an RFC3339 time; default 1h
textstringonly lines containing this phrase
untilstringend of the window: a duration ago or an RFC3339 time; default now

set_app_domains

Replace an app's domain list, changing nothing else. A domain owned by another app is refused with a conflict and nothing changes.

ParameterTypeDescription
domains *arraycomplete domain list; replaces the current one
name *stringthe app's name

set_app_env

Set one env var on an app. secret true encrypts it and makes it write-only. Applies on the next deploy_app or restart_app.

ParameterTypeDescription
key *stringthe environment variable name
name *stringthe app's name
value *stringthe value to store; never returned or logged
expected_versionintegerenv_version read with get_app_env; if the env changed since, the call fails and changes nothing
forcebooleansecret only: overwrite even if the key is locked
secretbooleanstore as a write-only encrypted secret, not a plain env var

unset_app_env

Remove one env var (plain or secret) from an app. Desired state only: the container keeps it until deploy_app or restart_app.

ParameterTypeDescription
key *stringthe environment variable name to remove
name *stringthe app's name
expected_versionintegerenv_version read with get_app_env; if the env changed since, the call fails and changes nothing
forcebooleansecret only: remove even if the key is locked
secretbooleanremove a secret (and undeclare it) instead of a plain env var

wait_for_deploy

Wait for a deploy to finish (healthy, failed, canceled, superseded or blocked, with failure). Blocks ~55s; in_progress means call again.

ParameterTypeDescription
name *stringthe app's name
deploy_idstringdeploy attempt id, or latest (default), resolved once
max_wait_secondsintegerblock at most this long, capped by the server limit (default 55)

whoami

Show which identity this connection authenticates as: kind, name, abilities and expiry.