Commit e1dc6d5
authored
fix(sdk): strip input_examples from Anthropic tool definitions (#2652)
* fix(sdk): strip input_examples from Anthropic tool definitions
Anthropic validates input_examples against the tool's input_schema.
The superdoc_format tool has examples with target {kind:"block"} but
the merged schema only exposes {kind:"selection"}. This causes
Anthropic to reject the tool definitions with a validation error.
Strip input_examples from Anthropic output until the schema properly
supports all target variants via oneOf.
* refactor(sdk): reorder imports and simplify Anthropic tool return
Moved the import statement for 'path' to the correct position and simplified the return structure of the toAnthropicTool function by directly returning the object instead of assigning it to a variable first.1 parent a8859df commit e1dc6d5
1 file changed
Lines changed: 2 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
2 | 1 | | |
| 2 | + | |
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| |||
495 | 495 | | |
496 | 496 | | |
497 | 497 | | |
498 | | - | |
| 498 | + | |
499 | 499 | | |
500 | 500 | | |
501 | 501 | | |
502 | 502 | | |
503 | | - | |
504 | | - | |
505 | | - | |
506 | | - | |
507 | 503 | | |
508 | 504 | | |
509 | 505 | | |
| |||
0 commit comments