Skip to main content
Glama
Selenium39

Qiita API MCP Server

get_tag

Retrieve detailed information about a specific tag from the Qiita developer community platform. Use this tool to access tag metadata and descriptions for content organization.

Instructions

指定されたタグの詳細情報を取得します

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tagIdYesタグID

Implementation Reference

  • Handler definition for the 'get_tag' tool, including its Zod input schema reference and execute function that calls the Qiita client's getTag method.
    get_tag: {
      schema: tagIdSchema,
      execute: async ({ tagId }, client) => client.getTag(tagId),
    },
  • MCP Tool schema definition for 'get_tag', used in listTools response, specifying name, description, and JSON schema for input (tagId).
    {
      name: 'get_tag',
      description: '指定されたタグの詳細情報を取得します',
      inputSchema: {
        type: 'object',
        properties: {
          tagId: {
            type: 'string',
            description: 'タグID',
          },
        },
        required: ['tagId'],
      },
    },
  • Qiita API client method that performs the HTTP GET request to retrieve details of a specific tag.
    async getTag(tagId: string) {
      const response = await this.client.get(`/tags/${tagId}`);
      return response.data;
    }
  • Zod schema definition for tagId input, reused by 'get_tag' and other tag-related tools for input validation.
    const tagIdSchema = z.object({
      tagId: z.string(),
    });
  • src/index.ts:30-65 (registration)
    Server request handler for calling any tool, including 'get_tag', which retrieves the handler from toolHandlers map, validates input, executes it with Qiita client, and returns result.
    server.setRequestHandler(CallToolRequestSchema, async (request) => {
      const { name, arguments: args } = request.params;
    
      const accessToken = process.env.QIITA_ACCESS_TOKEN;
      const qiita = new QiitaApiClient(accessToken);
      const handler = toolHandlers[name];
    
      try {
        if (!handler) {
          throw new Error(`未知のツール: ${name}`);
        }
    
        const parsedArgs = handler.schema.parse(args ?? {});
        const result = await handler.execute(parsedArgs, qiita);
    
        return {
          content: [
            {
              type: 'text',
              text: JSON.stringify(result, null, 2),
            },
          ],
        };
      } catch (error: any) {
        const message = error?.message ?? String(error);
        return {
          content: [
            {
              type: 'text',
              text: `エラーが発生しました: ${message}`,
            },
          ],
          isError: true,
        };
      }
    });
Behavior2/5

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

With no annotations provided, the description carries full burden for behavioral disclosure. It mentions retrieving details but doesn't specify what '詳細情報' (detailed information) includes, whether authentication is required, error conditions, or response format. This leaves significant gaps for a tool that presumably fetches data.

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 purpose without unnecessary words. It's appropriately sized and front-loaded with the core action.

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 no annotations and no output schema, the description is insufficient. It doesn't explain what '詳細情報' includes (e.g., tag name, description, usage count), potential errors (e.g., invalid tagId), or authentication needs. For a data retrieval tool, this leaves too much undefined.

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, with 'tagId' clearly documented as 'タグID' (tag ID). The description doesn't add any parameter details beyond what the schema provides, but since schema coverage is high, the baseline score of 3 is appropriate.

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 ('取得します' - get/retrieve) and resource ('タグの詳細情報' - detailed tag information), making the purpose understandable. However, it doesn't differentiate this from sibling tools like 'get_tags' (plural) or 'get_tag_items', leaving room for ambiguity about when to use each.

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?

No guidance is provided on when to use this tool versus alternatives like 'get_tags' (which likely lists multiple tags) or 'get_tag_items' (which might retrieve items associated with a tag). The description only states what the tool does, not when it's appropriate.

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