create_prompt_version
Create a new version of a prompt template, specifying model, provider, and messages. Optionally creates the template if it does not exist.
Instructions
Create a new version of a prompt template. This is a write operation. Always confirm with the user before calling — describe which prompt template will be modified, the model and provider, and whether a new template will be created.
If the template doesn't exist and create_if_not_exists is True, the template will be created automatically.
Note: Deployment is not supported via MCP at this time to reduce risk of unintentional changes. Use the Freeplay UI to deploy versions to environments.
Args: project_id: The Freeplay project ID (required) template_name: Name of the prompt template (required) prompt_messages: JSON string of template messages array, e.g. '[{"role": "system", "content": "You are helpful."}]' (required) model: The model name, e.g. "gpt-4", "claude-3-opus" (required) provider: The provider name, e.g. "openai", "anthropic" (required) version_name: Optional name for this version version_description: Optional description for this version llm_parameters: Optional LLM parameters object, e.g. {"temperature": 0.7, "max_tokens": 1000} tool_schema: Optional tool definitions array for function calling output_schema: Optional output schema for structured outputs create_if_not_exists: If true, creates the template if it doesn't exist (default: true)
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| model | Yes | ||
| provider | Yes | ||
| project_id | Yes | ||
| tool_schema | No | ||
| version_name | No | ||
| output_schema | No | ||
| template_name | Yes | ||
| llm_parameters | No | ||
| prompt_messages | Yes | ||
| version_description | No | ||
| create_if_not_exists | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |