# open_plan_file

`tools/call` · `POST /agent/v1/plan-files:open`

Open a local .plan.md file in the plan viewer, with the ticket its name gives, such as WEB-31.plan.md. Codex opens it when the person opens such a file. Returns the file and its ticket, or null when the name gives no ticket you can open. Needs read access.

- Title: Plan file
- Area: Screens
- Needs the read grant. Read-only. Idempotent.
- Screen: opens the Plan file screen in hosts with MCP Apps.
- Visibility: only MCP App screens call this tool; the model's tool list leaves it out.

## Inputs

- `file` (object, required): The local file the host opened.
  - `name` (string, required): The file's name, such as WEB-31.plan.md. At least 1 character.
  - `resourceUri` (string, required): The host's opaque URI for reading the file. At least 1 character.

## Request

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "open_plan_file",
    "arguments": {
      "file": {
        "name": "WEB-31.plan.md",
        "resourceUri": "file:///Users/maya/code/storefront/WEB-31.plan.md"
      }
    }
  }
}
```

## HTTP request

The same call over the agent HTTP API, with an agent OAuth access token:

```bash
curl -X POST https://api.qa.clankership.net/agent/v1/plan-files:open \
  -H "Authorization: Bearer $CLANKER_AGENT_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "file": {
      "name": "WEB-31.plan.md",
      "resourceUri": "file:///Users/maya/code/storefront/WEB-31.plan.md"
    }
  }'
```
