Run a tool’s execution body in the sandbox against test inputs. This is what the editor’s Test Run button calls behind the scenes; useful for verifying a body works as expected before promoting the version.Documentation Index
Fetch the complete documentation index at: https://docs.promptlayer.com/llms.txt
Use this file to discover all available pages before exploring further.
label or version query params, the latest version is used. Pass label=production to test the production version, or version=3 to pin to a specific number.
execution and tool_definition in the body are optional overrides. If you supply them, they take precedence over what’s stored on the version. This lets you test changes without saving a new version first.
200 for both successful runs and user-code errors. Inspect result.status:
"success" → your body returned a value, available at result.result"error" → your body raised, with details under result.error.message502. These are operational issues, not your code’s fault.Tool ID (numeric) or name
Resolve version by label name (e.g. production). Falls back to latest if neither label nor version supplied.
Resolve by specific version number
Arguments passed to the tool body. Same shape the LLM would emit — keys match the tool's parameter names.
In-flight override of the stored execution config. Lets you test unsaved code.
In-flight override of the stored tool definition. Used to test against a different function name without saving.