Skip to main content
Glama

create_prompt

Create a new prompt template with an initial version for first-time setup, accepting plain text or structured chat messages and 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.

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": {
      "name": "<name>",
      "collection_id": "<collection_id>",
      "parameters": "<parameters>",
      "virtual_key": "<virtual_key>"
    },
    "name": "create_prompt"
  }
}

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
okYesCall succeeded
dataNoSuccess payload
errorNoFailure details

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed5 schema fields changedv0.16.5
    • changedOutput schema / properties / data / description
      Previous value: -"Structured success payload when ok is true"New value: +"Success payload"
    • changedOutput schema / properties / error / description
      Previous value: -"Structured error payload when ok is false"New value: +"Failure details"
    • changedOutput schema / properties / error / properties / details / description
      Previous value: -"Optional structured error details"New value: +"Extra error details"
    • changedOutput schema / properties / error / properties / message / description
      Previous value: -"Human-readable error message"New value: +"Error message"
    • changedOutput schema / properties / ok / description
      Previous value: -"Whether the tool call succeeded and returned structured data"New value: +"Call succeeded"
  2. 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"
  3. 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"
      +}
  4. Addedv1.0.1
  5. Removed
  6. First observed

TDQS

A4.5/5.0
Behavior4/5

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

Annotations already establish that this is a non-read-only, non-idempotent, open-world creation operation. The description adds useful behavioral context beyond annotations: it creates an initial version immediately, returns the prompt id, slug, and version id, and clarifies the accepted prompt representations. It does not discuss side effects beyond version creation, but it adds enough to exceed the annotation baseline.

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

Conciseness4/5

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

The description is front-loaded with the core purpose and then moves to usage distinction and input/return behavior. It is efficient, though the final sentence partially restates the earlier plain-text/structured-messages sentence and could be tightened slightly.

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?

Given the 16-parameter schema, nested objects, annotations, and an output schema, the description covers the essential selection, usage, and message-format details an agent needs. Minor parameter details are left to the schema, which is appropriate here.

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 description coverage is 100%, so the baseline is 3. The description goes further by explaining the messages-versus-string relationship and stating that messages is preferred, which adds meaningful disambiguation beyond the schema descriptions.

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?

The description states a specific verb and resource: create a new prompt template and initial version. It explicitly distinguishes this from migrate_prompt by naming the alternative and its use case, so an agent can select correctly without opening the 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?

It gives explicit when-to-use guidance: first-time setup versus migrate_prompt for idempotent CI/CD flows. It also specifies that messages is preferred over a JSON-encoded string for multi-message chat prompts, giving clear parameter-level usage direction.

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