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;
      }
    }
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the tool checks stock status but doesn't reveal if it requires authentication, has rate limits, returns errors for invalid items, or provides any metadata beyond a boolean. For a read operation with zero annotation coverage, this leaves significant gaps in understanding its behavior.

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 in Japanese that directly states the tool's function without unnecessary words. It's front-loaded with the core purpose, making it easy to parse quickly. Every part of the sentence contributes essential information.

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?

Given the lack of annotations and output schema, the description is incomplete. It doesn't explain what the tool returns (e.g., a boolean, error details, or stock metadata), authentication requirements, or error handling. For a tool in a context with many sibling operations, more context is needed to use it effectively alongside alternatives.

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 input schema has 100% description coverage ('記事ID' - article ID), so the schema fully documents the parameter. The description adds no additional semantic context beyond implying 'itemId' refers to an article. With high schema coverage, the baseline is 3, as the description doesn't compensate but also doesn't detract.

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 tool's purpose: '指定された記事がストックされているかどうかを確認します' (Check if the specified article is stocked). It uses a specific verb ('確認します' - check/verify) and resource ('記事' - article), making the function unambiguous. However, it doesn't explicitly distinguish itself from sibling tools like 'get_user_stocks' or 'get_item_stockers', which might provide related stock information.

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 (like authentication), compare with sibling tools (e.g., 'get_user_stocks' for listing stocked items or 'get_item_stockers' for seeing who stocked an item), or specify scenarios where this boolean check is preferred over other stock-related queries.

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

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