Skip to content

Telemetry: record tool calls rejected by input schemas - #193

Merged
valentinozegna merged 1 commit into
mainfrom
fix/telemetry-schema-rejections
Aug 28, 2026
Merged

Telemetry: record tool calls rejected by input schemas#193
valentinozegna merged 1 commit into
mainfrom
fix/telemetry-schema-rejections

Conversation

@valentinozegna

Copy link
Copy Markdown
Contributor

Summary

  • instrument the MCP tools/call request boundary so SDK input-schema rejections are observable
  • preserve existing handler-level telemetry and exception classes without double-reporting
  • classify validation failures as invalid_argument and carry the SDK validation message into error.message
  • record the rejected call in local JSONL and OpenTelemetry calls/errors/duration/log/span output
  • document that schema-rejected calls are included

Closes #191

Testing

  • npm run type-check
  • npm run lint
  • npm test (995 passed, 5 skipped)
  • npm run build
  • end-to-end OTLP test verifies one error span, one error log, tool.calls, tool.errors, invalid_argument, and the offending search_path argument
  • Bun standalone binary smoke-built with VERSION=1.7.5 and reported v1.7.5

@valentinozegna
valentinozegna enabled auto-merge (squash) August 28, 2026 17:20
@valentinozegna
valentinozegna merged commit decd4e6 into main Aug 28, 2026
2 checks passed
@valentinozegna
valentinozegna deleted the fix/telemetry-schema-rejections branch August 28, 2026 17:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Telemetry: argument-schema rejections emit nothing, so bad tool calls are invisible

1 participant