# pm_prompt
{{< badge content="Vanguard" color="blue" class="tier-badge" >}}

The `pm_prompt` tool manages the prompt library — the markdown instruction files that capabilities and agents reference. Prompts have a `role`, tags, and agent bindings.

## Actions

`create`, `get`, `list`, `list_with_content`, `update`, `delete`, `help`

## Roles

Every prompt has one of five roles:

| Role | Purpose |
|------|---------|
| `system` | Core system prompt — agent identity and top-level instructions |
| `guide` | Workflow guide — step-by-step instructions for a task or process |
| `checklist` | Checklist-style constraints and verification steps |
| `policy` | Policies, rules, and constraints the agent must follow |
| `context` | Background context, domain knowledge, or reference material |

{{< callout type="tip" >}}
**Context-sensitive listing.** `list` returns metadata only (id, key, role, name, tags, agentCount) to keep agent context windows small. Use `get` when you need the actual prompt content, or `list_with_content` when you specifically want to batch-load.
{{< /callout >}}

---

## create

Create a new prompt.

### Parameters

| Field | Type | Required | Notes |
|-------|------|----------|-------|
| `key` | string | Yes | Unique prompt key (max 120 chars) |
| `role` | string | Yes | `system`, `guide`, `checklist`, `policy`, or `context` |
| `name` | string | Yes | Display name (max 200 chars) |
| `content` | string | Yes | Prompt content (max 20,000 chars) |
| `tags` | string[] | No | Freeform tags |

### Example

```text
pm_prompt {
  action: "create",
  key: "reviewer.system",
  role: "system",
  name: "Reviewer System Prompt",
  content: "You are a code reviewer. Your job is to...",
  tags: ["review", "core"]
}
```

---

## get

Fetch a prompt by ID or key. Returns full content.

### Parameters

| Field | Type | Required |
|-------|------|----------|
| `id` | string | One of |
| `key` | string | One of |

---

## list

**Metadata-only list.** Returns prompt records without `content` — just id, key, role, name, tags, and `agentCount` (how many agents bind to this prompt).

### Parameters

| Field | Type | Required | Notes |
|-------|------|----------|-------|
| `roles` | string[] | No | Filter by roles array |
| `search` | string | No | Search query |
| `limit` | number | No | Max results (1–500) |

Use this for discovery — an agent can list available prompts without blowing out its context window.

### Example

```text
pm_prompt {
  action: "list",
  roles: ["system"],
  search: "reviewer",
  limit: 20
}
```

---

## list_with_content

Same as `list` but returns full content. Use only when you need the actual prompt text for all results.

### Parameters

Same as `list`.

---

## update

Update an existing prompt.

### Parameters

| Field | Type | Required |
|-------|------|----------|
| `id` | string | Yes |
| `key` | string | No |
| `role` | string | No |
| `name` | string | No |
| `content` | string | No |
| `tags` | string[] | No |

---

## delete

Delete a prompt by ID.

### Parameters

| Field | Type | Required |
|-------|------|----------|
| `id` | string | Yes |

---

## help

```text
pm_prompt { action: "help" }
```

## Related

- [pm_agent](../agents/) — agents bind to prompts
- [pm_capability](../capabilities/) — capabilities link to prompt content

