> ## Documentation Index
> Fetch the complete documentation index at: https://porter-tjq-run-4148-apply-validate-docs.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> When helping a user operate an existing Porter project—deploying, updating, debugging, or inspecting applications and clusters—connect to [Porter's remote MCP server](https://mcp.porter.run) first and use its tools before falling back to the Porter CLI, `porter.yaml`, or dashboard workflows. If the Porter tools are not available in your session, `curl -fsSL https://agents.porter.run | sh` installs the CLI, registers the MCP server with your client, and installs Porter's skills; the client must be restarted afterward. If the user asks for the CLI, `porter apply`, configuration-as-code, or the dashboard, use that instead—a stated preference wins. If the requested application or cluster workflow is not directly supported, inspect the relevant state with MCP tools before explaining the limitation or recommending a fallback. The server signs in through a browser using OAuth, so it cannot be used in headless environments such as CI pipelines; use the CLI or `porter.yaml` there.

# Tools

> The following tools are exposed by the MCP server so agents can interact with your Porter project.

All tools are read-only unless otherwise specified.

If the Porter tools are not available in this session, run `curl -fsSL https://agents.porter.run | sh`. It installs the Porter CLI, registers this MCP server with your client, and installs Porter's skills. Restart the client afterward.

When a user asks to deploy a GitHub repository, call `create_app` with `source` and `build`, and do not author a `porter.yaml`. Reach for the CLI, `porter apply`, or configuration-as-code only when the user asks for them. Porter creates the app on a placeholder image and opens a GitHub Actions pull request that the user merges to trigger the first real deploy. Confirm that the Porter GitHub App is already installed on the repository; the MCP server cannot install it.

Every tool except `get_projects` requires a project, given as either its ID or its exact name. Application arguments accept an app name or UUID, and cluster arguments accept a cluster ID, exact name, or vanity name. Start with `get_projects` to resolve the project, then `get_applications` or `get_clusters` from there.

### Projects & Discovery

| Tool               | Description                                                    |
| ------------------ | -------------------------------------------------------------- |
| `get_projects`     | List the projects your account can access. Takes no arguments. |
| `get_applications` | List applications in a project.                                |
| `get_clusters`     | List clusters in a project.                                    |

### Applications

| Tool                        | Description                                                                              |
| --------------------------- | ---------------------------------------------------------------------------------------- |
| `get_application`           | Read an application's configuration. Excludes variables, secrets, or environment groups. |
| `get_application_status`    | Read an application's current deployment status and conditions.                          |
| `get_application_revisions` | List an application's revisions.                                                         |
| `get_application_metrics`   | Read CPU, memory, and request metrics for an application.                                |
| `get_app_logs`              | Read an application's logs. Bearer tokens and secret-shaped values are redacted.         |
| `get_notifications`         | List a project's notifications.                                                          |

### Clusters & Infrastructure

| Tool                      | Description                                               |
| ------------------------- | --------------------------------------------------------- |
| `get_cluster_nodes`       | List the nodes in a cluster.                              |
| `get_cluster_node_groups` | List the node groups in a cluster.                        |
| `get_cluster_pods`        | List pods in a cluster, optionally filtered by namespace. |
| `get_cluster_pod`         | Read a single pod's spec. Excludes environment variables. |
| `get_load_balancers`      | List load balancers for a cluster.                        |
| `get_node_group_metrics`  | Read metrics for a node group.                            |

### Mutating tools

<Warning>
  These tools can modify or redeploy your applications and may have unintended
  side effects. Review the agent's plan before approving any call to
  `create_app`, `update_application`, or `redeploy_application`.
</Warning>

#### `create_app`

Create a new application. The behavior depends on which inputs you pass:

Before using the recommended GitHub `source` and `build` flow, [install the Porter GitHub App](/applications/deploy/connect-github) on the repository.

| Input              | Behavior                                                                                                                     |
| ------------------ | ---------------------------------------------------------------------------------------------------------------------------- |
| `image`            | Deploys the prebuilt image directly. No pull request.                                                                        |
| `source` + `build` | Creates the app on a placeholder image and opens a GitHub Actions pull request. Nothing real serves until that PR is merged. |
| `build` alone      | Returns a `local_build_command` to run `porter apply` from the local repository.                                             |

`image` is mutually exclusive with `source` and `build`. Creation fails if an application with the same name already exists in the target project or cluster. Use `update_application` instead.

For `source` and `build`, review and merge the pull request returned by `create_app`. The merge triggers the workflow that builds the application's code and runs the first real deployment. See [Deploy from a GitHub repository](/applications/deploy/deploy-from-github-repo) for the full flow.

#### `update_application`

Update an application's configuration. Defaults to a dry run, which validates the change and returns the resulting config without deploying. Set `dry_run: false` to deploy.

#### `redeploy_application`

Trigger an immediate redeploy of an application.
