Skip to main content
Glama

get_item

Retrieve a specific Qiita article using its unique ID to access content directly without searching through lists.

Instructions

Get a specific Qiita article by its ID.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
item_idYesArticle ID

Implementation Reference

  • The handler for the "get_item" tool within the CallToolRequest handler. It validates the item_id argument, calls the QiitaClient's getItem method, and returns the result as formatted JSON text content.
    case "get_item": {
      if (!args?.item_id) {
        throw new Error("item_id is required");
      }
      const result = await qiitaClient.getItem(args.item_id as string);
      return {
        content: [{ type: "text", text: JSON.stringify(result, null, 2) }],
      };
    }
  • Input schema definition for the "get_item" tool, specifying an object with a required 'item_id' string property.
    inputSchema: {
      type: "object",
      properties: {
        item_id: {
          type: "string",
          description: "Article ID",
        },
      },
      required: ["item_id"],
    },
  • src/index.ts:152-165 (registration)
    Tool registration object for "get_item" in the tools array, used by the ListToolsRequest handler to expose the tool.
    {
      name: "get_item",
      description: "Get a specific Qiita article by its ID.",
      inputSchema: {
        type: "object",
        properties: {
          item_id: {
            type: "string",
            description: "Article ID",
          },
        },
        required: ["item_id"],
      },
    },
  • Helper method in QiitaClient class that performs the actual API fetch for a specific item by ID using the private fetch method.
    async getItem(itemId: string): Promise<any> {
      return this.fetch(`/items/${itemId}`);
    }

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

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