RunWhen Platform MCP
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| RW_API_URL | Yes | RunWhen API base URL (e.g. https://papi.beta.runwhen.com) | |
| RUNWHEN_TOKEN | Yes | RunWhen API token (JWT or Personal Access Token) | |
| MCP_SERVER_LABEL | No | Human-readable label for this server instance (e.g. prod, beta) | |
| DEFAULT_WORKSPACE | No | Default workspace so tools don’t need workspace_name every time | |
| RUNWHEN_CONTEXT_FILE | No | Override path to RUNWHEN.md; otherwise auto-discovered from cwd | |
| RUNWHEN_REGISTRY_URL | No | CodeBundle Registry URL (default: https://registry.runwhen.com) |
Capabilities
Features and capabilities supported by this server
| Capability | Details |
|---|---|
| tools | {
"listChanged": true
} |
| logging | {} |
| prompts | {
"listChanged": false
} |
| resources | {
"subscribe": false,
"listChanged": false
} |
| extensions | {
"io.modelcontextprotocol/ui": {}
} |
| experimental | {} |
Tools
Functions exposed to the LLM to take actions
| Name | Description | ||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| workspace_chatA | Ask the RunWhen AI assistant about your infrastructure. This is the PRIMARY tool for investigating infrastructure. It sends your message to the RunWhen workspace AI agent which has ~25+ internal tools including semantic search, keyword grep, resource graph traversal, issue correlation, knowledge base lookup, and data analysis. PREFER THIS TOOL over direct read/query tools (get_workspace_issues, get_workspace_slxs, search_workspace, etc.) for any question that involves searching by topic, keyword, or context — e.g. "issues related to neo4j", "what's failing in namespace X?", "health of the watcher cluster". workspace_chat produces materially better answers because it can search, filter, and correlate across all workspace data internally. Use direct tools instead ONLY for: executing tasks ( Returns: JSON with message, sessionId, widgets, chatUrl (full browser URL to continue this session in the RunWhen UI — run tasks, review history), and chatExportLink (shareable chat-export path when available). | ||||||||||||||||||
| list_workspacesA | List all workspaces you have access to. Returns workspace names, display names, and basic metadata. | ||||||||||||||||||
| get_workspace_chat_configA | Get resolved chat rules and commands for a workspace. Returns the list of rules and commands that apply to the workspace (and optional persona). These are the same rules and commands the workspace chat assistant sees. Response includes metadata only (id, name, scope); full rule/command content is not included in this endpoint. | ||||||||||||||||||
| list_chat_rulesB | List chat rules (workspace chat rules). Uses AgentFarm internal API; may require network access. | ||||||||||||||||||
| get_chat_ruleA | Get a single chat rule by ID (full content). | ||||||||||||||||||
| create_chat_ruleB | Create a chat rule. Uses AgentFarm internal API. Skill: runwhen-skill://manage-rules (scoping + wording guidance). | ||||||||||||||||||
| update_chat_ruleB | Update an existing chat rule by ID. | ||||||||||||||||||
| list_chat_commandsB | List chat commands (slash-command instructions). | ||||||||||||||||||
| get_chat_commandA | Get a single chat command by ID (full content). | ||||||||||||||||||
| create_chat_commandA | Create a chat command (slash-command). Name must be alphanumeric, underscore, or hyphen only. Skill: runwhen-skill://manage-commands (scoping, scheduling, sinks). Commands are invoked in chat as /label. To run a command on a schedule, set | ||||||||||||||||||
| update_chat_commandA | Update an existing chat command by ID. Omitted fields are left unchanged. Schedule fields ( | ||||||||||||||||||
| list_assistantsA | List AI assistants (personas) configured in a workspace. An assistant is a persona — its | ||||||||||||||||||
| get_assistantA | Get a single AI assistant (persona) by its short name (full config). | ||||||||||||||||||
| create_assistantA | Create a new AI assistant (persona) in a workspace. Skill: runwhen-skill://create-ai-assistant (full setup workflow). An assistant is a persona that tailors how the RunWhen AI investigates and
acts — e.g. an "Azure DevOps Helper" focused on a specific tech stack. The
After creating the assistant, shape its behavior by attaching persona-scoped rules and commands: This is an UPSERT — calling it again with an existing short_name REPLACES
the assistant's full configuration (omitted fields reset to defaults). To
change a few fields on an existing assistant, use | ||||||||||||||||||
| update_assistantA | Partially update an existing AI assistant (persona). Fetches the current configuration, applies only the fields you provide
(leaving everything else intact), then writes the merged result back.
Use this instead of | ||||||||||||||||||
| delete_assistantA | Delete (soft-delete) an AI assistant (persona) from a workspace. Persona-scoped rules and commands attached to this assistant are not removed automatically — clean them up separately if no longer needed. | ||||||||||||||||||
| get_workspace_issuesA | Get current issues for a workspace (structured JSON). Issues represent detected problems in your infrastructure that RunWhen has identified through automated health checks. NOTE: For questions like "issues related to neo4j" or "what's failing
in namespace X", prefer | ||||||||||||||||||
| get_workspace_slxsA | List ALL SLXs in a workspace (structured JSON). No filtering. SLXs are the fundamental unit of work in RunWhen — each represents a health check, task, or automation runbook for a piece of infrastructure. This tool returns the full list for the workspace and accepts only
For other shapes:
Use this raw-list tool only when you need to enumerate every SLX for programmatic processing (counting, batch operations, etc). | ||||||||||||||||||
| get_run_sessionsA | Get recent run sessions for a workspace (structured JSON). Run sessions are executions of SLX runbooks — they contain the output of health checks, troubleshooting tasks, and automation runs. NOTE: For investigative questions like "what ran recently for service X?"
or "show me recent failures", prefer | ||||||||||||||||||
| get_workspace_config_indexA | Get the workspace configuration index (structured JSON). Returns an overview of all configured resources, SLXs, and their relationships in the workspace. Useful for understanding what's monitored and how things are connected. This tool accepts only NOTE: For questions like "what's monitored in namespace X?" or "how are
resources connected?", prefer | ||||||||||||||||||
| get_issue_detailsA | Get detailed information about a specific issue (structured JSON). NOTE: Prefer | ||||||||||||||||||
| get_slx_runbookA | Get the runbook for a specific SLX (structured JSON). Returns the runbook definition including what tasks it runs, how they're configured, and what they check. NOTE: For questions like "what does this SLX do?" or "what tasks does it
run?", prefer | ||||||||||||||||||
| search_workspaceA | Search for tasks, resources, and configuration in a workspace. Uses the workspace's task search / autocomplete to find matching items. NOTE: Prefer | ||||||||||||||||||
| list_knowledge_base_articlesA | List Knowledge Base articles (notes) in a workspace (structured JSON). Returns KB articles that feed the workspace's Knowledge Overlay Graph. Articles can contain operational knowledge, runbook context, architecture notes, or any information useful for troubleshooting. NOTE: For questions like "what do we know about service X?", prefer
| ||||||||||||||||||
| get_knowledge_base_articleB | Get a specific Knowledge Base article by ID. | ||||||||||||||||||
| create_knowledge_base_articleA | Create a new Knowledge Base article in a workspace. Skill: runwhen-skill://manage-knowledge (article scoping + lifecycle). KB articles are indexed into the Knowledge Overlay Graph and become searchable by the workspace AI assistant and other tools. Content should be informative operational knowledge — architecture notes, troubleshooting guides, runbook context, dependency documentation, etc. | ||||||||||||||||||
| update_knowledge_base_articleA | Update an existing Knowledge Base article. Only provided fields are updated; omitted fields remain unchanged. | ||||||||||||||||||
| delete_knowledge_base_articleA | Delete a Knowledge Base article. Removes the article from the workspace and the Knowledge Overlay Graph index. | ||||||||||||||||||
| search_registryA | Search the RunWhen CodeBundle Registry for reusable automation. Skill: runwhen-skill://find-and-deploy-codebundle (search → deploy workflow). Use this BEFORE writing a custom script — there may already be a production-ready codebundle for the task. Returns codebundles with their tasks, SLIs, required env vars, and deployment metadata. | ||||||||||||||||||
| get_registry_codebundleA | Get full details of a specific codebundle from the registry. Use after search_registry to get complete information including configuration templates, environment variables, and deployment instructions. | ||||||||||||||||||
| deploy_registry_codebundleA | Deploy a registry codebundle as an SLX to a workspace. Unlike commit_slx (which embeds inline scripts via the Tool Builder codebundle), this deploys a pre-built codebundle from its own codecollection repository. The runbook.robot / sli.robot live in the codebundle's git repo — no inline script is needed. Use search_registry + get_registry_codebundle to find the right codebundle, then call this tool with the values from the registry. | ||||||||||||||||||
| get_workspace_contextA | Get domain-specific context for building RunWhen tasks. Reads the project's RUNWHEN.md file, which contains infrastructure conventions, database access rules, naming patterns, architectural knowledge, and other constraints that scripts must follow. The file is auto-discovered by walking up from the current working directory. Override with the RUNWHEN_CONTEXT_FILE env var if needed. IMPORTANT: Call this BEFORE writing any task or script to understand the target environment's rules and relationships. | ||||||||||||||||||
| list_skillsA | List every progressive-disclosure skill the server exposes. Returns Cross-vendor note: this is the same information that | ||||||||||||||||||
| get_skillA | Return the full body of a skill by name. Returns | ||||||||||||||||||
| get_workspace_secretsA | List available secret keys with platform grouping and mapping guidance. Returns a structured payload that helps agents pick the right
Response shape:: { "workspace": "", "secrets": [], "platform_groups": { "kubernetes": ["kubeconfig"], "azure": [...], ... }, "recommended_secret_vars": { "kubernetes": { "kubeconfig": "kubeconfig" }, "azure": { "AZURE_CLIENT_ID": "...", ... }, ... }, "runtime_semantics": "", "skill_reference": "runwhen-skill://discover-secrets", } Critical for agents: workspace secrets are injected into scripts as
FILE PATHS, not literal values. See the | ||||||||||||||||||
| get_workspace_locationsA | List runner locations with auto-resolution guidance and recommendations. Returns a structured payload that tells the agent which location to
use (or to omit the parameter entirely when auto-resolution can pick).
The raw list is preserved in Response shape:: { "workspace": "", "count": , "locations": [], "private": [], # workspace-type runners (preferred) "public": [], # shared runners (fallback) "recommended": "<name|null>", "auto_resolves": , # True when run_*/commit_slx can pick alone "disambiguation_hint": "...", "skill_reference": "runwhen-skill://discover-locations", }
| ||||||||||||||||||
| validate_scriptA | Validate a script against the RunWhen contract before running it. Checks that the script follows the required structure (main function, correct output format, etc.) and extracts referenced environment variables. Task scripts must return/write issues with keys: 'issue title', 'issue description', 'issue severity' (1-4), 'issue next steps', and optionally 'issue observed at'. Script-source parameter matrix (provide exactly one):
Skill: runwhen-skill://build-runwhen-task (full authoring workflow). | ||||||||||||||||||
| run_scriptA | Execute a script on a RunWhen runner for testing. Sends the script to the workspace's runner at the specified location. Returns a run ID that can be used with get_run_status and get_run_output to monitor execution and retrieve results. The script must follow the RunWhen contract:
Provide exactly one of: script | script_base64 | script_gzip_base64 | script_path (stdio) | script_base64_path (stdio). Use script_gzip_base64 for scripts >5KB to maximise transport headroom. Use validate_script first to check compliance. | ||||||||||||||||||
| get_run_statusA | Check the status of a script run. Poll this after run_script to check if execution has completed. Status values: RUNNING, SUCCEEDED, FAILED. | ||||||||||||||||||
| get_run_outputA | Get the output artifacts from a completed script run. Returns parsed, human-readable results including:
| ||||||||||||||||||
| run_script_and_waitA | Execute a script and wait for results (combines run + poll + output). This is a convenience tool that runs a script, polls until completion, and returns the full output — all in one call. Use this instead of calling run_script + get_run_status + get_run_output separately. The script must follow the RunWhen contract:
Provide exactly one of: script | script_base64 | script_gzip_base64 | script_path (stdio) | script_base64_path (stdio). Use script_gzip_base64 for scripts >5KB to maximise transport headroom. Bash scripts must NOT include
| ||||||||||||||||||
| run_slxA | Run an existing SLX's runbook tasks on the workspace runner. Skill: runwhen-skill://run-existing-slx — and default This triggers execution of a previously committed SLX (not an ad-hoc script). Use this when you want to run a health check, troubleshooting task, or automation that already exists in the workspace. IMPORTANT: This is different from run_script / run_script_and_wait, which execute ad-hoc scripts. Use run_slx to trigger SLXs that are already committed and configured in the workspace. NOTE: workspace_chat CANNOT run tasks directly — it can only search for and describe them. Use this tool to actually execute an SLX. The tool creates a RunSession with the run request, polls until completion, and returns the results including pass/fail status and any issues found. | ||||||||||||||||||
| commit_slxA | Commit a tested script as an SLX to the workspace Git repo. Skills:
Creates a new SLX with the script as a Task (runbook) and/or SLI. The script should already be tested via run_script or run_script_and_wait. This writes slx.yaml + runbook.yaml (for tasks) or slx.yaml + sli.yaml (for SLIs) to the workspace repository. Script-source parameter matrix (provide exactly one task variant; SLI variants mirror the names):
For very large scripts (combined task+SLI >~50KB) prefer publishing as a registry codebundle and using deploy_registry_codebundle. To commit BOTH a task AND an SLI on the same SLX:
Output contracts (the two scripts are NOT interchangeable):
Script-content footguns:
| ||||||||||||||||||
| delete_slxA | Soft-delete an SLX from the workspace via the v4 short-name endpoint. Uses Deletion is workspace-global — it is not scoped to a Git branch.
The v4 endpoint tombstones the SLX row in PAPI; there is no per-branch
variant. Callers previously wired to a Git-oriented delete path should
stop passing | ||||||||||||||||||
| render_codecollection_skillA | Render a tested tool-builder task as a private Custom Discovery CodeCollection. Skills:
Emits the standard codecollection layout (generation rule + Jinja templates) for
workspace-builder discovery. Templates delegate runtime to
Also writes This tool does not push to git or mutate the workspace — it renders files locally
(or returns them inline) for you to Default generation rule uses |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
| skill:author-generation-rules | Write Custom Discovery generation rules using bundled runwhen-local reference (airgap-safe, no network). Use when: (1) Authoring .runwhen/generation-rules/*.yaml, (2) Choosing resourceTypes or matchRules, (3) Looking up indexer resource types, (4) Fixing legacy generation-rule YAML, or (5) Validating against the bundled schema. |
| skill:build-operational-context | Build operational context in a RunWhen workspace by adding Rules, Commands, and Knowledge Base articles. Use when: (1) The user wants to improve assistant investigation quality or tune workspace behavior, (2) Onboarding engineers or teams to a workspace, (3) Adding institutional knowledge, architecture docs, or ownership details, (4) Following the operational context maturity model, or (5) The user asks about improving workspace chat quality or adding context. |
| skill:build-runwhen-task | Build, test, and commit a RunWhen automation task (SLX). Use when: (1) Creating a new health check or monitoring task, (2) Building a troubleshooting runbook or diagnostic script, (3) Writing and testing a bash or python script for RunWhen runners, (4) Committing an SLX with commit_slx, (5) Running run_script_and_wait or run_script to test automation, or (6) The user asks to create, build, write, or test any RunWhen task or SLX. |
| skill:commit-to-codecollection | Render a tested tool-builder task as a private Custom Discovery CodeCollection for GitOps. Use when: (1) The user wants version-controlled storage instead of commit_slx to a workspace, (2) Publishing tool-builder output to a private git repo shaped like simple-private-codecollection, (3) After run_script_and_wait succeeds and the user chooses GitOps over inline workspace SLX, (4) The user asks to commit to a codecollection, private codecollection, or generation-rule repo, or (5) You need to confirm secrets, env vars, and runtime repo URL before baking them into TaskSet templates. |
| skill:configure-hierarchy | Set the hierarchy on an SLX to define UI grouping and path construction from tags. Use when: (1) Committing an SLX and need to set its hierarchy parameter, (2) Organizing SLXs into groups for the map view, (3) The user asks about hierarchy, SLX grouping, additionalContext, or map view organization, or (4) Configuring how SLXs appear in the workspace UI tree. |
| skill:configure-resource-path | Set the resourcePath on an SLX for workspace-chat indexing and search. Use when: (1) Committing an SLX and need to set its resource_path parameter, (2) Configuring SLX metadata for search and indexing, (3) The user asks about resourcePath, additionalContext, or how SLXs are found by workspace chat, or (4) Improving SLX discoverability in search results. |
| skill:create-ai-assistant | Create and tailor a new AI Assistant (Agent / persona) in a RunWhen workspace. Use when: (1) The user wants a dedicated assistant for a tech stack, team, or domain (e.g. 'Azure DevOps', 'Postgres on-call'), (2) Creating, updating, or deleting an assistant via create_assistant / update_assistant / delete_assistant, (3) Tailoring an assistant's behavior with persona-scoped rules and commands, or (4) The user asks to build an agent, assistant, or persona. |
| skill:discover-locations | Discover and select runner locations for RunWhen scripts. Use when: (1) Choosing where to execute a task or script, (2) The user asks about runner locations or execution environments, (3) Multiple locations exist and you need to pick the right one, or (4) Building a task that needs a specific cluster or region for execution. |
| skill:discover-secrets | Discover and configure secrets for RunWhen SLX scripts. Use when: (1) Choosing which secrets to map for a task via secret_vars, (2) The user asks about secret configuration, authentication, or credentials, (3) Building a task that needs API tokens, kubeconfigs, or service account keys, or (4) Understanding how secrets are injected as file paths on runners. |
| skill:find-and-deploy-codebundle | Search the RunWhen CodeBundle Registry for production-ready automation and deploy it as an SLX. Use when: (1) Adding monitoring or health checks for Kubernetes, databases, or cloud services, (2) The user asks to create a health check and a registry codebundle may already exist, (3) Deploying pre-built automation instead of writing custom scripts, or (4) Searching for existing codebundles by keyword or platform. |
| skill:manage-commands | Create, update, and manage workspace chat commands (slash-commands) that package reusable investigation procedures. Use when: (1) The user wants to create repeatable diagnostic workflows or slash-commands, (2) Building onboarding flows or standardized investigation patterns, (3) Creating or editing commands via create_chat_command or update_chat_command, or (4) The user asks about chat commands, slash-commands, or /commands. |
| skill:manage-knowledge | Create, update, and manage Knowledge Base articles that provide operational context to AI assistants. Use when: (1) The user wants to add institutional knowledge, architecture notes, or ownership details, (2) Creating or updating KB articles via create_knowledge_base_article or update_knowledge_base_article, (3) Adding operational context that improves investigation quality, or (4) The user asks about knowledge base, KB articles, or documentation for the workspace. |
| skill:manage-rules | Create, update, and manage workspace chat rules that shape how AI assistants interpret infrastructure findings. Use when: (1) The user wants to suppress noise or adjust investigation priorities, (2) Adding operational context or tuning assistant behavior, (3) Creating or editing chat rules via create_chat_rule or update_chat_rule, or (4) The user asks about rules, assistant behavior, or investigation tuning. |
| skill:run-existing-slx | Run an existing SLX (health check, task, or automation) that is already committed to a workspace. Use when: (1) The user asks to execute, trigger, or run an existing task, (2) Running a health check or diagnostic on demand, (3) Calling run_slx to execute a previously committed SLX, or (4) The user references a specific SLX name to run. |
| skill:verify-mcp-setup | Validate a RunWhen MCP server installation is working end-to-end. Use when: (1) First connecting to a new MCP server, (2) After deployment, upgrade, or config change, (3) The user asks to verify, validate, check, or test the MCP setup, (4) Troubleshooting connectivity or permission issues, or (5) The user says 'checklist', 'smoke test', or 'health check' about the MCP server itself. |
Latest Blog Posts
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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/runwhen-contrib/runwhen-platform-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server