Skip to main content
POST

Authorizations

Authorization
string
header
required

Your SLNG consumer API key.

Body

application/json

The tool draft to create.

Run sandboxed Python you provide. Custom code has no internet access.

name
string
required
Required string length: 1 - 200
Pattern: ^[A-Za-z0-9_-]+$
description
string
default:""
Maximum string length: 2000
argument_defaults
Argument Defaults · object

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. The keys are the argument names the tool declares; the shape is the same for every tool type.

tool_type
string
default:code
Allowed value: "code"
config
CodeConfig · object

Configuration for a Custom Code tool. Custom code runs sandboxed with no internet access.

code_src
string
default:""

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.

declared_secrets
string[]

Names of Vault secrets the code may read at runtime.

dependencies
string[]

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.

id
string<uuid>
required
organisation_id
string<uuid>
required
name
string
required
description
string
required
declared_secrets
string[]
required

Vault secret names this tool is allowed to read at runtime.

dependencies
string[]
required

Pinned Python package dependencies installed for this tool.

source
enum<string>
required

curated tools are built in and maintained by SLNG; org tools were created by your organisation.

Available options:
curated,
org
content_hash
string
required
is_current_hash_green
boolean
required
is_current_version
boolean
required
schema_stale
boolean
required
gate_status
GateStatus · object
required

Gate set is selected by tool_type (V2): data → static + green_run; code also reports config_valid; ctx-bound → config_valid ONLY.

tool_type
enum<string>
default:code
Available options:
code,
api_request,
end_call,
voicemail_detection,
transfer_call,
send_sms,
current_datetime,
user_phone_number
config
CodeConfig · object

Configuration for a Custom Code tool. Custom code runs sandboxed with no internet access.

argument_defaults
Argument Defaults · object

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.

code_src
string | null

Current Python source for the tool, populated for Custom Code tools only. Custom Code runs sandboxed with no internet access.

last_run_status
string | null
latest_version
integer | null
arg_schema
Arg Schema · object | null