> ## Documentation Index
> Fetch the complete documentation index at: https://docs.percio.app/llms.txt
> Use this file to discover all available pages before exploring further.

# chat_scenario

> MCP tool — build a test scenario through conversation

The scenario builder. This tool is a conversational loop between **you** and Percio's scenario assistant — the MCP client (Cursor) acts strictly as a **relay**, passing your messages in and displaying the assistant's replies.

## Inputs

| Field      | Type   | Description                                                                                                                                                        |
| ---------- | ------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `url`      | string | The URL you want to test. Supports `localhost` and any valid URL.                                                                                                  |
| `messages` | array  | Full conversation history. Each entry has `role` (`user` or `assistant`) and `content` (string). Append each new message and resend the whole array on every call. |

## Output

The assistant's next response. Includes a `isReadyToTest` boolean and, once the scenario is finalized, a `testConfig` with the generated scenario string.

## The relay rule

This is important — the MCP client must not answer the assistant's questions on your behalf. When the assistant asks "What does success look like?", Cursor must show you the question verbatim and wait for your answer. Only words you actually typed should appear as `role: "user"` messages.

If you notice the client inventing answers or skipping your input, stop it and tell it to relay the assistant's question back to you.

## Typical loop

1. Client calls `chat_scenario` with `role: "user"` saying what you want to test.
2. Assistant replies with a clarifying question.
3. Client displays the question to you verbatim.
4. You answer.
5. Client appends `role: "user"` and `role: "assistant"` messages to the history and calls again.
6. Repeat until `isReadyToTest: true`.
7. Client shows you the final scenario for approval.
8. On approval, client calls [`run_usability_test`](/agent/mcp-tools/run-usability-test) with the scenario as `task`.

## When to use it

Whenever you want Cursor to help you build a scenario — anytime you're about to kick off a test and don't have an exact scenario in mind. Even if you do, running this tool gives you a sharper, more testable version of your idea.

## Example prompt in Cursor

> "Help me test the checkout flow at `http://localhost:3000/checkout`. I want to make sure the guest checkout path works."

Cursor will call `chat_scenario` and start the Q\&A with you.

## What's next

* [run\_usability\_test](/agent/mcp-tools/run-usability-test)
* [chat\_persona](/agent/mcp-tools/chat-persona)
