Skip to main content
Glama
Selenium39

Qiita API MCP Server

unfollow_user

Stop following a specific user on Qiita by providing their user ID. This action removes them from your following list on the Japanese developer community platform.

Instructions

指定されたユーザーのフォローを解除します

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
userIdYesユーザーID

Implementation Reference

  • The handler for the 'unfollow_user' tool. It validates input using userIdSchema and executes by calling unfollowUser on the QiitaApiClient instance.
    unfollow_user: {
      schema: userIdSchema,
      execute: async ({ userId }, client) => client.unfollowUser(userId),
    },
  • The MCP tool schema definition for 'unfollow_user', including name, description, and input schema, used for tool listing.
      name: 'unfollow_user',
      description: '指定されたユーザーのフォローを解除します',
      inputSchema: {
        type: 'object',
        properties: {
          userId: {
            type: 'string',
            description: 'ユーザーID',
          },
        },
        required: ['userId'],
      },
    },
  • The core helper function implementing the unfollow logic by sending a DELETE request to the Qiita API.
    async unfollowUser(userId: string) {
      this.assertAuthenticated();
      await this.client.delete(`/users/${userId}/following`);
      return { success: true };
    }
  • src/index.ts:30-65 (registration)
    Server request handler for calling tools, which looks up the handler by name from toolHandlers and executes it with a QiitaApiClient instance.
    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,
        };
      }
    });
  • src/index.ts:26-28 (registration)
    Server request handler for listing tools, returning the tools array which includes the unfollow_user definition.
    server.setRequestHandler(ListToolsRequestSchema, async () => {
      return { tools };
    });
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 action ('unfollows') but does not cover critical aspects such as permissions required, whether the operation is idempotent, error conditions (e.g., if the user is not followed), or side effects. This leaves significant gaps in understanding the tool's 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 purpose without any unnecessary words. It is front-loaded and appropriately sized for a simple tool, making it easy to parse and understand quickly.

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 for a mutation tool. It does not explain what happens upon success (e.g., confirmation message, state change) or failure, nor does it address behavioral traits like idempotency or error handling. For a tool that modifies user relationships, this leaves too much unspecified.

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 'userId' clearly documented as 'ユーザーID' (user ID). The description adds no additional parameter semantics beyond what the schema provides, such as format examples or constraints. Given the high schema coverage, a baseline score of 3 is appropriate as the schema handles the documentation adequately.

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 ('unfollow') and target resource ('user') in Japanese, translating to 'Unfollows the specified user.' This is specific and unambiguous about what the tool does. However, it does not explicitly differentiate from sibling tools like 'unfollow_tag' or 'is_user_followed,' which slightly limits its clarity in context.

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 does not mention prerequisites (e.g., the user must be currently followed), exclusions, or related tools like 'follow_user' or 'is_user_followed.' Without such context, an agent might misuse it or overlook necessary checks.

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