Skip to main content
Glama

delete_mcp_server

Destructive

Permanently delete an MCP server instance, immediately revoking all connected users' access. Use only after confirming no workflows depend on it.

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

  • The tool handler for 'delete_mcp_server'. It receives an id parameter, delegates to service.mcpServers.deleteMcpServer(), and returns a success message.
    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 for the delete_mcp_server tool input — requires a single 'id' string field describing the MCP server ID or slug.
    deleteMcpServer: {
    	id: z.string().describe("The MCP server ID or slug to delete"),
    },
  • The tool is registered via server.tool('delete_mcp_server', ...) inside registerMcpServersTools(), binding the name, description, schema, and handler together.
    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,
    					),
    				},
    			],
    		};
    	},
    );
  • Service method deleteMcpServer(id) that executes an HTTP DELETE request to /mcp-servers/{id} via the base service's delete helper.
    async deleteMcpServer(id: string): Promise<{ success: boolean }> {
    	await this.delete(`/mcp-servers/${this.encodePathSegment(id)}`);
    	return { success: true };
    }
Behavior4/5

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

Annotations already indicate destructiveHint=true, but the description adds critical behavioral context: the operation is irreversible and immediately removes connected users' access. This goes beyond the annotation's binary hint. No contradiction with 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?

The description is three sentences long, providing all necessary information without redundancy. The first sentence states the action, and subsequent sentences add essential warnings. Every sentence earns its place.

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 there is an output schema, the description does not need to describe return values. It covers the irreversible nature, immediate user impact, and the caution about workflows. It is sufficient for the agent to use the tool correctly.

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?

The parameter 'id' is fully described in the schema ('The MCP server ID or slug to delete'). The description does not add any additional semantic meaning beyond what the schema already provides. With 100% schema coverage, a score of 3 is appropriate.

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') and the resource ('MCP server instance'), making the purpose immediately clear. Among many sibling delete tools, the tool name 'delete_mcp_server' combined with the description sufficiently differentiates it.

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 includes an important usage condition: 'should be used only after confirming no workflows depend on the server.' This advises the agent on when it is appropriate to invoke the tool. However, it does not explicitly mention alternatives or when not to use it.

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