Skip to main content

update_prompt

Edit an existing prompt: rename it, change its description, or replace its content (a changed content is saved as a new version). Use a bare name with a standalone personal credential, me/name for private content in organization scope, or <team>/name for a bound team. A bare organization-scoped name denotes the read-only organization catalogue.

Only the fields you provide are changed; everything you omit is left as-is.

Parameters​

ParameterTypeRequiredDescription
namestringYesCaller-relative address: bare with a standalone personal credential, me/name in private organization space, or <team>/name for a bound team.
new_namestringNoRename the prompt to this new bare name (no /).
descriptionstringNoReplace the description.
contentstringNoReplace the content. If it differs from the current version, a new version is appended. The resulting content and arguments must agree (see the note below).
argumentsarrayNoReplace the full set of declared parameters (same shape as create_prompt). Omit to leave them unchanged; pass [] to clear. A changed set is saved as a new version. Every declared argument must be referenced in the content.
version_limit_policystringNoChange the version-limit policy: reject or prune_oldest.

Response​

FieldTypeDescription
namestringCanonical caller-relative address after the update.
idstringThe prompt's identifier.

Example​

{
"name": "marketing/launch-copy",
"new_name": "launch-announcement",
"content": "Write a launch announcement for {{product}}, highlighting {{feature}}.",
"arguments": [
{ "name": "product", "required": true },
{ "name": "feature", "required": true }
]
}

Result:

{
"name": "marketing/launch-announcement",
"id": "018f...c2a1"
}

Errors​

Each failure carries a precise code in the response. A domain rejection — a not-found, a limit, or a permission denial — is returned as a tool result with isError: true, so the agent can read the code and self-correct; malformed arguments and server faults are JSON-RPC protocol errors.

CodeCauseDelivered as
prompt_not_foundNo prompt remains at the requested name in the target space, including if it was renamed while this call was pending.tool error (isError)
invalid_prompt_namenew_name is invalid (needs at least one alphanumeric character and no /).tool error (isError)
field_too_longA field exceeds its maximum length.tool error (isError)
invalid_argument_nameA declared argument name is invalid (must start with a letter or _; letters, digits, and _ only).tool error (isError)
duplicate_argument_nameTwo declared arguments share the same name.tool error (isError)
too_many_argumentsMore arguments were declared than the per-prompt maximum.tool error (isError)
argument_field_too_longA declared argument's name or description exceeds its maximum length.tool error (isError)
undeclared_placeholderAfter the update the content references {{name}} for an argument that isn't declared.tool error (isError)
unused_argumentAfter the update a declared argument is never referenced in the content.tool error (isError)
prompt_version_limit_reachedYour plan's version limit was reached and the policy is reject.tool error (isError)
invalid_version_policyversion_limit_policy is not reject or prune_oldest.tool error (isError)
team_not_foundNo team with that name is bound to this credential.tool error (isError)
forbiddenThe credential lacks update authority, uses me/ outside organization scope, or targets the read-only organization catalogue.tool error (isError)
empty_nameThe name is empty after removing the team prefix.tool error (isError)
personal_cannot_address_teamYou used a team/ prefix (or team field) with a personal credential.tool error (isError)
no_personal_spaceA userless organization credential used me/name; it has no represented member's private space.tool error (isError)
invalid_argumentsThe arguments are missing or don't match the input schema.protocol error (invalid_params)
internal_errorAn unexpected error occurred.protocol error (internal_error)

Notes​

  • Changing the content or the arguments appends a new version rather than overwriting history. Use version_limit_policy: "prune_oldest" if you'd rather drop the oldest version than fail once the plan's version limit is reached.
  • arguments replaces the whole set, so include every argument you want to keep. Content and arguments must stay in agreement — every {{name}} declared and every declared argument used — so when you add or remove an argument, update the content in the same call. See Prompts → Arguments.
  • Updating a prompt counts as one tool call against your plan's tool-invocation allowance.