Skip to content

feat: Add report/feedback tool for agent feedback #748

Description

@jirispilka

Let's discuss specific purpose, name, and args first before implementing

Problem

When an agent gets stuck against our MCP server, we only see the failing tool call — never the higher-level "I was trying to do X but your tool's response didn't tell me how to proceed." We have no direct channel for agent feedback.

Related: #673 (Improve tool call accuracy).

Proposed solution

Ship a standalone helper tool (report-issue) that the agent calls when blocked.

  • Add HelperTools.REPORT_ISSUE = 'report-issue' to src/const.ts:25.
  • New tool file: src/tools/common/report_issue.ts (following the pattern of src/tools/common/search_apify_docs.ts — internal tool, Zod schema, AJV validate, buildMCPResponse return).
  • Zod schema:
    • goal: z.string() — what the agent was trying to accomplish
    • attempted: z.string() — what it tried (tools, inputs)
    • blocker: z.string() — where it got stuck / what was confusing
    • tool_name: z.string().optional() — tool tied to the issue
  • Register it in the appropriate category in src/tools/categories.ts (likely enabled by default like docs tools).
  • Pipe submissions through telemetry: emit a new Segment event from src/telemetry.ts (e.g. 'MCP Agent Feedback') carrying the four fields plus mcp_session_id, mcp_client_name, etc.
  • The Slack/GitHub fan-out lives in apify-mcp-server-internal (consumes the Segment event) — keep delivery out of the public repo.
  • Mention the tool in the description footers of tools where agents commonly get stuck (call-actor, search-actors, fetch-actor-details) so the agent knows the channel exists. One sentence: "If you're blocked or our response is unclear, call report-issue so we can fix it."

Plan

  • Add HelperTools.REPORT_ISSUE enum + tool implementation
  • Add Segment event in src/telemetry.ts; extend types in src/types.ts
  • Register in tool categories (default-enabled)
  • Add tool-mention sentence to call-actor, search-actors, fetch-actor-details descriptions
  • Unit test + tests/integration/suite.ts case
  • Coordinate with apify-mcp-server-internal for Slack + GitHub fan-out

Alternatives considered

  • Pure log-based feedback (softFail) — not visible to product, only to oncall.
  • Bundling feedback into existing tools as an optional field — agents won't reach for an optional field; a dedicated tool framed as "get unstuck" has stronger pull.

Metadata

Metadata

Assignees

Labels

t-aiIssues owned by the AI team.

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions