update_api_comment
Update an existing API comment by providing the API ID, comment ID, and new content (up to 10,000 characters).
Instructions
Update an existing API comment (max 10,000 characters)
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| apiId | Yes | API ID | |
| commentId | Yes | Comment ID | |
| content | Yes | Updated comment text (max 10,000 characters) |
Implementation Reference
- src/tools/api/apis/index.ts:308-317 (handler)The updateApiComment handler method that executes the tool logic: validates required params (apiId, commentId, content) and makes a PUT request to /apis/{apiId}/comments/{commentId}.
async updateApiComment(args: any): Promise<ToolCallResponse> { if (!args.apiId || !args.commentId || !args.content) { throw new McpError(ErrorCode.InvalidParams, 'apiId, commentId, and content are required'); } const response = await this.client.put( `/apis/${args.apiId}/comments/${args.commentId}`, { content: args.content } ); return this.createResponse(response.data); } - Tool definition with name 'update_api_comment', description, and inputSchema (apiId string, commentId number, content string - all required).
{ name: 'update_api_comment', description: 'Update an existing API comment (max 10,000 characters)', inputSchema: { type: 'object', properties: { apiId: { type: 'string', description: 'API ID', }, commentId: { type: 'number', description: 'Comment ID', }, content: { type: 'string', description: 'Updated comment text (max 10,000 characters)', }, }, required: ['apiId', 'commentId', 'content'], }, }, - src/tools/api/apis/index.ts:71-72 (registration)Route registration in handleToolCall switch statement mapping 'update_api_comment' to the updateApiComment method.
case 'update_api_comment': return await this.updateApiComment(args);