Anthropic Tool Calling

OutdatedAudit Done
other
View Session

Health

Outdated

Benchmark

28/100

SDK Version

No SDK dependency

Audit Status

Audit Done

Started May 11, 2026

Approval

Not requested

Latest Audit Result

The Anthropic Tool Calling guide currently covers only one Exa capability: `search` with `type='auto'` and highlights. That Exa search call shape is broadly consistent with current docs, but the guide is outdated as a Claude tool-use example because it executes the tool locally and then appends plain assistant/user text instead of preserving the assistant `tool_use` message and returning a user `tool_result` block with the matching `tool_use_id`. The Exa changelog deprecates `/research`, `resolvedSearchType`, `highlightScores`, and `startCrawlDate`/`endCrawlDate`; this guide does not use those deprecated features. Several previously flagged feature gaps remain relevant as nice-to-have coverage, except `/research` should not be added because it is sunset in favor of `/search` with `type: "deep-reasoning"`.

Health: outdated

Missing Features (5)

  • The guide's Anthropic tool-use code is outdated/incorrect: it does not return `tool_result` content blocks to Claude and does not include the original `tool_use` assistant message in the conversation. Current Anthropic docs state client tools return `stop_reason: "tool_use"`, the app executes the tool, and sends back a `tool_result`.
  • The guide imports `load_dotenv` but the install command omits `python-dotenv`, so the full code example may fail in a clean environment with `ModuleNotFoundError: dotenv`.
  • The introductory JSON snippet is labeled `json` but contains `#` comments, which is invalid JSON.
  • The full-code comment links to `https://docs.exa.ai/reference/python-sdk-specification#search-method`, but the fetched docs redirect behavior did not surface that page; current Exa docs expose `/reference/search` and SDK examples there instead.
  • DEPRECATED: The guide does not use deprecated Exa features (`/research`, `resolvedSearchType`, `highlightScores`, `startCrawlDate`, or `endCrawlDate`), so no deprecated usage was found in this integration.

Marked outdated since May 11, 2026

Missing Features (9)

  • The guide's Anthropic tool-use code is outdated/incorrect: it does not return `tool_result` content blocks to Claude and does not include the original `tool_use` assistant message in the conversation. Current Anthropic docs state client tools return `stop_reason: "tool_use"`, the app executes the tool, and sends back a `tool_result`.
  • The guide imports `load_dotenv` but the install command omits `python-dotenv`, so the full code example may fail in a clean environment with `ModuleNotFoundError: dotenv`.
  • The introductory JSON snippet is labeled `json` but contains `#` comments, which is invalid JSON.
  • The full-code comment links to `https://docs.exa.ai/reference/python-sdk-specification#search-method`, but the fetched docs redirect behavior did not surface that page; current Exa docs expose `/reference/search` and SDK examples there instead.
  • DEPRECATED: The guide does not use deprecated Exa features (`/research`, `resolvedSearchType`, `highlightScores`, `startCrawlDate`, or `endCrawlDate`), so no deprecated usage was found in this integration.
  • Update the Anthropic tool-use loop to follow the current Claude API pattern: after `stop_reason: "tool_use"`, append Claude's assistant message containing the `tool_use` block, execute Exa locally, then send a user message containing a `tool_result` block with the original `tool_use.id` before asking Claude for the final answer.
  • Improve the Exa tool schema for the existing `exa_search` tool by exposing at least `numResults` and optional search/content controls already supported by `/search`, instead of accepting only `query`.
  • Use current content-control guidance in the existing highlights example: `contents={"highlights": True}` is valid, but docs now prefer showing `highlights` as `true` or an object with `maxCharacters` when tuning length; avoid deprecated `numSentences`/`highlightsPerUrl`.
  • The live docs version of the guide differs from the local MDX on the Exa call: live docs say `search_and_contents(..., highlights=True)`, while local MDX says `search(..., contents={'highlights': True})`. For a docs-only baseline, align the published guide and source to one current pattern.