# `get_refine_chat`

_Scripts_

`read` `idempotent`

Get the last N messages (default 20, max 100) of the refine chat attached to a content card, as { role, content } pairs, plus the total message count. Use it to recover what the creator asked for before editing the script.

## Parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `brandId` | `string` | no |  |
| `contentId` | `string` | yes |  |
| `last` | `integer` | no |  |

## Example

### Prompt

```text
What did I ask for the last time I refined this script?
```

### JSON-RPC

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "get_refine_chat",
    "arguments": {
      "contentId": "3f6c2a4e-8b1d-4c7a-9e2f-5a1b0c9d8e7f"
    }
  }
}
```

### curl

```bash
curl -X POST https://app.usedalea.ai/api/mcp/mcp \
  -H "Authorization: Bearer dalea_mcp_..." \
  -H "Content-Type: application/json" \
  -H "Accept: application/json, text/event-stream" \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"get_refine_chat","arguments":{"contentId":"3f6c2a4e-8b1d-4c7a-9e2f-5a1b0c9d8e7f"}}}'
```
