Skip to main content
Glama

delete_mcp_server

Destructive

Permanently delete an MCP server instance, instantly revoking all connected users' access. Use only after verifying no workflows depend on this server.

Instructions

Delete an MCP server instance. This is irreversible, removes connected users' access immediately, and should be used only after confirming no workflows depend on the server.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesThe MCP server 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

  • Registration of the 'delete_mcp_server' tool. It registers the tool name, description, uses the deleteMcpServer schema for validation, and calls service.mcpServers.deleteMcpServer(params.id) as the handler logic.
    server.tool(
    	"delete_mcp_server",
    	"Delete an MCP server instance. This is irreversible, removes connected users' access immediately, and should be used only after confirming no workflows depend on the server.",
    	MCP_SERVERS_TOOL_SCHEMAS.deleteMcpServer,
    	async (params) => {
    		await service.mcpServers.deleteMcpServer(params.id);
    		return {
    			content: [
    				{
    					type: "text",
    					text: JSON.stringify(
    						{
    							message: `Successfully deleted MCP server "${params.id}"`,
    							success: true,
    						},
    						null,
    						2,
    					),
    				},
    			],
    		};
    	},
    );
  • Zod schema definition for deleteMcpServer input: requires a string 'id' parameter described as 'The MCP server ID or slug to delete'.
    deleteMcpServer: {
    	id: z.string().describe("The MCP server ID or slug to delete"),
    },
  • Service-level handler that executes the actual HTTP DELETE request to '/mcp-servers/{id}' via the base service's delete method, returning { success: true }.
    async deleteMcpServer(id: string): Promise<{ success: boolean }> {
    	await this.delete(`/mcp-servers/${this.encodePathSegment(id)}`);
    	return { success: true };
    }
  • Base service's delete method used by deleteMcpServer. Calls executeRequest with 'DELETE' method, allowing 204 No Content responses.
    protected async delete<T>(path: string): Promise<T> {
    	return this.executeRequest<T>("DELETE", path, { allowNoContent: true });
    }
Behavior5/5

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

Discloses irreversibility and immediate access removal, adding context beyond annotations (destructiveHint=true). No contradictions.

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 purpose, second adds warnings. No wasted words, front-loaded for quick understanding.

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?

Covers essential behavioral info (irreversibility, immediate access removal) for a destructive operation. Output schema likely covers return values, so no need for more.

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 schema coverage 100%. Description adds 'or slug' clarifying the input format, but baseline is 3 as schema already defines it as string.

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 an MCP server instance') and the resource, using a specific verb+resource pair. It distinguishes from other delete tools by targeting MCP server specifically.

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?

Provides explicit guidance on when to use ('only after confirming no workflows depend on the server') and warns about immediate access removal. No explicit alternative mentioned, but context is clear.

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