update_prompt

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.

Server Portkey Admin CodesWhat/portkey-admin-mcp
Category Write
Risk class Medium
Parameters 121 required

What update_prompt does on Portkey Admin

AI agents use update_prompt to create or update resources in Portkey Admin — usually the action step of a workflow, after the agent has gathered context. Every call changes real data in your Portkey Admin environment.

ParameterTypeRequiredDescription
name string New display name for the prompt
model string New model identifier
tools array New tool definitions
string string Legacy prompt template string. Use plain text for single-message prompts, or a JSON-encoded messages array string for multi-message chat prompts.
dry_run boolean When true, validate without updating
messages array Structured chat template alias for updates. Serialized to the legacy string format before the prompt is updated.
functions array New function definitions
prompt_id string Yes Prompt ID or slug to update
parameters object New default values for template variables
tool_choice object New tool choice strategy
virtual_key string New virtual key slug
collection_id string Move to a different collection

Parameters from the server's own tool schema.

Why update_prompt needs a policy

An AI agent can call update_prompt faster than any human can review — one bad instruction and it creates or modifies resources in Portkey Admin by the hundred, each call as confident as the last.

Risk signalsAccepts raw HTML/template content (messages[].content) · High parameter count (28 properties)

Questions about update_prompt

What does the update_prompt tool do? +

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. It is categorised as a Write tool in the Portkey Admin MCP Server, which means it can create or modify data. Consider rate limits to prevent runaway writes.

What parameters does update_prompt accept? +

update_prompt accepts 12 parameters: name, model, tools, string, dry_run, messages, functions, prompt_id, parameters, tool_choice, virtual_key, collection_id. Required: prompt_id. The full parameter table on this page comes from the server's own tool schema.

How do I enforce a policy on update_prompt? +

Register the Portkey Admin MCP server in PolicyLayer and add a rule for update_prompt: allow, deny, rate-limit, or require approval. Point your MCP client at the PolicyLayer proxy URL and the rule is enforced on every call, before it reaches Portkey Admin. Nothing to install.

What risk level is update_prompt? +

update_prompt is a Write tool with medium risk. Write tools should be rate-limited to prevent accidental bulk modifications.

Can I rate-limit update_prompt? +

Yes. Add a rate_limit block to the update_prompt rule in your PolicyLayer policy. For example, setting max: 10 and window: 60 limits the tool to 10 calls per minute. Rate limits are tracked per agent session and reset automatically.

How do I block update_prompt completely? +

Set action: deny in the PolicyLayer policy for update_prompt. The AI agent will receive a policy violation error and cannot call the tool. You can also include a reason field to explain why the tool is blocked.

What MCP server provides update_prompt? +

update_prompt is provided by the Portkey Admin MCP server (CodesWhat/portkey-admin-mcp). PolicyLayer sits as a proxy in front of this server to enforce policies before tool calls reach the server.

// GET IN TOUCH

Have a question or want to learn more? Send us a message.

Message sent.

We'll get back to you soon.