delete_api_comment
Delete a specific comment from a Postman API by providing the API ID and comment ID.
Instructions
Delete an API comment
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| apiId | Yes | API ID | |
| commentId | Yes | Comment ID |
Implementation Reference
- src/tools/api/apis/index.ts:323-329 (handler)The handler function that executes the delete_api_comment tool logic. Validates apiId and commentId are present, then makes a DELETE request to /apis/{apiId}/comments/{commentId}.
async deleteApiComment(args: any): Promise<ToolCallResponse> { if (!args.apiId || !args.commentId) { throw new McpError(ErrorCode.InvalidParams, 'apiId and commentId are required'); } await this.client.delete(`/apis/${args.apiId}/comments/${args.commentId}`); return this.createResponse({ message: 'Comment deleted successfully' }); } - Schema definition for the delete_api_comment tool, specifying input parameters: apiId (string, required) and commentId (number, required).
{ name: 'delete_api_comment', description: 'Delete an API comment', inputSchema: { type: 'object', properties: { apiId: { type: 'string', description: 'API ID', }, commentId: { type: 'number', description: 'Comment ID', }, }, required: ['apiId', 'commentId'], }, }, - src/tools/api/apis/index.ts:73-74 (registration)Tool dispatch registration in the handleToolCall switch statement, mapping the 'delete_api_comment' name to the deleteApiComment method.
case 'delete_api_comment': return await this.deleteApiComment(args);