Skip to main content
Glama

deleteDeployment

Remove a specific deployment by its ID using Vercel MCP. This tool enables efficient cleanup of deployments while requiring the deployment identifier as input.

Instructions

Deletes a deployment

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
deploymentIdYesThe ID of the deployment to delete
slugNoSlug
teamIdNoTeam ID
urlNoThe URL of the deployment

Implementation Reference

  • The handler function for the MCP 'deleteDeployment' tool. It creates the environment with API token, calls the underlying deleteDeployment helper, formats the result as JSON text response, and handles errors.
    async ({ deploymentId, ...options }) => {
    	try {
    		const env = { VERCEL_API_TOKEN: apiKey }
    		const result = await deleteDeployment(env, deploymentId, options)
    		return {
    			content: [
    				{
    					type: "text",
    					text: JSON.stringify(result, null, 2)
    				}
    			]
    		}
    	} catch (error: unknown) {
    		console.error("Error deleting deployment:", error)
    		const errorMessage =
    			error instanceof Error ? error.message : String(error)
    		return {
    			content: [
    				{
    					type: "text",
    					text: `Error deleting deployment: ${errorMessage}`
    				}
    			]
    		}
    	}
    }
  • Zod input schema defining parameters for the deleteDeployment tool: deploymentId (required), url/teamId/slug (optional).
    	deploymentId: z.string().describe("The ID of the deployment to delete"),
    	url: z.string().optional().describe("The URL of the deployment"),
    	teamId: z.string().optional().describe("Team ID"),
    	slug: z.string().optional().describe("Slug")
    },
  • src/index.ts:313-348 (registration)
    Registration of the 'deleteDeployment' tool on the MCP server using server.tool(name, description, inputSchema, handlerFn).
    server.tool(
    	"deleteDeployment",
    	"Deletes a deployment",
    	{
    		deploymentId: z.string().describe("The ID of the deployment to delete"),
    		url: z.string().optional().describe("The URL of the deployment"),
    		teamId: z.string().optional().describe("Team ID"),
    		slug: z.string().optional().describe("Slug")
    	},
    	async ({ deploymentId, ...options }) => {
    		try {
    			const env = { VERCEL_API_TOKEN: apiKey }
    			const result = await deleteDeployment(env, deploymentId, options)
    			return {
    				content: [
    					{
    						type: "text",
    						text: JSON.stringify(result, null, 2)
    					}
    				]
    			}
    		} catch (error: unknown) {
    			console.error("Error deleting deployment:", error)
    			const errorMessage =
    				error instanceof Error ? error.message : String(error)
    			return {
    				content: [
    					{
    						type: "text",
    						text: `Error deleting deployment: ${errorMessage}`
    					}
    				]
    			}
    		}
    	}
    )
  • Helper function that performs the actual deletion using Vercel SDK. Imported and called by the MCP tool handler.
    export async function deleteDeployment(
    	env: Env,
    	deploymentId: string,
    	options?: {
    		url?: string
    		teamId?: string
    		slug?: string
    	}
    ) {
    	const vercel = new Vercel({
    		bearerToken: env.VERCEL_API_TOKEN
    	})
    
    	const response = await vercel.deployments.deleteDeployment({
    		id: deploymentId,
    		...options
    	})
    
    	return MCPResponse(response)
    }
Behavior1/5

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

With no annotations provided, the description carries full burden for behavioral disclosure but offers none. It doesn't mention whether deletion is permanent or reversible, what permissions are required, whether it affects associated resources, or what happens to the deployment's data. For a destructive operation with zero annotation coverage, this is dangerously inadequate.

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?

The description is maximally concise - a single three-word phrase that communicates the core function. There's zero waste or redundancy. While it's under-specified for a destructive operation, this dimension scores purely on efficiency of expression.

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

Completeness2/5

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

For a destructive tool with no annotations and no output schema, the description is severely incomplete. It doesn't address critical context like permanence, side effects, error conditions, or return values. The agent cannot safely use this tool based on the provided information alone.

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?

Schema description coverage is 100%, so all parameters are documented in the schema. The description adds no parameter information beyond what's already in the structured data. The baseline score of 3 reflects adequate schema coverage where the description doesn't need to compensate, but also doesn't add value.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose3/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description 'Deletes a deployment' clearly states the action (delete) and resource (deployment), which is better than a tautology. However, it doesn't differentiate from sibling tools like 'cancelDeployment' - both involve stopping deployments but likely through different mechanisms. The description is vague about what type of deployment is being deleted (e.g., cloud, container, application).

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives like 'cancelDeployment'. There's no mention of prerequisites, consequences, or appropriate contexts for deletion versus cancellation. The agent must infer usage from the tool name alone, which is insufficient for informed decision-making.

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

Related 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/zueai/vercel-api-mcp'

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