feat(tool_use): add notebook on auto-detecting ID type in a single tool#690
Open
rgoulartai wants to merge 1 commit into
Open
feat(tool_use): add notebook on auto-detecting ID type in a single tool#690rgoulartai wants to merge 1 commit into
rgoulartai wants to merge 1 commit into
Conversation
…ect by ID structure) Rebased onto current main; PR now contains only the notebook plus registry.yaml and authors.yaml entries.
2227162 to
e115366
Compare
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.
What: A new tool_use notebook on designing a single status-lookup tool that auto-detects an entity's ID type by structure, instead of exposing one tool per ID space or making the model declare the type. Adds the registry and author entries.
Why: A common, generalizable decision when one conceptual entity is addressed by multiple ID formats (orders / payments / checkout sessions / receipts). The notebook compares three designs — one tool per ID space, an explicit id_type parameter, and in-tool auto-detection — and gives a concrete rule for when each applies, including when auto-detection should NOT be used (overlapping or ambiguous formats).
How to test: The notebook runs top to bottom. The routing logic is pure Python and runs with no API key; the tool-use demo cell uses ANTHROPIC_API_KEY with claude-haiku-4-5.
Checklist: