Skip to content

fix(ai): warn first when an MCP call's argument was ignored - #1386

Merged
Makisuo merged 3 commits into
mainfrom
fix/mcp-unknown-param-notice
Oct 12, 2026
Merged

Makisuo merged 3 commits into
mainfrom
fix/mcp-unknown-param-notice

fix(ai): keep a closer non-bound match over the window suggestion

6b0f968
Select commit
Loading
Failed to load commit list.
Maple Review Bot / Maple / review succeeded Oct 12, 2026 in 1m 42s

Confidence 9/10 · No issues found

🟢 Confidence 9/10 · safe to merge
Both earlier findings are demonstrably fixed in the two files that changed, and the window-suggestion logic is pinned by tests I re-derived by hand.
quality 100/100 · no findings · tests covered · risk medium

Ignored-argument reports move from Note: into a new ToolDoc.warnings rendered first under the title, and a window-shaped unknown key now suggests both bounds. The two earlier findings are fixed; safe to merge.

  • argumentWarnings replaces argumentNotices and renders as Warning: above scope (tool-doc.ts:127)
  • UnknownArgument.suggestions carries both window bounds for a time_range-like key
  • A closer non-bound match now wins over the window guess (decode-issues.ts:105)

Fixed since the last review

  • ✅ F1 · argumentNotices rename leaves pr-review-local.ts importing a missing export
  • ✅ F2 · suggestParameters drops a closer match for any key containing a window word

Production impact

Open errors in the changed files
Issue Service Occurrences File
@maple/api/vcs/VcsSourceRepositoryNotFoundError maple-ai 68 apps/ai/src/mcp/tools/registry.ts
@maple/mcp/errors/McpQueryError maple-chat 42 apps/ai/src/mcp/tools/registry.ts
@maple/mcp/errors/McpQueryError maple-chat 36 apps/ai/src/mcp/tools/registry.ts
@maple/mcp/errors/McpQueryError maple-ai 18 apps/ai/src/mcp/tools/registry.ts
@maple/api/vcs/GithubAppError maple-chat 14 apps/ai/src/mcp/tools/registry.ts
@maple/http/errors/IntegrationsUpstreamError maple-chat 14 apps/ai/src/mcp/tools/registry.ts
@maple/http/errors/IntegrationsUpstreamError maple-chat 11 apps/ai/src/mcp/tools/registry.ts
@maple/mcp/errors/McpQueryError maple-ai 9 apps/ai/src/mcp/tools/registry.ts
@maple/mcp/errors/McpQueryError maple-ai 9 apps/ai/src/mcp/tools/registry.ts
@maple/mcp/errors/McpQueryError maple-chat 8 apps/ai/src/mcp/tools/registry.ts

After this merges, Maple checks whether they stop.

What was checked
  • F1: pr-review-local.ts:61,769 imports and calls argumentWarnings, so the missing export is gone
  • F2: min_duration on a tool with min_duration_ms returns only min_duration_ms (decode-issues.ts:107)
  • Every notices/warnings consumer audited: registry.ts:547 merges, windowNotes.decorate keeps its own notices

6b0f968 · Updated on every push. Reply "won't fix" to dismiss a finding, or mention @maple-review-bot to ask about one.