Skip to main content
POST
Create Tool Registry
Create a new tool in the Tool Registry with an initial version. The tool definition should be in OpenAI function-calling format. Tool names must be unique within a workspace. The initial version is created with version number 1. Pass an optional execution payload to attach a sandbox-executable body. PromptLayer will run it between LLM turns whenever a prompt references the tool. See Auto Tool Execution for the body model and conventions.

Authorizations

X-API-KEY
string
header
required

Body

application/json
name
string
required

Tool name (unique per workspace)

tool_definition
object
required

Tool definition in OpenAI function-calling format

description
string | null

Optional human-readable description of the tool

folder_id
integer | null

Folder ID to place tool in

commit_message
string | null

Commit message for the initial version

external_ids
ExternalId · object[]

Identifiers from other systems.

execution
object | null

Optional sandbox-executable body for the tool. When set, PromptLayer auto-runs the body between LLM turns. See the Auto Tool Execution feature page.

Response

Tool created

external_ids
ExternalId · object[]
required

External ID mappings for the tool.

success
boolean
tool_registry
object
version
object