Skip to content

feat(sdk): record tool descriptions and schemas as captured input - #235

Merged
aikins01 merged 1 commit into
mainfrom
feat/tool-definitions-capture
Nov 26, 2026
Merged

aikins01 merged 1 commit into
mainfrom
feat/tool-definitions-capture

Conversation

@aikins01

Copy link
Copy Markdown
Contributor

Model spans now record what each offered tool accepts, not only its name. gen_ai.tool.definitions keeps each tool's type and name whatever the capture flags, and with input capture on it adds the tool's description and its input JSON Schema as parameters, which pass through mask. Built-in provider tools stay {type, name}.

These integrations record the list:

  • Anthropic, OpenAI (Chat Completions and Responses), OpenRouter, Bedrock Converse, and Google GenAI, in TypeScript and Python
  • AI SDK 6 and 7, and LangChain
  • LiteLLM

Google GenAI used to record descriptions and schemas whatever the capture flags. They now need input capture, like the rest.

The core SDKs apply the same rule to the attribute itself, so values that older integrations or apps set by hand follow it too. The value can be JSON text or an array of one JSON text per tool. Descriptions and schemas count as content for maxAttributeLength: a list that does not fit keeps only types and names, so it stays JSON instead of being cut. Each integration also checks input capture before adding descriptions, which keeps them out with a core older than this rule.

The Python integrations still allow telemetry-dev>=0.3.0. With an older core and a mask, an integration from this change would send descriptions without masking them, so their minimum should move to the first core release with this rule, as #122 did for 0.3.0. The TypeScript peers move with the release.

Model spans list the tools offered to the model in gen_ai.tool.definitions,
now with each tool's description and input JSON Schema when input capture
is on. Each tool's type and name stay recorded whatever the capture flags.

The Anthropic, OpenAI, OpenRouter, Bedrock Converse, Google GenAI, and AI SDK
integrations (TypeScript and Python where both exist), LangChain, and the
Python LiteLLM integration record the list. Google GenAI previously recorded
descriptions and schemas whatever the capture flags; they now need input
capture too.

The core SDKs apply one rule to the attribute, so older integrations and
values set by hand follow it: with input capture off only types and names
stay, and with a mask the definitions go through it. The value can be JSON
text or an array of one JSON text per tool. A list longer than the attribute
limit keeps only types and names, so that it stays JSON.
@aikins01 aikins01 self-assigned this Nov 26, 2026
@aikins01
aikins01 merged commit 091692b into main Nov 26, 2026
11 checks passed
@aikins01 aikins01 mentioned this pull request Nov 26, 2026
@aikins01
aikins01 deleted the feat/tool-definitions-capture branch November 26, 2026 15:35
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.

1 participant