🪽execute_code Tool
Also known as Hermes programmatic tool calling, hermes_tools
The Hermes tool that runs one script to call many tools at once.
Think of it like
It is like sending one list to the shop, not one call for each thing.
Example
Leo needs prices from 30 pages. Hermes writes one script that fetches all 30 and prints a small table.
Why it matters
Thirty tool calls one by one cost thirty turns and fill the context. One script costs one.
Definition
Example code
python
from hermes_tools import web_search
for r in web_search("Python 3.13 features", limit=5):
print(r["title"])Common mistake
Key takeaways
- 1A Python script. Calls the tools.
- 2One turn. Many calls.
- 3Only print returns. Context stays small.