Skip to main content
Glama

api_delete

Remove resources from external APIs by sending HTTP DELETE requests through the MCP API Server. Specify the target URL and optional headers to delete data programmatically.

Instructions

Make an HTTP DELETE request to the specified URL

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlYesThe URL to make the DELETE request to
headersNoOptional headers to include in the request

Implementation Reference

  • Defines the MCPTool specification for 'api_delete' including name, description, and input schema for URL and optional headers.
    export const API_DELETE_TOOL: MCPTool = { name: 'api_delete', description: 'Make an HTTP DELETE request to the specified URL', inputSchema: { type: 'object', properties: { url: { type: 'string', format: 'uri', description: 'The URL to make the DELETE request to', }, headers: { type: 'object', description: 'Optional headers to include in the request', additionalProperties: { type: 'string', }, }, }, required: ['url'], }, };
  • src/tools.ts:138-142 (registration)
    Registers 'api_delete' in the TOOL_MAP lookup used by mcp-server to validate tool existence.
    export const TOOL_MAP: Record<string, MCPTool> = { [API_GET_TOOL.name]: API_GET_TOOL, [API_POST_TOOL.name]: API_POST_TOOL, [API_PUT_TOOL.name]: API_PUT_TOOL, [API_DELETE_TOOL.name]: API_DELETE_TOOL,
  • Registers the MCP list_tools handler which exposes api_delete (via ALL_API_TOOLS) to clients.
    this.server.setRequestHandler(ListToolsRequestSchema, async () => { this.log('Received list_tools request'); return { tools: ALL_API_TOOLS, }; });
  • The dispatch handler in handleToolCall that executes api_delete by calling apiClient.delete.
    case 'api_delete': return await this.apiClient.delete(validatedRequest.url, validatedRequest.headers);
  • Core implementation of the DELETE request using axios makeRequest method.
    async delete(url: string, headers?: Record<string, string>): Promise<APIResponse | ErrorResponse> { return this.makeRequest({ url, method: 'DELETE', headers, }); }

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/fikri2992/mcp0'

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