run_prompt_completion
Executes prompt templates against the configured model and returns completion text plus requested tool calls or function calls as data—never executing them.
Instructions
Execute a prompt against the configured model and return the completion text, plus any tool_calls or function_call the model requested (returned as data, never executed). This makes a billable model call, so use render_prompt first when you want to check the template and validate_completion_metadata when billing fields are uncertain.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"prompt_id": "<prompt_id>",
"variables": "<variables>",
"metadata": "<metadata>"
},
"name": "run_prompt_completion"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| metadata | Yes | Billing metadata - client_id, app, env are REQUIRED for cost attribution | |
| prompt_id | Yes | Prompt ID or slug to execute | |
| variables | Yes | Variable values to substitute into the template | |
| hyperparameters | No | Override default hyperparameters |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ok | Yes | Call succeeded | |
| data | No | Success payload | |
| error | No | Failure details |