2 comments

  • farkin88 13 hours ago ago

    I really like the tiny-lib approach. One thing that would make it even more useful in larger systems: OpenTelemetry hooks is if each call to formatMCPError() could optionally:

    start/finish a span (or attach events to the caller’s span), propagate requestId as the span ID / traceparent, and export errorType, isRetryable, etc. as span attributes.

    That way every tool failure would show up in our OTEL dashboards with perfect cross-service correlation. We could drill from an agent retry loop straight to the failing GitHub API call (or user-cancel event) in one click.

    I think OTEL-JS adds a few kB (need to double check that) and can be opt-in via a withTracing: true flag, so the “tiny by default” goal stays intact. What do you think?

    • MutedEstate45 13 hours ago ago

      Hi thanks for the suggestion! I think thats a great idea! I'll look into how to implement this