Skip to main content
Glama
Selenium39

Qiita API MCP Server

is_item_stocked

Check if a Qiita article is stocked by users to monitor content popularity and engagement on the Japanese developer platform.

Instructions

指定された記事がストックされているかどうかを確認します

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
itemIdYes記事ID

Implementation Reference

  • The handler function for the 'is_item_stocked' tool. It uses itemIdSchema for validation and delegates execution to the QiitaApiClient's isItemStocked method.
    is_item_stocked: {
      schema: itemIdSchema,
      execute: async ({ itemId }, client) => client.isItemStocked(itemId),
    },
  • The schema definition for the 'is_item_stocked' tool, including name, description, and input schema used for MCP tool listing.
    {
      name: 'is_item_stocked',
      description: '指定された記事がストックされているかどうかを確認します',
      inputSchema: {
        type: 'object',
        properties: {
          itemId: {
            type: 'string',
            description: '記事ID',
          },
        },
        required: ['itemId'],
      },
    },
  • The core helper method in QiitaApiClient that implements the stock check logic by attempting a GET request to the stock endpoint and interpreting 404 as not stocked.
    async isItemStocked(itemId: string) {
      this.assertAuthenticated();
      try {
        await this.client.get(`/items/${itemId}/stock`);
        return { stocked: true };
      } catch (error: any) {
        if (error.response?.status === 404) {
          return { stocked: false };
        }
        throw error;
      }
    }

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