update_prompt
Modify an existing prompt by updating only specified fields, archiving the previous version. Supports structured messages, tools, and parameters to keep templates current.
Instructions
Update an existing prompt and create a new archived version. Only provided fields change, and publish_prompt is what makes the new version active. For multi-message chat prompts pass messages (preferred) or a JSON-encoded array as string.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | No | New display name for the prompt | |
| model | No | New model identifier | |
| tools | No | New tool definitions | |
| string | No | Legacy prompt template string. Use plain text for single-message prompts, or a JSON-encoded messages array string for multi-message chat prompts. | |
| dry_run | No | When true, validate without updating | |
| messages | No | Structured chat template alias for updates. Serialized to the legacy string format before the prompt is updated. | |
| functions | No | New function definitions | |
| prompt_id | Yes | Prompt ID or slug to update | |
| parameters | No | New default values for template variables | |
| tool_choice | No | New tool choice strategy | |
| virtual_key | No | New virtual key slug | |
| collection_id | No | Move to a different collection | |
| is_raw_template | No | Enable or disable raw structural-template rendering | |
| template_metadata | No | New metadata | |
| version_description | No | Description for this version |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ok | Yes | Whether the tool call succeeded and returned structured data | |
| data | No | Structured success payload when ok is true | |
| error | No | Structured error payload when ok is false |