Repository navigation
feat(attributes): deprecate legacy MCP tool result fields - #689
Merged
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Semver Impact of This PR🟡 Minor (new features) 📋 Changelog PreviewThis is how your changes will appear in the changelog. New Features ✨Attributes
Other
Bug Fixes 🐛Attributes
Documentation 📚
Internal Changes 🔧Deps
Other
🤖 This preview updates automatically when you update the PR. |
betegon
marked this pull request as ready for review
October 8, 2026 12:19
betegon
requested review from
a team,
Lms24,
alexander-alderman-webb,
cleptric,
mjq and
nsdeschenes
as code owners
October 8, 2026 12:19
alexander-alderman-webb
left a comment
Contributor
There was a problem hiding this comment.
Why are these attributes not deprecated in favor of gen_ai.tool.call.result?
They obviously have different semantics, but they can still be deprecated without backfill.
Member
Author
|
right! thanks for the heads up. should be good now |
alexander-alderman-webb
approved these changes
Oct 9, 2026
4 tasks
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Use
gen_ai.tool.call.resultfor captured, successful MCP tool results. Register the 15 flattened tool-result fields already emitted by the JavaScript SDK as deprecated compatibility definitions, with guidance to use that canonical attribute. These definitions document legacy data; they are not a new recommended result format.The two indexed prompt-result fields remain non-deprecated: they describe
prompts/get, sogen_ai.tool.call.resultis not their replacement.mcp.tool.result.<key>.content, are emitted by the SDK but missing from conventions.gen_ai.tool.call.result.mcp.prompt.result.<key>.roleand.contentare missing from conventions.SDK capture
SDK #25060 adds the canonical output as one serialized JSON value containing
contentand, when present,structuredContent. For example, a successful result with two text blocks is captured as:{ "content": [ { "type": "text", "text": "First item" }, { "type": "text", "text": "Second item" } ] }That object is serialized into
gen_ai.tool.call.result, rather than requiring consumers to assemblemcp.tool.result.0.contentandmcp.tool.result.1.content. The SDK change respects output-capture settings and its size limit, and retains legacy fields during the transition. SDK #25059 handles shared constant imports. This conventions PR changes registry metadata; it does not change SDK emission.Deprecation without backfill
The 15 deprecations use
_status: nulland recommendgen_ai.tool.call.resultinreason. They have noreplacementor aliases: a partial field cannot be copied into the complete result, andreplacementwould redirect search resolution even without ingestion backfill. Attribute and search key chains stay independent. The existing singletonmcp.tool.result.contentbackfill is unchanged.This follows the MCP content-count deprecation #669 and the non-equivalent alternatives for
http.target#587. The canonical capture target follows the OpenTelemetry MCP conventions.Definitions preserve existing capture conditions and string scrubbing. The CLI treats only a trailing
.<key>as a dynamic suffix, allowing the indexed legacy fields to generate valid constants. Generated JavaScript, Python, and search metadata are included.Validation:
yarn generate,yarn test(10,206 JavaScript and 12 Python tests),yarn lint(including type checks),yarn build, andyarn docs:buildpass locally. Regression coverage checks all 15 deprecations, independent ingestion/search keys, both non-deprecated prompt fields, existing singleton backfill, and scrubbing.PR Checklist
yarn testand verified that the tests pass.yarn generateto generate and format code and docs.If an attribute was added:
nextjs.function_id, notfunction_id)apply_scrubbing(i.e.manualorauto. Useneveronly for values that should never be scrubbed such as IDs)If an attribute was deprecated: