Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,12 +53,12 @@ The Tool workflow (tools-only, not MCP tasks protocol)
1. `prompt_examples`
2. `model_profiles` (optional, helps choose `model_profile`)
3. non-tool step: draft/approve prompt
4. `task_create`
5. `task_status` (poll every 5 minutes until done)
6. optional if failed: `task_retry`
7. download the result via `task_download` or via `task_file_info`
4. `plan_create`
5. `plan_status` (poll every 5 minutes until done)
6. optional if failed: `plan_retry`
7. download the result via `plan_download` or via `plan_file_info`

Concurrency note: each `task_create` call returns a new `task_id`; server-side global per-client concurrency is not capped, so clients should track their own parallel tasks.
Concurrency note: each `plan_create` call returns a new `task_id`; server-side global per-client concurrency is not capped, so clients should track their own parallel tasks.

### Option A: Remote MCP (fastest path)

Expand Down
2 changes: 1 addition & 1 deletion docs/mcp/codex.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Guide for connecting [codex](https://openai.com/codex/) with PlanExe via MCP.
1. Start Codex.
2. Ask for MCP tools.
3. Call `prompt_examples` to get examples.
4. Call `task_create` to start a plan.
4. Call `plan_create` to start a plan.

## Sample prompt

Expand Down
14 changes: 7 additions & 7 deletions docs/mcp/inspector.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,22 +71,22 @@ Now there should be a list with tool names and descriptions:
```
prompt_examples
model_profiles
task_create
task_status
task_stop
task_retry
task_file_info
plan_create
plan_status
plan_stop
plan_retry
plan_file_info
```

When you inspect `task_create`, the visible input schema includes `prompt` and optional `model_profile`.
When you inspect `plan_create`, the visible input schema includes `prompt` and optional `model_profile`.

Follow these steps:
![screenshot of mcp inspector invoke tool](inspector_step5_mcp_planexe_org.webp)

1. In the `Tools` panel; Click on the `prompt_examples` tool.
2. In the `prompt_examples` right sidepanel; Click on `Run Tool`.
3. The MCP server should respond with a list of example prompts.
4. Optionally run `model_profiles` to inspect available `model_profile` choices before `task_create`.
4. Optionally run `model_profiles` to inspect available `model_profile` choices before `plan_create`.

## Approach 2. MCP server inside docker

Expand Down
34 changes: 17 additions & 17 deletions docs/mcp/mcp_details.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@ This document lists the MCP tools exposed by PlanExe and example prompts for age
- The primary MCP server runs in the cloud (see `mcp_cloud`).
- The local MCP proxy (`mcp_local`) forwards calls to the server and adds a local download helper.
- Tool responses return JSON in both `content.text` and `structuredContent`.
- Workflow note: drafting and user approval of the prompt is a non-tool step between setup tools and `task_create`.
- Workflow note: drafting and user approval of the prompt is a non-tool step between setup tools and `plan_create`.

## Tool Catalog, `mcp_cloud`

### prompt_examples

Returns around five example prompts that show what good prompts look like. Each sample is typically 300-800 words. Usually the AI does the heavy lifting: the user has a vague idea, the agent calls `prompt_examples`, then expands that idea into a high-quality prompt (300-800 words). A compact prompt shape works best: objective, scope, constraints, timeline, stakeholders, budget/resources, and success criteria. The prompt is shown to the user, who can ask for further changes or confirm it’s good to go. When the user confirms, the agent then calls `task_create`. Shorter or vaguer prompts produce lower-quality plans.
Returns around five example prompts that show what good prompts look like. Each sample is typically 300-800 words. Usually the AI does the heavy lifting: the user has a vague idea, the agent calls `prompt_examples`, then expands that idea into a high-quality prompt (300-800 words). A compact prompt shape works best: objective, scope, constraints, timeline, stakeholders, budget/resources, and success criteria. The prompt is shown to the user, who can ask for further changes or confirm it’s good to go. When the user confirms, the agent then calls `plan_create`. Shorter or vaguer prompts produce lower-quality plans.

Example prompt:
```
Expand All @@ -32,7 +32,7 @@ Response includes `samples` (array of prompt strings, each ~300-800 words) and `

### model_profiles

Returns profile guidance and model availability for `task_create.model_profile`.
Returns profile guidance and model availability for `plan_create.model_profile`.
This helps agents pick a profile without knowing internal `llm_config/*.json` details.
Profiles with zero models are omitted from the `profiles` list.
If no models are available in any profile, `model_profiles` returns `isError=true` with `error.code = MODEL_PROFILES_UNAVAILABLE`.
Expand All @@ -56,7 +56,7 @@ Response includes:
- `model_count`
- `models[]` (`key`, `provider_class`, `model`, `priority`)

### task_create
### plan_create

Create a new plan task.

Expand Down Expand Up @@ -92,7 +92,7 @@ What to do instead:
- For PlanExe, send a substantial multi-phase project prompt with scope, constraints, timeline, budget, stakeholders, and success criteria.
- PlanExe always runs a fixed end-to-end pipeline; it does not support selecting only internal pipeline subsets.

### task_status
### plan_status

Fetch status/progress and recent files for a task.

Expand All @@ -113,7 +113,7 @@ State contract:
- `completed`: terminal success, proceed to download.
- `failed`: terminal error.

### task_stop
### plan_stop

Request an active task to stop.

Expand All @@ -127,7 +127,7 @@ Example call:
{"task_id": "2d57a448-1b09-45aa-ad37-e69891ff6ec7"}
```

### task_retry
### plan_retry

Retry a failed task by requeueing the same `task_id`.

Expand All @@ -146,7 +146,7 @@ Notes:
- Only failed tasks can be retried.
- Non-failed tasks return `TASK_NOT_FAILED`.

### task_file_info
### plan_file_info

Return download metadata for report or zip artifacts.

Expand Down Expand Up @@ -177,7 +177,7 @@ Typical successful response:

### Download with `curl`

When `task_file_info` returns a `download_url`, you can download directly with the same `X-API-Key` used for MCP authentication.
When `plan_file_info` returns a `download_url`, you can download directly with the same `X-API-Key` used for MCP authentication.

Download zip:
```bash
Expand All @@ -193,7 +193,7 @@ curl -H "X-API-Key: pex_0123456789abcdef" -O "https://mcp.planexe.org/download/2

The local proxy exposes the same tools as the server, and adds:

### task_download
### plan_download

Download report or zip to a local path.

Expand All @@ -207,7 +207,7 @@ Example call:
{"task_id": "2d57a448-1b09-45aa-ad37-e69891ff6ec7", "artifact": "report"}
```

`PLANEXE_PATH` behavior for `task_download`:
`PLANEXE_PATH` behavior for `plan_download`:
- Save directory is `PLANEXE_PATH`, or current working directory if unset.
- Non-existing directories are created automatically.
- If `PLANEXE_PATH` points to a file, download fails.
Expand Down Expand Up @@ -237,11 +237,11 @@ Common local proxy error codes:
- `DOWNLOAD_FAILED`

Special case:
- `task_file_info` may return `{}` while the artifact is not ready yet (not an error).
- `plan_file_info` may return `{}` while the artifact is not ready yet (not an error).

## Concurrency semantics (practical)

- Each `task_create` call creates a new task with a new `task_id`.
- Each `plan_create` call creates a new task with a new `task_id`.
- The server does not enforce a global “one active task per client” cap.
- Parallelism is a client orchestration concern:
- start with 1 task
Expand Down Expand Up @@ -282,7 +282,7 @@ At this step, the agent writes a high-quality prompt draft (typically 300-800 wo

### 4. Create a plan

The user reviews the prompt and either asks for further changes or confirms it’s good to go. When the user confirms, the agent calls `task_create` with that prompt.
The user reviews the prompt and either asks for further changes or confirms it’s good to go. When the user confirms, the agent calls `plan_create` with that prompt.

Tool call:
```json
Expand All @@ -298,14 +298,14 @@ Get status for my latest task.

Tool call:
```json
{"task_id": "<task_id_from_task_create>"}
{"task_id": "<task_id_from_plan_create>"}
```

If state is `failed`, optional retry:

Tool call:
```json
{"task_id": "<task_id_from_task_create>", "model_profile": "baseline"}
{"task_id": "<task_id_from_plan_create>", "model_profile": "baseline"}
```

### 6. Download the report
Expand All @@ -317,5 +317,5 @@ Download the report for my task.

Tool call:
```json
{"task_id": "<task_id_from_task_create>", "artifact": "report"}
{"task_id": "<task_id_from_plan_create>", "artifact": "report"}
```
22 changes: 11 additions & 11 deletions docs/mcp/mcp_setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,36 +16,36 @@ This is the shortest path to a working PlanExe MCP integration.
Use this compact shape: objective, scope, constraints, timeline, stakeholders, budget/resources, and success criteria.
4. Create the plan task.
5. Poll for status (about every 5 minutes).
6. If status is `failed`, optionally call `task_retry` (defaults to `model_profile=baseline`).
7. Download artifacts via `task_file_info` (cloud) or `task_download` (mcp_local helper).
6. If status is `failed`, optionally call `plan_retry` (defaults to `model_profile=baseline`).
7. Download artifacts via `plan_file_info` (cloud) or `plan_download` (mcp_local helper).

---

## 2. Minimal tool usage

1. `prompt_examples`
2. `model_profiles`
3. `task_create`
4. `task_status`
5. `task_retry` (optional, only for failed tasks)
6. `task_file_info`
3. `plan_create`
4. `plan_status`
5. `plan_retry` (optional, only for failed tasks)
6. `plan_file_info`

Optional local helper:
- `task_download` (provided by `mcp_local`, not `mcp_cloud`)
- `plan_download` (provided by `mcp_local`, not `mcp_cloud`)

For `task_create`:
For `plan_create`:

- Visible arguments: `prompt` (required), `model_profile` (optional).
- Reference: [PlanExe MCP interface](planexe_mcp_interface.md#62-task_create)
- Reference: [PlanExe MCP interface](planexe_mcp_interface.md#62-plan_create)

---

## 3. Success criteria

- You can fetch example prompts.
- You can create a plan task.
- You can fetch artifact metadata/URLs with `task_file_info` (and optionally save locally via `task_download` when using `mcp_local`).
- Your client can parse `error.code` and `error.message` and handle `{}` from `task_file_info` as "not ready yet".
- You can fetch artifact metadata/URLs with `plan_file_info` (and optionally save locally via `plan_download` when using `mcp_local`).
- Your client can parse `error.code` and `error.message` and handle `{}` from `plan_file_info` as "not ready yet".
- If running parallel work, your client tracks multiple `task_id`s explicitly (server-side global cap is not enforced).

---
Expand Down
4 changes: 2 additions & 2 deletions docs/mcp/mcp_welcome.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ No MCP experience is required to get started.
## What you can do

- **Get example prompts** — See what good prompts look like (detailed, typically ~300-800 words). It is the **caller’s responsibility** to take inspiration from these examples and ensure the prompt sent to PlanExe is of similar or better quality. A compact prompt shape works best: objective, scope, constraints, timeline, stakeholders, budget/resources, and success criteria. The agent can refine a vague idea into a high-quality prompt and show it to the user for approval before creating the plan.
- **Create a plan** — Send a prompt; PlanExe starts creating the plan (typically takes 10–20 minutes on baseline profile). If the input prompt is of low quality, the output plan will be crap too. Visible `task_create` options include `model_profile`.
- **Create a plan** — Send a prompt; PlanExe starts creating the plan (typically takes 10–20 minutes on baseline profile). If the input prompt is of low quality, the output plan will be crap too. Visible `plan_create` options include `model_profile`.
- **Check progress** — Ask for status and see how far the plan has gotten.
- **Retry failed runs** — If status is `failed`, call `task_retry` (defaults to baseline model profile) to requeue the same task id.
- **Retry failed runs** — If status is `failed`, call `plan_retry` (defaults to baseline model profile) to requeue the same task id.
- **Download the report** — When the plan is ready, the user specifies whether to download the HTML report or the zip of intermediary files (JSON, MD, CSV).

---
Expand Down
Loading