Skip to content

feat(tool_use): add notebook on auto-detecting ID type in a single tool#690

Open
rgoulartai wants to merge 1 commit into
anthropics:mainfrom
kooky-labs:rgoulartai/tool-use-auto-detect-id-type
Open

feat(tool_use): add notebook on auto-detecting ID type in a single tool#690
rgoulartai wants to merge 1 commit into
anthropics:mainfrom
kooky-labs:rgoulartai/tool-use-auto-detect-id-type

Conversation

@rgoulartai

Copy link
Copy Markdown

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:

  • One focused notebook, one concept
  • Passes ruff check + ruff format
  • Passes scripts/validate_notebooks.py and authors-sorted validation
  • registry.yaml + authors.yaml entries added

…ect by ID structure)

Rebased onto current main; PR now contains only the notebook plus
registry.yaml and authors.yaml entries.
@rgoulartai rgoulartai force-pushed the rgoulartai/tool-use-auto-detect-id-type branch from 2227162 to e115366 Compare June 13, 2026 00:11
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