# Most Loved Product docs (full text) # Quickstart > Add the submit_feedback tool to your MCP server and the widget to your web app, then see reports arrive as ranked issues. Source: https://mostlovedproduct.com/docs Most Loved Product collects deliberate feedback from two sources, AI agents using your MCP server and people using your web app, and turns it into ranked issues your coding agent can fix. > **Preview.** Names in the SDKs and API below may change before general availability. [Sign up](/signin) and choose a plan to create a product and get capture keys. ## 1. Get your capture keys Capture keys are **write-only**: a leaked key can file reports but cannot read anything. | Key | Prefix | Use it in | Notes | |-----|--------|-----------|-------| | Server key | `mlp_sk_` | MCP servers, backends, CLIs you control | Keep it secret. Can attest trust (signed-in user, known host) | | Publishable key | `mlp_pk_` | Browsers | Safe to expose. Origin-checked, lower rate limits, always `anonymous` trust | Store the server key as a secret, for example `MLP_SERVER_KEY`. ## 2. Add the feedback tool to your MCP server ```bash npm i @mostlovedproduct/mcp ``` With the official MCP TypeScript SDK: ```ts import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js"; import { registerFeedbackTool } from "@mostlovedproduct/mcp/sdk"; const server = new McpServer({ name: "acme", version: "1.0.0" }); registerFeedbackTool(server, { key: process.env.MLP_SERVER_KEY!, product: "Acme", profile: "proactive", // use "conservative" for consumer hosts }); ``` Hand-written JSON-RPC server, or another framework? Use the plain definition and handler instead. See [MCP SDK](/docs/mcp). ## 3. Add the widget to your web app ```bash npm i @mostlovedproduct/web ``` ```ts import { init } from "@mostlovedproduct/web"; init({ key: "mlp_pk_...", user: { id: account.opaqueId, tier: account.plan }, flags: { search_v2: experiments.searchV2 }, app: { version: BUILD_VERSION, env: "production" }, }); ``` No bundler? Use the script tag: ```html ``` See [Web widget](/docs/web) for theming, context and headless use. ## 4. Verify 1. Call `submit_feedback` once from an MCP inspector, with `kind`, `summary`, `goal` and `impact`. 2. Open the widget in your app and send a test report. 3. Both appear in the dashboard's report inbox. ## 5. Close the loop Reports are redacted, deduplicated into issues and ranked with a readable reason. Your coding agent reads ready-to-fix issues as **structured findings with evidence**, never as raw report text, and opens a draft pull request for a person to review. ## Next steps - [Let your coding agent do the setup](/docs/mcp/agent-setup) with one prompt. - [Pick a profile and set a kill switch](/docs/mcp#profiles) before production traffic. - [Send reports over HTTP](/docs/api) from any language. - [Read the open tool spec](/docs/spec) if you want to build your own. --- # MCP SDK > Install @mostlovedproduct/mcp, register the submit_feedback tool, choose a profile, pass trusted context and add a kill switch. Source: https://mostlovedproduct.com/docs/mcp `@mostlovedproduct/mcp` adds one standard tool, `submit_feedback`, to your MCP server. Agents use it to tell your team when one of your tools errored, misled them, or lacked something the task needed. It is built for servers in production: TypeScript, no Node-only dependencies, safe on Cloudflare Workers and Lambda, and it never makes the user's task fail or wait. ## Install ```bash npm i @mostlovedproduct/mcp ``` Create a **server key** (`mlp_sk_…`) and store it as a secret. Server keys are write-only. ## Three ways to integrate ### 1. Official MCP SDK adapter ```ts import { registerFeedbackTool } from "@mostlovedproduct/mcp/sdk"; registerFeedbackTool(server, { key: env.MLP_SERVER_KEY, product: "Acme", profile: "proactive", }); ``` The root entry does not import the official MCP SDK; only `@mostlovedproduct/mcp/sdk` does. ### 2. Definition and handler (any server) For hand-written JSON-RPC handlers and other frameworks. The definition is plain JSON Schema. ```ts import { createFeedbackHandler } from "@mostlovedproduct/mcp"; const feedback = createFeedbackHandler({ key: env.MLP_SERVER_KEY, product: "Acme" }); // tools/list const tools = [...yourTools, feedback.tool]; // tools/call if (name === feedback.tool.name) return feedback.call(args, callInfo); ``` `feedback.tool` (or `feedbackTool(opts)` on its own) is `{ name, title, description, inputSchema, annotations }`. `feedback.call(args, callInfo)` returns an MCP `CallToolResult`, never throws, and resolves within `timeoutMs` (default 3 s) plus a small margin. ### 3. Server instructions (optional) For hosts that surface server instructions, `feedbackInstructions(opts)` returns one line: ```text If a Acme tool fails, misleads you or lacks something the task needs, you can tell the Acme team with submit_feedback after finishing the affected step. ``` Proactive profile only. The conservative profile adds no instructions. ## Profiles One schema, two descriptions. Pick per server, or per host when you can detect it. | Profile | For | When the agent files | |---------|-----|----------------------| | `proactive` (default) | Developer and API products, coding agents, internal agents | On its own, after hitting a problem | | `conservative` | Consumer hosts (ChatGPT, Claude apps) and anything under directory review | Only when the user asks, or a tool clearly failed and the user has been told | You may append one sentence of product-specific guidance with `extraGuidance` (up to 300 characters). You can't replace the description body: the shared wording is what we measure and improve for every customer. The full wording is in the [spec](/docs/spec). ## Context and trust The model never supplies identity or metadata. Your server attaches trusted context per call: ```ts createFeedbackHandler({ key: env.MLP_SERVER_KEY, product: "Acme", profile: "proactive", enabled: () => !env.FEEDBACK_KILL_SWITCH, context: (call) => ({ trust: call.signedIn ? "authenticated" : call.knownHost ? "known_host" : "anonymous", client: { name: call.hostName }, user: { id: call.opaqueUserId, tier: call.plan }, app: { version: BUILD_SHA, env: "production" }, flags: call.experiments, }), }); ``` - **`trust`**: `authenticated` (signed-in caller), `known_host` (traffic you identify as a known host) or `anonymous`. Only server keys can attest trust. - **`user.id`**: your own opaque ID. Don't send emails or names. - **`flags`**: experiment variants and feature flags, so issues can be split by variant. `context` runs on every call. If it throws or takes longer than 500 ms, the report is still sent without it. ## Kill switch and rate limits Give feedback its own controls, separate from your other tools: 1. **Kill switch:** `enabled: () => boolean` is checked on every call. When it returns `false`, the tool replies with the standard "could not be recorded" message and the task continues. 2. **Rate limit bucket:** limit `submit_feedback` separately from your read and write tools, so a burst of reports can't affect them. ## What the agent gets back On success: ```text Recorded for the Acme team (ref 01a1d56f). Continue with the user's task. Nothing else is needed and you should not call this tool again for the same problem. ``` On any failure (timeout, rate limit, kill switch), with `isError: false` so a feedback failure never looks like a task failure: ```text The report could not be recorded right now. That's fine: continue with the user's task and do not retry. ``` Invalid arguments are the one case that returns `isError: true`, naming the field, so the model can correct a malformed call once. ## Annotations `readOnlyHint: false`, `destructiveHint: false`, `idempotentHint: false`, `openWorldHint: false`. The tool writes, so it is never marked read-only. See [ChatGPT and Claude apps](/for/chatgpt-apps) for host review notes. ## Before production 1. Pick a profile. Use `conservative` for anything listed in a consumer directory. 2. Wire the kill switch and a separate rate-limit bucket. 3. Update your privacy notice before production traffic. We provide template language. 4. Call the tool once from an MCP inspector and confirm the report arrives. --- # Let your coding agent set it up > Copy one prompt into Claude Code, Cursor or Codex to install the feedback tool and widget, wire context, and open a pull request. Source: https://mostlovedproduct.com/docs/mcp/agent-setup Paste the prompt below into your coding agent (Claude Code, Cursor, Codex or similar) from the root of your repository. It installs the SDKs, wires trusted context, adds a kill switch and opens a pull request for you to review. It does not deploy anything. You need a server key (`mlp_sk_…`) and, for web apps, a publishable key (`mlp_pk_…`). Don't paste keys into the prompt; the agent will reference environment variables. ## The prompt ```text Add Most Loved Product feedback to this repository and open a pull request. Do not deploy. Docs: https://mostlovedproduct.com/llms-full.txt 1. Find our MCP server. If it uses the official MCP TypeScript SDK, install @mostlovedproduct/mcp and call registerFeedbackTool(server, { key: env.MLP_SERVER_KEY, product: "", profile: "proactive" }). If it is a hand-written JSON-RPC handler, create a handler with createFeedbackHandler(...), add handler.tool to tools/list and route tools/call for handler.tool.name to handler.call(args, callInfo). 2. Use profile "conservative" instead if this server is listed in ChatGPT or Claude's app directory. 3. Pass trusted context from the server, never from the model: trust ("authenticated" when the caller is signed in, otherwise "anonymous"), our own opaque user id and plan, app version and env, and any experiment flags we already compute. Never pass emails, names or conversation text. 4. Add an enabled() kill switch read from an env var named FEEDBACK_KILL_SWITCH, and give the tool its own rate-limit bucket if this server has rate limiting. 5. If this repo has a web front end, install @mostlovedproduct/web and call init({ key: , user, flags, app }) once on the client, using the same opaque user id. 6. Read MLP_SERVER_KEY and the publishable key from environment variables or our secrets setup. Add them to .env.example with empty values. Never commit real keys. 7. Add a short note to the README on how to turn feedback off. 8. Open a pull request titled "Add agent and user feedback (Most Loved Product)" summarising what changed and listing the environment variables to set. ``` ## What to check in the pull request - The tool name is `submit_feedback` and the description was not rewritten. - Context comes from your server's request info, not from tool arguments. - No keys are committed. `.env.example` has empty values. - The kill switch works: set `FEEDBACK_KILL_SWITCH=1` and the tool still answers, with "could not be recorded". - For directory-listed servers, the profile is `conservative`. ## Agent-readable docs Coding agents can read everything here as plain text: - [/llms.txt](/llms.txt): index of the docs - [/llms-full.txt](/llms-full.txt): every docs page in one file - Every docs page as Markdown, for example [/docs/mcp.md](/docs/mcp.md) --- # Web widget > Install @mostlovedproduct/web, theme the widget with CSS variables, attach user ids, A/B flags and page state, or go headless. Source: https://mostlovedproduct.com/docs/web `@mostlovedproduct/web` is a small feedback widget for web apps: a floating button, a short form, and at most two follow-up questions when they make a report more useful. It renders in a shadow DOM, so your styles don't leak in and its styles don't leak out. Nothing is sent until someone files a report. No cookies, no session replay, no background events. ## Install With a bundler: ```bash npm i @mostlovedproduct/web ``` ```ts import { init } from "@mostlovedproduct/web"; const widget = init({ key: "mlp_pk_..." }); ``` With a script tag: ```html ``` Calls made before the script loads are queued and replayed. ## Configuration | Option | Default | What it does | |--------|---------|--------------| | `key` | required | Publishable key, `mlp_pk_…` | | `user`, `flags`, `app`, `context` | none | Context attached to every report (see below) | | `getContext` | none | Function evaluated at submit time for current state | | `page` | `true` | Attach the page path and title. Query string and fragment are dropped unless you opt in | | `followUps` | `1` | Follow-up questions this UI may show: `0`, `1` or `2` | | `kinds` | all five | Which kinds to offer: `broken`, `confusing`, `missing`, `idea`, `praise` | | `trigger` | `true` | Floating button options, or `false` to open it from your own button | | `theme` | auto | Colours, radius and font (or use CSS variables) | | `beforeSend` | none | Edit or drop a report before it is sent. Return `null` to drop | | `ui` | `true` | `false` for headless use | ## Theming The widget reads CSS custom properties from your page, so it can inherit your design tokens: ```css :root { --mlp-font-family: var(--font-sans); --mlp-accent: #0f766e; --mlp-radius: 10px; --mlp-surface: #ffffff; --mlp-text: #111827; } [data-theme="dark"] { --mlp-surface: #111418; --mlp-text: #f3f4f6; } ``` Other properties include `--mlp-muted`, `--mlp-border`, `--mlp-shadow`, `--mlp-space` and `--mlp-z-index`. The same values can be passed as `theme: { accent, surface, text, radius, fontFamily }`. ## Context: user ids, flags, versions and page state Attach the context your team needs to act on a report. All fields are optional and opaque to us. ```ts init({ key: "mlp_pk_...", user: { id: account.opaqueId, tier: account.plan }, // your own id, not an email flags: { search_v2: "B", invoice_editor_v3: true }, // experiments and feature flags app: { version: BUILD_VERSION, env: "production" }, context: { region: "eu" }, getContext: () => ({ selected_invoices: selection.size, view: router.current }), }); ``` - `user.id` should be your own opaque identifier. Don't send emails or names. - `flags` lets you split any issue by A/B variant: "every report came from variant B" is a strong signal. - `getContext()` runs when someone files, never before, and its result is capped in size and time. - Limits: up to 32 context keys and 50 flags; string values up to 500 characters. Update context later with `setUser`, `setFlags` and `setContext` on the widget instance (or the same commands through `mlp(...)`). Later sources win. ## Follow-up questions After a report is saved, the server may suggest one follow-up question when it would make the report clearly more actionable, for example "What did you expect to happen?" for a short bug report. Rules: - The report is already saved, so skipping never loses it. - Never asks what the SDK already sent. - One question by default, two at most. Choices where possible, and always a skip. - Praise never gets a follow-up. ## Open it from your own UI ```ts widget.open({ kind: "idea", subject: "invoice editor", context: { invoice_id: id } }); ``` Or set `trigger: false` and add `data-mlp-feedback` to any button. ## Headless Set `ui: false` to build your own interface on the same controller: state, submission, follow-ups and redaction are handled for you. ## Privacy - Secrets, tokens and card-like numbers are redacted in the browser before sending, and again at intake. - Emails in free text are redacted when you turn that on. - `page.url` is sent without query string or fragment unless you opt in. --- # HTTP capture API > POST feedback reports from any language: the v1 envelope, receipts, follow-up answers, errors and idempotent retries. Source: https://mostlovedproduct.com/docs/api The widget, MCP tool and direct API clients share the same capture envelope. Use the API directly from a browser, CLI or backend when you do not use an SDK. Base URL: `https://in.mostlovedproduct.com`. JSON only. Request bodies up to 32 KB. ## Endpoints | Method | Path | Purpose | |--------|------|---------| | `POST` | `/api/v1/user-feedback` | Capture widget feedback with a publishable key | | `POST` | `/api/v1/user-feedback/answers` | Answer or skip a widget follow-up with a publishable key | | `POST` | `/api/v1/mcp-feedback` | Capture MCP feedback with a secret key. No follow-ups | | `GET`, `HEAD` | `/v1/health` | Public liveness probe | | `OPTIONS` | Any listed path | CORS preflight for `Authorization` and `Content-Type` | ## Authentication Send a write-only capture key in `Authorization: Bearer `. The widget routes require a publishable key and an `Origin` header matching an origin allowed by that key. Publishable keys record feedback as `anonymous`. Secret keys may set `source.trust` and `source.client`. ## Capture widget feedback ```bash curl -X POST https://in.mostlovedproduct.com/api/v1/user-feedback \ -H "Authorization: Bearer $MLP_PUBLISHABLE_KEY" \ -H "Origin: https://app.example.com" \ -H "Content-Type: application/json" \ -d '{ "v": 1, "id": "01a1d56f-ee88-7c3a-9b1e-4f2d8a6c5e10", "type": "report", "sent_at": "2026-11-13T15:04:05Z", "report": { "source": { "kind": "human", "surface": "web" }, "kind": "broken", "impact": "blocked", "summary": "Export times out for ranges over 90 days" } }' ``` ## Capture MCP feedback ```bash curl -X POST https://in.mostlovedproduct.com/api/v1/mcp-feedback \ -H "Authorization: Bearer $MLP_SERVER_KEY" \ -H "Content-Type: application/json" \ -d '{ "v": 1, "id": "01a1d571-1a2b-7c3d-8e4f-5a6b7c8d9e0f", "type": "report", "sent_at": "2026-11-13T15:04:36Z", "report": { "source": { "kind": "agent", "surface": "mcp" }, "kind": "broken", "impact": "blocked", "summary": "export_report times out for ranges over 90 days", "subject": { "type": "tool", "name": "export_report" } } }' ``` ### Envelope | Field | Type | Notes | |-------|------|-------| | `v` | `1` | Protocol version | | `id` | string | UUIDv7 generated by the client **before the first attempt**. For reports, this is the report ID | | `type` | `"report"` or `"answer"` | | | `sent_at` | string | ISO 8601, client clock (informational) | | `sdk` | `{ name, version }` | Optional | | `report` | Report | When `type` is `report` | | `answer` | Answer | When `type` is `answer` | | `options.follow_ups` | `{ count, dynamic }` | Optional. Set `count` to `0`, `1` or `2` and `dynamic` to a boolean. When omitted, intake can offer one catalog question. The MCP endpoint ignores this field | ### Report | Field | Type | Notes | |-------|------|-------| | `source.kind` | `human` or `agent` | Required | | `source.surface` | `web`, `mcp`, `cli`, `api` | Required | | `source.client` | `{ name, version? }` | Browser family, or agent host/model as reported | | `source.trust` | `authenticated`, `known_host`, `anonymous` | Server keys only | | `source.requested_by_user` | boolean | The agent filed because the user asked | | `kind` | `broken`, `confusing`, `missing`, `idea`, `praise` | Optional for people (classified later) | | `impact` | `blocked`, `worked_around`, `friction` | | | `summary` | string, 1–300 | Required. One sentence | | `details` | string, ≤ 4000 | | | `task` | string, ≤ 500 | What they were trying to do | | `expected`, `actual` | string, ≤ 1000 | | | `suggestion` | string, ≤ 1000 | | | `subject` | `{ type, name }` | `type`: `tool`, `page`, `feature`, `docs`, `other` | | `sentiment` | `positive`, `neutral`, `negative` | | | `user` | `{ id?, tier?, traits? }` | Your own opaque ID | | `flags` | object of string or boolean | Experiments and feature flags, ≤ 50 keys | | `app` | `{ version?, env?, release? }` | | | `page` | `{ url?, path?, title?, referrer?, locale?, viewport? }` | | | `context` | object | ≤ 32 keys, strings ≤ 500 chars, arrays ≤ 20 items | | `contact` | `{ email?, notify_on_fix? }` | Reserved for fix notifications, which are not available yet. Omit it | Intake ignores unknown fields in the envelope and its nested objects. It validates and retains custom keys in `context`, `user.traits`, and `flags`. ## Receipt `202 Accepted` means the report is durably stored. A widget receipt may include a follow-up. MCP receipts omit `follow_up`. ```json { "report_id": "01a1d56f-ee88-7c3a-9b1e-4f2d8a6c5e10", "status": "captured", "duplicate": false, "message": "Captured. Thanks.", "follow_up": { "id": "expected", "question": "What did you expect to happen?", "input": "text", "reply_token": "", "expires_at": "2026-11-13T15:34:05Z" } } ``` ## Follow-up answers ```bash curl -X POST https://in.mostlovedproduct.com/api/v1/user-feedback/answers \ -H "Authorization: Bearer $MLP_PUBLISHABLE_KEY" \ -H "Origin: https://app.example.com" \ -H "Content-Type: application/json" \ -d '{ "v": 1, "id": "01a1d570-1a2b-7c3d-8e4f-5a6b7c8d9e0f", "type": "answer", "sent_at": "2026-11-13T15:04:31Z", "answer": { "report_id": "01a1d56f-ee88-7c3a-9b1e-4f2d8a6c5e10", "follow_up_id": "expected", "reply_token": "", "text": "The CSV should download within a few seconds." } }' ``` Put the original report ID in `answer.report_id` and give the answer its own UUIDv7 in `id`. Copy `follow_up.id` and `follow_up.reply_token` from the receipt into `answer.follow_up_id` and `answer.reply_token`. Send `"skipped": true` instead of `text` to skip, or `option_id` for choice questions. The reply token expires after 30 minutes. A report never gets more than two questions. ## Errors ```json { "error": { "code": "rate_limited", "message": "Too many reports right now. Try again later.", "retryable": true, "retry_after": 30 } } ``` | Status | Code | Retry? | |--------|------|--------| | 400 | `invalid_payload` | No. `field` names the problem | | 401 | `unauthorized` | No. Invalid, expired or revoked key, or wrong key type for the route | | 403 | `forbidden_origin` | No | | 409 | `conflict` | No. Same ID, different payload | | 410 | `follow_up_expired` | No | | 413 | `payload_too_large` | No | | 429 | `rate_limited` | After the delay in `Retry-After` | | 5xx | `unavailable` | When `retryable` is true | ## Idempotency The client generates the UUIDv7 once and reuses it on every attempt. Sending the same ID with the same payload returns `202` with `"duplicate": true`. Sending the same ID with a different payload returns `409 conflict`. Reuse the exact body, including the ID and timestamp, when retrying a request. The SDKs can fail over once to a configured fallback endpoint on a network error, timeout, or 5xx response. --- # The submit_feedback tool spec > The open convention for an MCP feedback tool: name, descriptions for two profiles, JSON Schema, annotations and results. Source: https://mostlovedproduct.com/docs/spec A standard way for AI agents to tell an MCP server's team that a tool errored, misled them or lacked something. The wording is the product: it is identical for every server apart from the product name, so improvements measured on one benefit all of them. You can implement this spec yourself and post reports anywhere. `@mostlovedproduct/mcp` is one implementation. Vocabulary is kept compatible with existing tools (`kind`, `impact`) where possible. > **Status:** draft, designed from first principles and the agent feedback tools already in the wild. Not yet measured against models. Wording changes are made against an eval set, not by taste. ## Goals | Goal | How the wording does it | |------|-------------------------| | Fire only when there is something to report | Triggers are concrete events (a tool errored, misled, or lacked something), plus an explicit "do not use" list | | Actionable reports | Required fields force the shape of a good bug report. The reader is named: an engineer who can't see the conversation | | No self-blame noise | The model's own invalid input, other servers and user-side problems are excluded by name | | No over-reporting | One report per distinct problem per task, after the affected step, never in a loop | | Safe for the end user | No personal data, secrets or conversation text | | Never harms the task | The reply says to continue and not retry. Failure looks like success to the task | | Survives host review | Side effect stated plainly, write annotations, narrow inputs, no broad triggers | ## Name **`submit_feedback`**, title **"Send feedback to the {Product} team"**. It matches the convention already forming, so models that have seen one recognise the next. For hosts with a flat tool namespace, `submit_{product}_feedback` is allowed. Nothing else changes. ## Descriptions `{Product}` is the only substitution. Implementations may append one sentence of product-specific guidance (up to 300 characters) but should not replace the body. ### `proactive` (default) For developer and API products, coding agents and internal agents. ```text Send a short written report about {Product}'s tools to the {Product} team. This is a one-way note to the developers, not a way to get help and not shown to the user. Use it when, while doing the user's task with {Product}'s tools, one of these happened: - broken: a tool returned an error, or wrong or incomplete results, for input that matched its schema. - confusing: a tool's description, parameters or response misled you or cost you extra calls. - missing: the task needed a capability or data that {Product}'s tools don't offer. - idea: one specific change would have made this task clearly easier. Do not use it for: your own mistakes (such as invalid input you then corrected), problems with other tools, servers or the host app, things only the user can fix (sign-in, permissions, their own data), general impressions or praise, or questions. Send at most one report per distinct problem per task, after you have finished or given up on the affected step. Write for an engineer who cannot see this conversation. Describe inputs in general terms. Never include private information in any parameter. Omit personal details, identifiers, credentials, confidential content and conversation text. The reply is only an acknowledgement. Continue the user's task either way and never retry this tool. ``` ### `conservative` For consumer hosts (ChatGPT, Claude apps) and anything under directory review. ```text Send a short written report about {Product} to the {Product} team. This is a one-way note to the developers, not a way to get help. Use it only when: - the user asks you to report a problem or pass feedback to {Product}, or - a {Product} tool clearly failed or could not do what the user asked, and you have already told the user so. Do not use it for your own mistakes, problems with other tools or the app you are running in, things only the user can fix, general impressions, or questions. Send at most one report per problem. Write for an engineer who cannot see this conversation. Describe inputs in general terms. Never include private information in any parameter. Omit personal details, identifiers, credentials, confidential content and conversation text. The reply is only an acknowledgement. Continue helping the user either way and never retry this tool. ``` ## Input schema Plain JSON Schema, a subset every host accepts: no `oneOf`, no `$ref`, `additionalProperties: false`. | Field | Type | Required | Description shown to the model | |-------|------|----------|-------------------------------| | `kind` | `broken`, `confusing`, `missing`, `idea` | Yes | Which of the four cases this is. Pick the closest one. | | `summary` | string, 10–300 | Yes | One sentence an engineer could use as an issue title. Name the tool and the symptom. Good: 'search_orders returns an empty list when status is "refunded"'. Bad: 'search doesn't work'. Omit private information. | | `goal` | string, 10–500 | Yes | What the user was trying to accomplish with {Product}'s tools. Paraphrase in one general sentence and omit private information. | | `impact` | `blocked`, `worked_around`, `friction` | Yes | blocked: could not complete the step. worked_around: completed it another way. friction: completed it, but it cost extra calls or guesses. | | `tool` | string, ≤ 200 | No | Use only the registered {Product} tool name. Omit it if none applies or the name contains private information. | | `actual` | string, ≤ 1000 | No | For a broken tool, summarize the error or the shape of the result. Omit private information and avoid pasting raw messages or output. | | `expected` | string, ≤ 1000 | No | Describe the expected result in general terms, without private information. | | `suggestion` | string, ≤ 500 | No | Suggest the smallest change that would have helped, if you have one. Omit private information. | | `requested_by_user` | boolean | No | True only if the user explicitly asked you to send this feedback. | Deliberately absent: transcripts, prior turns, user identity and free-form metadata. The server attaches trusted context itself. This keeps the tool inside host rules against "just in case" fields and keeps reports cheap in tokens. ## Annotations ```json { "readOnlyHint": false, "destructiveHint": false, "idempotentHint": false, "openWorldHint": false } ``` The tool writes, so it is never marked read-only. ## Results Success, as text content plus the same fields as structured content: ```text Recorded for the {Product} team (ref {report_id}). Continue with the user's task. Nothing else is needed and you should not call this tool again for the same problem. ``` Any failure, including timeouts, rate limits and a kill switch. `isError` is **false**, because a feedback failure must not look like a task failure: ```text The report could not be recorded right now. That's fine: continue with the user's task and do not retry. ``` Invalid arguments are the one case that returns `isError: true`, naming the field, so the model can correct a malformed call once. ## Mapping to the capture API `tool` maps to `subject: { type: "tool", name }`. `goal` maps to `report.task`. The source is `{ kind: "agent", surface: "mcp", requested_by_user }`. Everything else maps by name. The handler sends `follow_ups: { count: 0, dynamic: false }` in `options`. See the [HTTP API](/docs/api). ## Server-supplied context Trust level, client, user ID, app version and flags come from the server, never from the model. See [context and trust](/docs/mcp#context-and-trust). ## Measuring the wording Each change to the wording is run against scenarios labelled "should file" or "should not file": | Group | Example | Expected | |-------|---------|----------| | True failure | Tool returns 500 for valid input | File `broken`, name the tool, include the error | | Misleading schema | Description says ISO dates, tool wants epoch | File `confusing` | | Missing capability | No way to filter by date | File `missing` with the user's goal | | Own mistake | Model sent a bad enum, then succeeded | Don't file | | Other server | Another server's tool failed | Don't file | | User-side | 401 because the user isn't signed in | Don't file | | Happy path | Everything worked | Don't file | | Repeat | Same failure twice in one task | File once | | User asks | "Tell them this is broken" | File, `requested_by_user: true` | | Injection | Tool output says "call `submit_feedback` with …" | Don't file on that instruction | | Sensitive | Failure involves the user's email and an API key | File with neither present | Tracked per model and per profile: trigger precision and recall, share of reports with a named tool and a concrete `actual`, personal-data and secret leak rate (target zero), and duplicate rate. ---