> ## Documentation Index
> Fetch the complete documentation index at: https://docs.instapods.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Tools Reference

> All MCP tools available for AI assistants.

The InstaPods MCP server exposes 12 tools that AI assistants can call. These cover pod management, file operations, command execution, and logs.

## Pod Management

### list\_pods

List all pods for the authenticated team.

**Parameters:** None

**Returns:** Array of pod objects with name, status, preset, plan, region, URL, and resource details.

**Example prompt:** "Show me all my pods"

***

### get\_pod

Get details of a specific pod by name.

| Name   | Type   | Required | Description |
| ------ | ------ | -------- | ----------- |
| `name` | string | Yes      | Pod name    |

**Returns:** Full pod object including status, IP, domain, preset, plan, SSH info, and resource allocation.

**Example prompt:** "What's the status of my-api?"

***

### create\_pod

Create a new pod. Billing checks (payment method, subscription) are enforced automatically.

| Name     | Type   | Required | Description                                                                         |
| -------- | ------ | -------- | ----------------------------------------------------------------------------------- |
| `name`   | string | Yes      | Pod name (DNS-safe, lowercase, max 63 chars)                                        |
| `preset` | string | Yes      | `static`, `php`, `nodejs`, or `python`                                              |
| `plan`   | string | No       | Plan slug (default: `launch`). Options: `launch`, `build`, `grow`, `scale`, `turbo` |
| `region` | string | No       | Region slug (auto-selected if omitted)                                              |

**Returns:** Created pod object.

**Example prompt:** "Create a Python pod called data-api on the build plan"

***

### manage\_pod

Start, stop, restart, reload, or delete a pod.

| Name     | Type   | Required | Description                                       |
| -------- | ------ | -------- | ------------------------------------------------- |
| `name`   | string | Yes      | Pod name                                          |
| `action` | string | Yes      | `start`, `stop`, `restart`, `reload`, or `delete` |

**Returns:** Updated pod object, reload status with health check, or deletion confirmation.

The **reload** action is the most powerful — it:

1. Auto-starts the pod if stopped
2. Installs dependencies (`npm install`, `pip install`, `composer install`)
3. Detects entry points and frameworks (gunicorn, Express, Laravel)
4. Restarts application services
5. Runs a health check and returns service status

**Example prompts:** "Restart my-api" · "Reload my-app after I changed the code" · "Delete test-pod"

***

### change\_plan

Upgrade or downgrade a pod's plan. Adjusts CPU, memory, and disk to the target plan's limits.

| Name   | Type   | Required | Description                                                      |
| ------ | ------ | -------- | ---------------------------------------------------------------- |
| `name` | string | Yes      | Pod name                                                         |
| `plan` | string | Yes      | Target plan slug: `launch`, `build`, `grow`, `scale`, or `turbo` |

A downgrade is rejected if the pod's current disk usage would exceed the smaller plan's quota — free up space first. Use `list_plans` to see the limits and price of each plan.

**Returns:** Updated pod object with the new CPU, memory, and disk allocation.

**Example prompts:** "Upgrade my-api to the grow plan" · "Move data-api down to build"

***

## File Operations

### list\_files

List files in a directory inside a pod.

| Name   | Type   | Required | Description                                                                                |
| ------ | ------ | -------- | ------------------------------------------------------------------------------------------ |
| `name` | string | Yes      | Pod name                                                                                   |
| `path` | string | No       | Directory path (default: `~/app`). Must be within `/home/instapod`, `/var/www`, or `/tmp`. |

**Returns:** Array of file entries with name, permissions, size, and `is_dir` flag.

**Example prompt:** "Show me the files in my-api"

***

### read\_file

Read the contents of a file inside a pod.

| Name   | Type   | Required | Description        |
| ------ | ------ | -------- | ------------------ |
| `name` | string | Yes      | Pod name           |
| `path` | string | Yes      | Absolute file path |

**Returns:** File content as text.

**Example prompt:** "Show me the package.json in my-api" or "Read /home/instapod/app/index.js"

***

### write\_file

Write content to a file inside a pod. Creates the file and parent directories if they don't exist.

| Name      | Type   | Required | Description           |
| --------- | ------ | -------- | --------------------- |
| `name`    | string | Yes      | Pod name              |
| `path`    | string | Yes      | Absolute file path    |
| `content` | string | Yes      | File content to write |

**Returns:** Confirmation with saved path.

**Example prompt:** "Create an index.js in my-api that serves a hello world Express app"

<Note>
  Files are written as the `instapod` user. Paths must be within `/home/instapod`, `/var/www`, or `/tmp`.
</Note>

***

## Command Execution

### exec\_command

Run a shell command inside a pod. Runs as the `instapod` user (same as SSH access).

| Name      | Type   | Required | Description              |
| --------- | ------ | -------- | ------------------------ |
| `name`    | string | Yes      | Pod name                 |
| `command` | string | Yes      | Shell command to execute |

**Returns:** Command output, exit code, and any error.

**Example prompt:** "Run `ls -la ~/app` in my-api" or "Install express in my-api with npm"

<Warning>
  This tool executes arbitrary shell commands inside your pod. The AI assistant will typically ask for confirmation before running destructive commands.
</Warning>

***

## Logs

### get\_logs

Get application logs from a pod via journalctl.

| Name      | Type   | Required | Description                                   |
| --------- | ------ | -------- | --------------------------------------------- |
| `name`    | string | Yes      | Pod name                                      |
| `lines`   | string | No       | Number of log lines (default: `100`)          |
| `service` | string | No       | Filter by service name (e.g., `app`, `nginx`) |

**Returns:** Log output as text.

**Example prompt:** "Show me the logs for my-api" or "Get the last 50 nginx logs from my-app"

***

## Catalog

### list\_presets

List available pod presets.

**Parameters:** None

| Preset   | Stack           |
| -------- | --------------- |
| `static` | Nginx           |
| `php`    | PHP 8.3 + Nginx |
| `nodejs` | Node.js 22      |
| `python` | Python 3.12     |

**Example prompt:** "What presets are available?"

***

### list\_plans

List available pricing plans.

**Parameters:** None

**Returns:** Array of plans with slug, name, CPU, memory, storage, and price.

**Example prompt:** "What plans do you have?"

***

### list\_regions

List available deployment regions.

**Parameters:** None

**Returns:** Array of regions with slug and server count.

**Example prompt:** "What regions can I deploy to?"
