unpublish_mock
Change a mock server's access control to private by unpublishing it, restricting access to authorized users.
Instructions
Unpublish mock server (sets Access Control to private)
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mockId | Yes | The mock server ID |
Implementation Reference
- src/tools/api/mocks/index.ts:161-164 (handler)Handler function that executes the 'unpublish_mock' tool logic. Makes a DELETE request to /mocks/{mockId}/unpublish to set the mock server's access control to private.
async unpublishMock(mockId: string): Promise<ToolCallResponse> { const response = await this.client.delete(`/mocks/${mockId}/unpublish`); return this.createResponse(response.data); } - Schema definition for the 'unpublish_mock' tool. Defines the input schema requiring a mockId string parameter.
{ name: 'unpublish_mock', description: 'Unpublish mock server (sets Access Control to private)', inputSchema: { type: 'object', required: ['mockId'], properties: { mockId: { type: 'string', description: 'The mock server ID' } } } }, - src/tools/api/mocks/index.ts:46-47 (registration)Registration of the 'unpublish_mock' tool in the switch-case dispatch inside handleToolCall() method of MockTools class.
case 'unpublish_mock': return await this.unpublishMock(args.mockId);