Skip to main content
Glama

create_prompt

Creates a new prompt template and initial version for first-time setup, returning the prompt ID, slug, and version ID.

Instructions

Create a new prompt template and initial version. Use this for first-time setup; use migrate_prompt for idempotent CI/CD flows. Accepts plain text or structured chat messages, creates a new version immediately, and returns the prompt id, slug, and version id. For multi-message chat prompts pass messages (preferred) or a JSON-encoded array as string.

Input Schema

NameRequiredDescriptionDefault
nameYesDisplay name for the prompt
modelNoModel identifier (e.g., 'gpt-4', 'claude-3-opus'). Required unless ai_model_id or finetune_id is provided
toolsNoTool definitions for tool use
stringNoLegacy prompt template string. Use plain text for single-message prompts, or a JSON-encoded messages array string for multi-message chat prompts.
dry_runNoWhen true, validate without creating
messagesNoStructured chat template alias. Serialized to the legacy string format before creation.
functionsNoFunction definitions for function calling
parametersYesDefault values for template variables
ai_model_idNoAI model ID (alternative to model). Required unless model or finetune_id is provided
finetune_idNoFine-tune ID (alternative to model). Required unless model or ai_model_id is provided
tool_choiceNoTool choice strategy
virtual_keyYesVirtual key slug for model access
collection_idYesCollection ID to organize the prompt in (use list_collections to find)
is_raw_templateNoRender the stored template as a raw structural template
template_metadataNoCustom metadata (app, env, source_file, etc.)
version_descriptionNoDescription for this prompt version

Output Schema

NameRequiredDescriptionDefault
okYesWhether the tool call succeeded and returned structured data
dataNoStructured success payload when ok is true
errorNoStructured error payload when ok is false

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv1.0.9
    • changedInput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
    • changedOutput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
  2. Changed1 schema field changedv0.11.5
    • addedInput schema / properties / is_raw_template
      Added value: +{
      +  "description": "Render the stored template as a raw structural template",
      +  "type": "boolean"
      +}
  3. Addedv1.0.1
  4. Removed
  5. First observed

TDQS

A4.6/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare readOnly=false, idempotent=false, destructive=false, so the safety profile is partly covered; the description adds real value by disclosing that a version is created immediately as a side effect and what identifiers are returned ('prompt id, slug, and version id'). It does not state what happens on name/slug collision, which is the main residual unknown for a non-idempotent create.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Three short sentences with no filler: what it does, when to use it versus the alternative, then input format and return shape. Purpose and the sibling routing are front-loaded before the mechanical details.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 16-parameter creation tool with nested objects, the description covers purpose, the sibling alternative, input-format choice, and return identifiers, and an output schema exists so return values need no elaboration. A short note on the dry_run preview path or on model-selection exclusivity would have made it fully self-sufficient, but nothing critical is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so baseline is 3; the description goes beyond it by establishing a preference order the schema does not ('pass messages (preferred) or a JSON-encoded array as string') and by naming the plain-text path. The other 14 parameters, including the mutually exclusive model/ai_model_id/finetune_id trio, are left entirely to the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource ('Create a new prompt template and initial version') and immediately names the sibling it is not (migrate_prompt). An agent can distinguish it from update_prompt, publish_prompt, and migrate_prompt without opening any schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicit routing: 'Use this for first-time setup; use migrate_prompt for idempotent CI/CD flows.' It names the alternative and the exact condition that selects it, which is the strongest form of guidance available.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Deploy Server

Other Tools