文件历史

13 次代码提交

作者 SHA1 备注 提交日期
Labib Bin Salam af977da5ca Fix typos in documentation (#1486)
- tools.md: drop the stray article in "every tool is a defined as" and the doubled word in "Toolbox classes can be be configured".
- contributing.md: fix the doubled "an an" in the example prompt (both the streaming and --no-stream snippets).
2026-06-15 10:01:40 -07:00
Simon Willison b865ede0f1 Tool implementations can receive the ToolCall via llm_tool_call param (#1480)
* Tool implementations can receive the ToolCall via llm_tool_call parameter

Tool functions (sync or async, including Toolbox methods) that declare
a parameter named llm_tool_call are now passed the llm.ToolCall object
for the current invocation. The parameter is reserved: it is excluded
from the input schema exposed to the model and is only injected when
declared explicitly - a **kwargs catch-all does not receive it.

This lets tool implementations key external state against the unique
tool_call_id, e.g. for human-in-the-loop approval flows that need to
resume a specific tool call after the answer arrives.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* Ran Black

---------

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-06-09 13:51:39 -07:00
Simon Willison 08094082f2 Toolbox.add_tool(), prepare() and prepare_async() methods
Closes #1111
2025-08-11 13:19:31 -07:00
Simon Willison 2bc6d7679c New default tool, llm_time, closes #1103 2025-05-26 23:00:18 -07:00
Simon Willison 034acda23c Toolbox configuration docs, closes #1057 2025-05-26 22:00:24 -07:00
Simon Willison 278509d824 Warn about prompt injection tools risk, closes #1097 2025-05-26 18:01:51 -07:00
Simon Willison e1f276e576 Use --tool longhand 2025-05-26 15:13:46 -07:00
Simon Willison 9bbb37fae0 New default llm_version tool, closes #1096
Refs https://github.com/simonw/llm/issues/1095#issuecomment-2910574597
2025-05-26 13:30:47 -07:00
Simon Willison 6850cbdfa8 Tips for implementing tools section, closes #1093
Refs https://github.com/simonw/llm-tools-datasette/issues/2
2025-05-26 09:44:15 -07:00
Simon Willison 471eb67326 Slim initial python API docs for tools and chains, closes #1022 2025-05-13 17:19:30 -07:00
Simon Willison a880c123bd --tools is now --functions, can be path, can be multiple
Closes #1016
2025-05-13 17:19:30 -07:00
Simon Willison 7efe51fcb4 Rename --python-tools to --tools, closes #1008 2025-05-13 17:19:30 -07:00
Simon Willison 4abd6e0faf Made a start on tools.md docs, refs #997
Also documented register_tools() plugin hook, refs #991
2025-05-13 17:19:30 -07:00