feat(providers): expose tool calls in Claude Agent SDK response metadata#7790
Merged
mldangelo merged 1 commit intopromptfoo:mainfrom Feb 23, 2026
Merged
Conversation
Capture all tool calls made during agentic sessions and expose them in response.metadata.toolCalls. Each entry includes the tool name, input, output, error status, and parentToolUseId to distinguish top-level from sub-agent calls. This enables eval assertions on tool usage patterns. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
👍 All Clear
I've reviewed this PR that adds tool call tracking to the Claude Agent SDK provider. The feature captures tool inputs and outputs in response metadata to enable test assertions on tool usage. No LLM security vulnerabilities were identified in this change.
Minimum severity threshold: 🟡 Medium | To re-scan after changes, comment @promptfoo-scanner
Learn more
3 tasks
Member
|
Thank you so much @henriklundstrom! Please reach out if you would like some promptfoo swag! |
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.
Summary
response.metadata.toolCallsparentToolUseIdon each entry (nullfor top-level, set for sub-agent calls) to support filtering by agent scope🤖 Generated with Claude Code