Skip to main content
Glama

update_prompt

Update an existing prompt, changing only provided fields and creating a new archived version; publish the new version to activate it.

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.

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>"
    },
    "name": "update_prompt"
  }
}

Input Schema

NameRequiredDescriptionDefault
nameNoNew display name for the prompt
modelNoNew model identifier
toolsNoNew tool definitions
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 updating
messagesNoStructured chat template alias for updates. Serialized to the legacy string format before the prompt is updated.
functionsNoNew function definitions
prompt_idYesPrompt ID or slug to update
parametersNoNew default values for template variables
tool_choiceNoNew tool choice strategy
virtual_keyNoNew virtual key slug
collection_idNoMove to a different collection
is_raw_templateNoEnable or disable raw structural-template rendering
template_metadataNoNew metadata
version_descriptionNoDescription for this 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": "Enable or disable raw structural-template rendering",
      +  "type": "boolean"
      +}
  3. Addedv1.0.1
  4. Removed
  5. First observed

TDQS

A4.1/5.0
Behavior4/5

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

The annotations already indicate a non-read-only, non-idempotent, non-destructive update. The description adds important behavioral context beyond annotations: each update creates a new archived version, omitted fields are untouched, and publish_prompt controls activation.

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 tightly written sentences with no waste. The core action and versioning behavior are front-loaded, followed by the important activation and message-format guidance.

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 a 15-parameter schema with full description coverage and an output schema, the description covers the essential behavioral facts an agent needs. Minor omissions remain around dry_run and the precise boundary with update_prompt_version, but the structured fields fill those gaps.

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 adds meaningful semantics beyond the schema by clarifying partial-update behavior and explicitly preferring messages over the JSON-encoded string for multi-message chat prompts.

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

Purpose4/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: update an existing prompt and create a new archived version. It clearly differentiates activation from the separate publish_prompt sibling, though it does not explicitly distinguish this tool from update_prompt_version.

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

Usage Guidelines4/5

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

It explains that only provided fields change and that publish_prompt is required to make the new version active, which is a key usage distinction. It also gives a clear preference between messages and the legacy JSON string, though it does not explicitly state when to use this instead of update_prompt_version or migrate_prompt.

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