Skip to main content
Glama

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, }; } });

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