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
| Parameter | Type | Required | Description |
|---|---|---|---|
name | string | Yes | Caller-relative address: bare with a standalone personal credential, me/name in private organization space, or <team>/name for a bound team. |
new_name | string | No | Rename the prompt to this new bare name (no /). |
description | string | No | Replace the description. |
content | string | No | Replace 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). |
arguments | array | No | Replace 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_policy | string | No | Change the version-limit policy: reject or prune_oldest. |
Response
| Field | Type | Description |
|---|---|---|
name | string | Canonical caller-relative address after the update. |
id | string | The 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.
| Code | Cause | Delivered as |
|---|---|---|
prompt_not_found | No 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_name | new_name is invalid (needs at least one alphanumeric character and no /). | tool error (isError) |
field_too_long | A field exceeds its maximum length. | tool error (isError) |
invalid_argument_name | A declared argument name is invalid (must start with a letter or _; letters, digits, and _ only). | tool error (isError) |
duplicate_argument_name | Two declared arguments share the same name. | tool error (isError) |
too_many_arguments | More arguments were declared than the per-prompt maximum. | tool error (isError) |
argument_field_too_long | A declared argument's name or description exceeds its maximum length. | tool error (isError) |
undeclared_placeholder | After the update the content references {{name}} for an argument that isn't declared. | tool error (isError) |
unused_argument | After the update a declared argument is never referenced in the content. | tool error (isError) |
prompt_version_limit_reached | Your plan's version limit was reached and the policy is reject. | tool error (isError) |
invalid_version_policy | version_limit_policy is not reject or prune_oldest. | tool error (isError) |
team_not_found | No team with that name is bound to this credential. | tool error (isError) |
forbidden | The credential lacks update authority, uses me/ outside organization scope, or targets the read-only organization catalogue. | tool error (isError) |
empty_name | The name is empty after removing the team prefix. | tool error (isError) |
personal_cannot_address_team | You used a team/ prefix (or team field) with a personal credential. | tool error (isError) |
no_personal_space | A userless organization credential used me/name; it has no represented member's private space. | tool error (isError) |
invalid_arguments | The arguments are missing or don't match the input schema. | protocol error (invalid_params) |
internal_error | An 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. argumentsreplaces 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.