Create Tool
Create an organisation tool draft from one of eight tool types. Curated capability types are rejected, the code type needs the code-tools feature, and managed singleton types (send_sms, transfer_call, end_call) return the existing instance instead of a duplicate. Returns 201 with the new draft.
Authorizations
Your SLNG consumer API key.
Body
The tool draft to create.
- Custom Code
- API Request
- End Call
- Voicemail Detection
- Transfer Call
- Send SMS
- Current Date and Time
- User Phone Number
Run sandboxed Python you provide. Custom code has no internet access.
1 - 200^[A-Za-z0-9_-]+$2000Default values for the tool arguments, keyed by argument name. Each value is a literal (string, number, or boolean) or a Vault variable reference using the {{$NAME}} syntax. Applied when a caller does not supply that argument. The keys are the argument names the tool declares; the shape is the same for every tool type.
"code"Configuration for a Custom Code tool. Custom code runs sandboxed with no internet access.
The Python source for the tool. Only used by Custom Code tools and ignored for other tool types. Custom Code runs sandboxed with no internet access.
Names of Vault secrets the code may read at runtime.
Python package dependencies to install for the code, as exact pinned specifiers.
Response
The newly created organisation tool.
A tool and its current draft state, including config, publish gates, and version info.
Vault secret names this tool is allowed to read at runtime.
Pinned Python package dependencies installed for this tool.
curated tools are built in and maintained by SLNG; org tools were created by your organisation.
curated, org Gate set is selected by tool_type (V2): data → static + green_run; code also reports config_valid; ctx-bound → config_valid ONLY.
code, api_request, end_call, voicemail_detection, transfer_call, send_sms, current_datetime, user_phone_number Configuration for a Custom Code tool. Custom code runs sandboxed with no internet access.
- CodeConfig
- ApiRequestConfig
- EndCallConfig
- VoicemailDetectionConfig
- TransferCallConfig
- SendSmsConfig
- CurrentDatetimeConfig
- UserPhoneNumberConfig
Current default values for the tool arguments, keyed by argument name. Each value is a literal (string, number, or boolean) or a Vault variable reference using the {{$NAME}} syntax. Applied when a caller does not supply that argument.
Current Python source for the tool, populated for Custom Code tools only. Custom Code runs sandboxed with no internet access.