Overview
The Jinba Toolbox tool registers a Python tool in Jinba Toolbox from within a flow. It creates the toolset on first use and creates or updates the tool on every run, so a flow can keep a generated tool in sync with its source.Key Features
JINBA_TOOLBOX_REGISTER_TOOL- Register or update a Python tool identified by
org_id,tool_set_slug, andtool_slug - Creates the toolset (private, Python sandbox) when it does not exist yet, using
tool_set_nameandtool_set_description - Sends
tool_name,tool_description, andcodeon every run — changingtool_namebetween runs renames the tool - Does not publish a version: publish from the Toolbox web console once the tool is registered
- Register or update a Python tool identified by
Authentication
Set theapi_key config to a Jinba Toolbox API key (secret type JINBA_TOOLBOX_API_KEY). The optional base_url config overrides the Toolbox API URL configured for your Jinba Flow deployment.
Note: Treat API keys as sensitive information and never commit them to public repositories.
Usage Examples
Example: Register a Tool
Notes
- Inputs:
org_id(Toolbox organization id or slug),tool_set_slugandtool_slug(lowercase letters, digits, and hyphens; up to 64 characters),tool_set_nameandtool_name(up to 256 characters),tool_set_descriptionandtool_description(optional, up to 4,096 characters), andcode(up to 65,536 characters). codemust defineInputandOutputpydanticBaseModelclasses and arun(input: Input) -> Outputfunction — Toolbox extracts the tool’s I/O schema from them and rejects code that is missing any of them.tool_set_nameandtool_set_descriptionare used only when the toolset is created; an existing toolset is not renamed. An emptytool_set_descriptionfalls back totool_set_name. An emptytool_descriptionleaves an existing tool’s description unchanged.resultcontainstool_set_slug,tool_slug,tool_set_created, andtool_created(truewhen the run created the toolset or tool rather than updating it).- Concurrent registrations of the same
tool_set_slug/tool_slugare not coordinated — serialize them in the flow.