Skip to main content
Glama
Selenium39

Qiita API MCP Server

update_comment

Modify existing comments on Qiita articles by providing a comment ID and updated Markdown content to edit or correct previous contributions.

Instructions

指定されたコメントを更新します

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
commentIdYesコメントID
bodyYesコメントの本文(Markdown形式)

Implementation Reference

  • The handler definition for the 'update_comment' MCP tool. It includes Zod schema for input validation (commentId and body) and an execute function that delegates to the QiitaApiClient's updateComment method.
    update_comment: {
      schema: z.object({
        commentId: z.string(),
        body: z.string(),
      }),
      execute: async ({ commentId, body }, client) => client.updateComment(commentId, body),
    },
  • The MCP tool definition for 'update_comment', including name, description, and inputSchema for listing in tool discovery.
    {
      name: 'update_comment',
      description: '指定されたコメントを更新します',
      inputSchema: {
        type: 'object',
        properties: {
          commentId: {
            type: 'string',
            description: 'コメントID',
          },
          body: {
            type: 'string',
            description: 'コメントの本文(Markdown形式)',
          },
        },
        required: ['commentId', 'body'],
      },
    },
  • The QiitaApiClient method that implements the core logic: authenticates, makes a PATCH request to Qiita API endpoint /comments/{commentId} with the new body, and returns the response.
    async updateComment(commentId: string, body: string) {
      this.assertAuthenticated();
      const response = await this.client.patch(`/comments/${commentId}`, { body });
      return response.data;
    }

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/Selenium39/mcp-server-qiita'

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