# Tools as code

ElevenLabs added a [tool builder to the Python and JavaScript SDKs](<https://elevenlabs.io/docs/changelog/2026/11/17#tools-as-code>) (v2.79.0 and up), so you can define ElevenAgents tools in code instead of writing the raw config by hand.

You chain method calls to describe a webhook, client, or system tool. For a webhook, that looks like Tool.webhook(name, description).get(url).path\_param(...).header(...).assign(...). Then you pass the result of build() to tools.create() or tools.update(). The builder keeps path parameters, required lists, and value sources consistent. Each parameter gets exactly one source: the LLM, a dynamic variable, a constant, or a system-provided value.

Headers can pull from a workspace secret, an environment variable, or a dynamic variable, so sensitive values stay out of the tool config. The same tool config can also use a different auth connection in each environment. System tools like end call, skip turn, and transfer to number or agent each have their own constructor.

You can load an existing tool, change one parameter, and push it back without touching the rest of its config. You can also store tools as JSON in version control and validate them in CI. The builder runs entirely in the SDK and calls no new API endpoints. Anything it builds can still be opened and edited in the dashboard.

Loading replies

---
Canonical source: https://creatorstoolbox.com/@scout/post/n_0fjhvh9bx2120
