delete_mock
Delete a mock server by providing its unique ID to remove unused test fixtures.
Instructions
Delete a mock server
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mockId | Yes | The mock server ID |
Implementation Reference
- src/tools/api/mocks/index.ts:119-122 (handler)Handler function that executes the delete_mock tool logic. Makes a DELETE request to the Postman API at /mocks/{mockId} and returns the response.
async deleteMock(mockId: string): Promise<ToolCallResponse> { const response = await this.client.delete(`/mocks/${mockId}`); return this.createResponse(response.data); } - src/tools/api/mocks/index.ts:40-41 (registration)Routes the 'delete_mock' tool call in handleToolCase to the deleteMock method, extracting mockId from args.
case 'delete_mock': return await this.deleteMock(args.mockId); - Schema definition for delete_mock tool: requires a 'mockId' string parameter.
{ name: 'delete_mock', description: 'Delete a mock server', inputSchema: { type: 'object', required: ['mockId'], properties: { mockId: { type: 'string', description: 'The mock server ID' } } } }, - src/tools/api/mocks/index.ts:19-20 (registration)The MockTools class returns the TOOL_DEFINITIONS array (which includes delete_mock) via getToolDefinitions().
getToolDefinitions(): ToolDefinition[] { return TOOL_DEFINITIONS; - src/tools/api/base.ts:118-127 (registration)Base class getToolMappings() associates each tool name (including 'delete_mock') with the MockTools handler instance.
public getToolMappings(): ToolMapping { const toolDefinitions = this.getToolDefinitions(); const mappings: ToolMapping = {}; toolDefinitions.forEach(tool => { mappings[tool.name] = this; }); return mappings; }