---
name: list-prompts
description: List prompts in the Tela workspace. Accepts optional projectId to filter by project, or personal to list only the caller's drafts. Use when the user wants to see prompts, find a prompt, or needs prompt IDs.
---

# List Prompts

List all prompts in the Tela API, with optional filtering.

## Usage

List all prompts:
```bash
bun --preload ~/.claude/skills/tela-studio/preload.ts -e "console.log(JSON.stringify(await tela.listPrompts(), null, 2))"
```

List prompts for a specific project:
```bash
bun --preload ~/.claude/skills/tela-studio/preload.ts -e "console.log(JSON.stringify(await tela.listPrompts({ projectId: 'PROJECT_ID' }), null, 2))"
```

List only your personal drafts:
```bash
bun --preload ~/.claude/skills/tela-studio/preload.ts -e "console.log(JSON.stringify(await tela.listPrompts({ personal: true }), null, 2))"
```

Include promoted version data:
```bash
bun --preload ~/.claude/skills/tela-studio/preload.ts -e "console.log(JSON.stringify(await tela.listPrompts({ includePromotedVersion: true }), null, 2))"
```

## Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `projectId` | string (UUID) | No | Filter prompts by project ID |
| `workspaceId` | string (UUID) | No | Filter prompts by workspace ID |
| `includePromotedVersion` | boolean | No | Include the promoted version data in response |
| `personal` | boolean | No | Return only the caller's personal drafts — the prompts with `projectId: null` |

With no filter the response mixes project prompts with your own personal drafts. `projectId` never
returns drafts; `personal: true` returns nothing else. Combining the two throws — they are mutually
exclusive. Drafts belong to the user who created them, so
another user's drafts never appear.

## Response Type

```typescript
interface Prompt {
  id: string
  title: string
  projectId: string | null
  workspaceId: string
  inferencesPercentage: string
  layoutVersion: string
  customTags: string[]
  createdBy: string
  updatedBy: string
  deletedBy: string | null
  createdAt: string
  updatedAt: string
  deletedAt: string | null
  favorited?: boolean
  promotedVersion?: PromptVersion | null
  latestVersion?: PromptVersion | null
}

interface PromptVersion {
  id: string
  title: string
  content: string | null
  markdownContent: string | null
  promoted: boolean
  draft: boolean
}
```

## Related Functions

- `tela.getPrompt(promptId: string)` - Get a single prompt by ID
- `tela.getPromotedVersion(promptId: string)` - Get the promoted version of a prompt
