Skip to main content
Glama

delete_prompt_partial

Destructive

Delete a prompt partial by its ID. This action is permanent; prompts using this partial will fail to render until the reference is replaced.

Instructions

Delete a prompt partial by ID. This cannot be undone, and prompts that reference it with {{> name}} will fail to render until you replace the reference.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
prompt_partial_idYesPrompt partial ID or slug to delete

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

  • The MCP tool handler for 'delete_prompt_partial'. It registers the tool with server.tool(), takes prompt_partial_id as input, calls service.partials.deletePromptPartial(), and returns a success message.
    // Delete partial tool
    server.tool(
    	"delete_prompt_partial",
    	"Delete a prompt partial by ID. This cannot be undone, and prompts that reference it with {{> name}} will fail to render until you replace the reference.",
    	PARTIALS_TOOL_SCHEMAS.deletePromptPartial,
    	async (params) => {
    		await service.partials.deletePromptPartial(params.prompt_partial_id);
    		return {
    			content: [
    				{
    					type: "text",
    					text: JSON.stringify(
    						{
    							message: `Successfully deleted prompt partial "${params.prompt_partial_id}"`,
    							success: true,
    						},
    						null,
    						2,
    					),
    				},
    			],
    		};
    	},
    );
  • Zod input schema for deletePromptPartial — defines the single required parameter prompt_partial_id (string) for the tool.
    deletePromptPartial: {
    	prompt_partial_id: z
    		.string()
    		.describe("Prompt partial ID or slug to delete"),
    },
  • The registerPartialsTools function is the registration entry point. It is called from the central tool registration system in src/tools/index.ts (line 42).
    export function registerPartialsTools(
    	server: McpServer,
    	service: PortkeyService,
    ): void {
  • Central tool registration array (TOOL_DOMAIN_REGISTRARS) that maps 'partials' domain to registerPartialsTools, wired up in registerAllTools().
    const TOOL_DOMAIN_REGISTRARS = [
    	["users", registerUsersTools],
    	["workspaces", registerWorkspacesTools],
    	["configs", registerConfigsTools],
    	["keys", registerKeysTools],
    	["collections", registerCollectionsTools],
    	["prompts", registerPromptsTools],
    	["analytics", registerAnalyticsTools],
    	["guardrails", registerGuardrailsTools],
    	["limits", registerLimitsTools],
    	["audit", registerAuditTools],
    	["labels", registerLabelsTools],
    	["partials", registerPartialsTools],
    	["tracing", registerTracingTools],
    	["logging", registerLoggingTools],
    	["providers", registerProvidersTools],
    	["integrations", registerIntegrationsTools],
    	["mcp-integrations", registerMcpIntegrationsTools],
    	["mcp-servers", registerMcpServersTools],
    ] as const satisfies readonly (readonly [string, ToolRegistrar])[];
  • The service-layer deletePromptPartial method, which sends an HTTP DELETE to /prompts/partials/{prompt_partial_id} via the BaseService.delete() helper.
    async deletePromptPartial(
    	promptPartialId: string,
    ): Promise<DeletePromptPartialResponse> {
    	return this.delete<DeletePromptPartialResponse>(
    		`/prompts/partials/${this.encodePathSegment(promptPartialId)}`,
    	);
    }
Behavior4/5

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

Beyond annotations (destructiveHint=true), the description adds that deletion is irreversible and affects dependent prompts. This clarifies the side-effect and non-idempotent nature beyond the structured annotation.

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 sentences: first states the action, second adds the critical consequence. No unnecessary words, well front-loaded.

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 the simple one-parameter tool and existence of an output schema (per context signals), the description adequately covers the action and side effects. It is complete for the complexity level.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Only one parameter with 100% schema coverage. The schema already describes it as 'Prompt partial ID or slug to delete.' The description adds no extra details beyond 'by ID,' so baseline 3.

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 action: 'Delete a prompt partial by ID.' It specifies the resource and identifier, distinguishing it from siblings like 'update_prompt_partial' and 'create_prompt_partial.'

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 the consequence (permanent deletion, prompt render failures) but does not explicitly state when to use this vs. alternatives like updating or disabling. The warning about reference replacement provides practical guidance.

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