-
Notifications
You must be signed in to change notification settings - Fork 492
feat(contrib/go-sdk): Add intent capture to go-sdk
#4209
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
This stack of pull requests is managed by Graphite. Learn more about stacking. |
go-sdk
bcc1ff0 to
b697f68
Compare
BenchmarksBenchmark execution time: 2025-12-05 22:05:55 Comparing candidate commit 3fc56c6 in PR branch Found 0 performance improvements and 1 performance regressions! Performance is the same for 15 metrics, 8 unstable metrics. scenario:BenchmarkParallelMetrics/distribution/handle-reused-25
|
|
✅ Tests 🎉 All green!❄️ No new flaky tests detected 🔗 Commit SHA: 3fc56c6 | Docs | Datadog PR Page | Was this helpful? Give us feedback! |
b697f68 to
b6ef884
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files🚀 New features to boost your workflow:
|
b6ef884 to
47b647a
Compare
299d5b6 to
b30dc5b
Compare
47b647a to
b68fef9
Compare
b68fef9 to
d6f341a
Compare
b30dc5b to
a1b1e1a
Compare
d6f341a to
eaf72fb
Compare
eaf72fb to
d08bbba
Compare
genesor
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, somes nits mostly about code style.
| // Ordering: | ||
| // The tracing middleware must run first so that the span is created and can be annotated with the intent. | ||
| // The SDK wraps the handler with each successive middleware added, so the last added runs first. | ||
| // Confusingly, the go-sdk code has a comment suggesting the opposite, but the actual implementation only reverses the order of a set of middleware added in the same AddReceivingMiddleware call, not middleware added successively as done here. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is the go-sdk team aware of this? It might be a good idea to either fix the comment or the ordering issue in their implementation upstream.
If they update the code and break our implementation that wouldn't be ideal.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Submitted a PR modelcontextprotocol/go-sdk#688
d08bbba to
8a141b4
Compare
8a141b4 to
2fdb71b
Compare
hannahkm
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LP related content (testing, general code structure) lgtm. I'll defer to SDK/IDM to review the details!

What does this PR do?
Adds the same functionality as #4123, but for
modelcontextprotocol/go-sdk, while that PR was formark3labs/mcp-go.In summary, this means modifying the tool schemas to add an intent parameter for the client to pass, then recording that value on the span.
Motivation
Relates to MLOB-4639
Reviewer's Checklist
./scripts/lint.shlocally.Unsure? Have a question? Request a review!