Skip to main content
Glama

update_qiita_article

Modify an existing Qiita article by updating its title, body, tags, privacy status, organization, or slide mode using the article ID. Simplifies content management on Qiita.

Instructions

update an existing Qiita article

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
bodyYesMarkdown formatted content
item_idYesThe ID of the article to update
organization_url_nameNoThe url_name of the organization for the article
privateNoWhether the article is private
slideNoWhether to enable slide mode
tagsNoList of tags for the article
titleYesArticle title

Implementation Reference

  • The handler function that implements the 'update_qiita_article' tool logic. It destructures the params, calls the QiitaApiService.updateItem method, formats a success response with Japanese text, or returns an error response.
    const updateQiitaArticle = async (params: UpdateArticleParams): Promise<any> => {
      try {
        const { item_id, ...updateParams } = params;
        const updatedItem = await apiService.updateItem(item_id, updateParams);
        
        return createSuccessResponse(
          `記事が正常に更新されました。\nタイトル: ${updatedItem.title}\nURL: ${updatedItem.url}\n\n` + 
          JSON.stringify(updatedItem, null, 2)
        );
      } catch (error) {
        const errorMessage = error instanceof Error ? error.message : String(error);
        return createErrorResponse(`Error updating Qiita article: ${errorMessage}`);
      }
    };
  • Zod schema defining the input parameters for the update_qiita_article tool, including item_id, title, body, optional tags, private, organization_url_name, and slide.
    const updateArticleSchema = z.object({
      item_id: z.string().describe("The ID of the article to update"),
      title: z.string().describe("Article title"),
      body: z.string().describe("Markdown formatted content"),
      tags: z.array(z.object({
        name: z.string().describe("Tag name"),
        versions: z.array(z.string()).optional().describe("Versions (optional)")
      })).optional().describe("List of tags for the article"),
      private: z.boolean().optional().describe("Whether the article is private"),
      organization_url_name: z.string().optional().describe("The url_name of the organization for the article"),
      slide: z.boolean().optional().describe("Whether to enable slide mode")
    });
    type UpdateArticleParams = z.infer<typeof updateArticleSchema>;
  • Registration of the 'update_qiita_article' tool within the getToolDefinitions() export, specifying name, description, parameters schema, and handler.
    {
      name: "update_qiita_article",
      description: "update an existing Qiita article",
      parameters: updateArticleSchema.shape,
      handler: (params: UpdateArticleParams) => updateQiitaArticle(params)
    },
  • The QiitaApiService.updateItem method, which performs the actual PATCH request to the Qiita API to update the article, handles authentication, removes undefined fields, and filters the response.
    updateItem = async (
      item_id: string, 
      params: {
        title: string;
        body: string;
        tags?: Array<{ name: string; versions?: string[] }>;
        private?: boolean;
        organization_url_name?: string;
        slide?: boolean;
      }
    ): Promise<any> => {
      this.validateToken();
      
      const requestBody = this.removeUndefinedFields(params);
      
      const response = await fetch(
        `${this.baseUrl}/items/${item_id}`, 
        {
          method: 'PATCH',
          headers: this.getHeaders(),
          body: JSON.stringify(requestBody)
        }
      );
      
      if (!response.ok) {
        await this.handleErrorResponse(response);
      }
      
      const item = await response.json();
      return this.filterItem(item);
    };
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It states 'update' which implies mutation, but doesn't disclose critical behavioral traits like required permissions, whether changes are reversible, rate limits, or what happens to unspecified fields (partial vs full updates). This leaves significant gaps for a mutation tool.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence with zero wasted words. It's appropriately sized and front-loaded with the core purpose, making it easy to parse quickly.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a mutation tool with 7 parameters, no annotations, and no output schema, the description is insufficiently complete. It doesn't address behavioral aspects like permissions, side effects, or response format, leaving the agent with inadequate context to use the tool safely and effectively.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema description coverage is 100%, so the schema already documents all 7 parameters thoroughly. The description adds no parameter information beyond what's in the schema, maintaining the baseline score of 3 for adequate but no extra value.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('update') and resource ('an existing Qiita article'), providing a specific verb+resource combination. However, it doesn't differentiate from sibling tools like 'post_qiita_article' (create vs update), which prevents a perfect score.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites (e.g., needing an existing article ID), when not to use it, or how it differs from 'post_qiita_article' for creation versus update operations.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Related Tools

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

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