Skip to main content
Glama

update_item

Modify existing Qiita articles by updating titles, content, tags, or visibility settings using article ID.

Instructions

既存の記事を更新します

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
itemIdYes記事ID
titleYes記事のタイトル
bodyYes記事の本文(Markdown形式)
tagsYesタグの配列
privateNo非公開記事かどうか

Implementation Reference

  • The execution handler for the 'update_item' MCP tool, which destructures itemId from input and forwards the remaining fields as update data to the QiitaApiClient's updateItem method.
    update_item: { schema: updateItemSchema, execute: async ({ itemId, ...rest }, client) => client.updateItem(itemId, rest), },
  • Zod schema used for runtime input validation of the update_item tool handler.
    const updateItemSchema = z.object({ itemId: z.string(), title: z.string(), body: z.string(), tags: z.array(tagSpecificationSchema), private: z.boolean().optional(), });
  • MCP Tool definition object for 'update_item', including name, description, and JSON inputSchema used for tool listing and validation.
    { name: 'update_item', description: '既存の記事を更新します', inputSchema: { type: 'object', properties: { itemId: { type: 'string', description: '記事ID', }, title: { type: 'string', description: '記事のタイトル', }, body: { type: 'string', description: '記事の本文(Markdown形式)', }, tags: { type: 'array', description: 'タグの配列', items: { type: 'object', properties: { name: { type: 'string', description: 'タグ名', }, versions: { type: 'array', description: 'タグのバージョン', items: { type: 'string', }, }, }, required: ['name', 'versions'], }, }, private: { type: 'boolean', description: '非公開記事かどうか', default: false, }, }, required: ['itemId', 'title', 'body', 'tags'], }, },
  • Low-level API client method that sends a PATCH request to Qiita's /items/{itemId} endpoint to update the item, called by the tool handler.
    async updateItem(itemId: string, item: { title: string; body: string; tags: Array<{ name: string; versions: string[] }>; private?: boolean; }) { this.assertAuthenticated(); const response = await this.client.patch(`/items/${itemId}`, item); 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