Skip to content

How to take feedback from agents

Every app with telltale takes feedback at POST {api_prefix}/feedback. The route is listed in the app’s OpenAPI file, with a description that tells agents what it is for, so an agent reading your API can find it with no setup on your part:

Terminal window
curl -X POST https://myapp.example.org/api/feedback \
-H 'Content-Type: application/json' \
-d '{"text": "search returns nothing for exact titles", "category": "bug"}'

If your app has an MCP server, you can also give agents a send_feedback tool and time your other tools.

  1. Import the tool definition and its handler:

    from .vendor.telltale.mcp import SEND_FEEDBACK_TOOL, handle_send_feedback
  2. Register SEND_FEEDBACK_TOOL with your MCP server. It is a plain dict with the tool’s name, description and input schema.

  3. Answer calls with the handler. Pass the clientInfo from the MCP handshake, so the note is filed under the agent that sent it:

    result = handle_send_feedback(tt, args, client_info)

    The result is {"id", "message"} when the note is taken, or {"error": ...} when it is refused, for example over the rate limit.

Wrap each tool with tt.mcp_tool:

@tt.mcp_tool("search")
def search(query: str):
return run_search(query)

An exception, or a returned {"error": ...}, counts as a failed call. Requests under TELLTALE_MCP_PATH (default /mcp) are filed under the mcp surface.