Skip to main content
Glama

update_prompt_partial

Update a prompt partial by creating a new version with modified content or metadata; changes remain inactive until published.

Instructions

Create a new version of a partial by updating its content or metadata. Only provided fields change, and the new version stays inactive until publish_partial makes it current.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
prompt_partial_idYesPrompt partial ID or slug to update
nameNoNew display name for the partial
stringNoNew content for the partial
descriptionNoDescription for this version
statusNoNew status for the partial

Output Schema

TableJSON 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

Implementation Reference

  • Core handler that executes the update prompt partial logic: calls PUT /prompts/partials/{id} with the request body, remapping 'description' to 'version_description' for API compatibility.
    async updatePromptPartial(
    	promptPartialId: string,
    	data: UpdatePromptPartialRequest,
    ): Promise<UpdatePromptPartialResponse> {
    	// Portkey API inconsistency: POST /prompts/partials accepts "description"
    	// in the response as "description", but PUT expects "version_description"
    	// for the same field. Remap here for consistency.
    	const { description, ...rest } = data;
    	const body: Record<string, unknown> = { ...rest };
    	if (description !== undefined) {
    		body.version_description = description;
    	}
    	return this.put<UpdatePromptPartialResponse>(
    		`/prompts/partials/${this.encodePathSegment(promptPartialId)}`,
    		body,
    	);
    }
  • Input type (UpdatePromptPartialRequest) and output type (UpdatePromptPartialResponse) for the update prompt partial operation.
    export interface UpdatePromptPartialRequest {
    	name?: string;
    	string?: string;
    	/** Version description — remapped to version_description before sending to API */
    	description?: string;
    	status?: string;
    }
  • Zod schema definitions for the update_prompt_partial tool input parameters (prompt_partial_id, name, string, description, status).
    updatePromptPartial: {
    	prompt_partial_id: z
    		.string()
    		.describe("Prompt partial ID or slug to update"),
    	name: z.string().optional().describe("New display name for the partial"),
    	string: z.string().optional().describe("New content for the partial"),
    	description: z.string().optional().describe("Description for this version"),
    	status: z
    		.enum(["active", "archived"])
    		.optional()
    		.describe("New status for the partial"),
    },
  • Registration of the 'update_prompt_partial' tool using server.tool(), binding the schema and handler that calls the service.
    // Update partial tool
    server.tool(
    	"update_prompt_partial",
    	"Create a new version of a partial by updating its content or metadata. Only provided fields change, and the new version stays inactive until publish_partial makes it current.",
    	PARTIALS_TOOL_SCHEMAS.updatePromptPartial,
    	async (params) => {
    		const { prompt_partial_id, ...updateData } = params;
    		const result = await service.partials.updatePromptPartial(
    			prompt_partial_id,
    			updateData,
    		);
    		return {
    			content: [
    				{
    					type: "text",
    					text: JSON.stringify(
    						{
    							message: `Successfully updated prompt partial "${prompt_partial_id}"`,
    							prompt_partial_version_id: result.prompt_partial_version_id,
    						},
    						null,
    						2,
    					),
    				},
    			],
    		};
    	},
    );
Behavior5/5

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

Annotations are present and consistent (readOnlyHint=false, destructiveHint=false, idempotentHint=false, openWorldHint=true). The description adds that only provided fields change and that the new version is inactive until published, which are important behaviors not covered by annotations.

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?

Two concise sentences, each adding value. The purpose is front-loaded, and there is no redundant or unnecessary text.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With an output schema present, the description does not need to explain return values. It covers the key behavioral context (partial update, new inactive version) and is complete for this tool.

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 coverage is 100% with descriptions for all parameters. The description adds value by stating 'Only provided fields change', clarifying partial update semantics, which goes 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 clearly states the verb (create) and resource (a new version of a partial), and implies the resource is a partial, distinguishing it from sibling tools like publish_partial that make a version current.

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?

The description explains that only provided fields change and the new version stays inactive until publish_partial is used, providing clear context for when to use this tool and hinting at the alternative publish tool. However, it does not explicitly say 'use publish_partial to make it current'.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/s-b-e-n-s-o-n/portkey-admin-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server