# cancel_job

Source: https://modulify.ai/docs/mcp/chat/cancel-job

Stops a generation that is currently running on a site.

- Title: Cancel a running generation
- Scope: `chat:write`
- Access: Makes changes

Work the agent has already written to the site is kept. Leave out `jobId` to cancel whichever generation is running, and when none is, the call answers `There is no generation running for this site!`

Stopping a generation parks the site's message queue, so anything queued waits until `resume_queue` releases it. Set `clearSession` to also reset the agent session, so the next message starts a fresh conversation. See [Stop a run](https://modulify.ai/docs/build/site-chat#stop-a-run).

## Inputs

| Input | Type | Required | Description |
| --- | --- | --- | --- |
| `projectId` | string | Yes | The site id. |
| `jobId` | string | No | The generation to cancel. Leave it out for the one running now. |
| `clearSession` | boolean | No | True to also reset the agent session, so the next message starts a fresh conversation. |