# submit\_feedback

Record whether a conversation helped, as an up or down rating with the reason, without asking another question.

Feedback belongs to the conversation, not to one answer. Each call adds a separate event to the chat, so a client can send several, at any point, including while an answer is still running. Submitting feedback starts no answer and runs no SQL.

The rating and its justification appear in the chat in the web app, marked as MCP feedback. They count as evidence when Cassis analyzes conversations for context gaps, and Cassis can take them into account when answering later questions in the same chat.

A client typically calls it when the user says an answer was right or wrong, passing the user’s reason as the justification. Only the person who started the chat can rate it.

## Parameters

| Name | Type | Notes |
| --- | --- | --- |
| `chat_id` | string | The chat to rate, as returned by [`ask_question`](/reference/mcp/ask-question/). Required |
| `rating` | string | `"up"` or `"down"`. Required |
| `justification` | string | Why the conversation helped or did not. Required: 1 to 10,000 characters, after surrounding whitespace is trimmed |
| `project_id` | UUID | The chat’s project. Required, except with an API key scoped to one project, where it defaults to that project |

## Response

| Field | Notes |
| --- | --- |
| `status` | `"recorded"` |
| `feedback_id` | The id of the new feedback event |
| `chat_id` | The rated chat |
| `rating` | `"up"` or `"down"` |
| `justification` | The recorded text, trimmed |
| `source` | `"mcp"` |
| `created_at` | When the event was recorded, ISO 8601 |
| `error` | Set instead of the keys above when the call fails: a malformed `chat_id`, an empty or overlong justification, or a chat that is not the caller’s own data chat, which returns `"Chat not found"` |

## Example

The user tells the agent the answer counted refunded orders, and the client sends:

```yaml
chat_id: "019e3a41-7c2d-7b10-8f4e-2d61c0a9b7e5"
rating: "down"
justification: "Revenue should exclude refunded orders."
```

Cassis records the event and returns:

```yaml
status: "recorded"
feedback_id: "019e3a44-0b18-7d55-a3c2-91f6e8d40c27"
chat_id: "019e3a41-7c2d-7b10-8f4e-2d61c0a9b7e5"
rating: "down"
justification: "Revenue should exclude refunded orders."
source: "mcp"
created_at: "2026-10-08T14:02:11.482913+00:00"
```

The chat itself continues as before: send the next question with the same `chat_id`, or a correction such as “exclude refunded orders” so Cassis re-answers with it.
