Skip to main content
Glama

get_user_following

Retrieve the list of users a specific user follows on WebSim, with options to limit results and paginate through large datasets.

Instructions

Get users that a specific user is following

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
userYesUsername
limitNoNumber of users to return (default: 20)
offsetNoNumber of users to skip (default: 0)

Implementation Reference

  • The main handler function for the MCP tool 'get_user_following'. Validates input, calls the API client method, and returns formatted JSON response.
    handler: async (args) => {
      const { user, limit = 20, offset = 0 } = UserParamsSchema.parse(args);
      const result = await apiClient.getUserFollowing(user, limit, offset);
      return {
        content: [{
          type: "text",
          text: JSON.stringify({
            success: true,
            data: result,
            message: `Successfully retrieved ${result.items?.length || 0} users followed by ${user}`
          }, null, 2)
        }]
      };
    }
  • Input schema for the 'get_user_following' tool defining parameters: user (required), limit, and offset.
    inputSchema: {
      type: "object",
      properties: {
        user: {
          type: "string",
          description: "Username"
        },
        limit: {
          type: "number",
          description: "Number of users to return (default: 20)",
          default: 20
        },
        offset: {
          type: "number",
          description: "Number of users to skip (default: 0)",
          default: 0
        }
      },
      required: ["user"]
    },
  • WebSimAPIClient helper method that performs the HTTP request to retrieve the list of users followed by the given user.
    async getUserFollowing(user, limit = 20, offset = 0) {
      const params = new URLSearchParams({ limit: limit.toString(), offset: offset.toString() });
      return this.makeRequest(`/api/v1/users/${user}/following?${params}`);
    }
  • server.js:568-605 (registration)
    The complete tool registration object added to the tools array, which defines the tool for MCP server.
    {
      name: "get_user_following",
      description: "Get users that a specific user is following",
      inputSchema: {
        type: "object",
        properties: {
          user: {
            type: "string",
            description: "Username"
          },
          limit: {
            type: "number",
            description: "Number of users to return (default: 20)",
            default: 20
          },
          offset: {
            type: "number",
            description: "Number of users to skip (default: 0)",
            default: 0
          }
        },
        required: ["user"]
      },
      handler: async (args) => {
        const { user, limit = 20, offset = 0 } = UserParamsSchema.parse(args);
        const result = await apiClient.getUserFollowing(user, limit, offset);
        return {
          content: [{
            type: "text",
            text: JSON.stringify({
              success: true,
              data: result,
              message: `Successfully retrieved ${result.items?.length || 0} users followed by ${user}`
            }, null, 2)
          }]
        };
      }
    },
  • Shared Zod schema used in the handler for parsing the 'user' parameter.
    const UserParamsSchema = z.object({
      user: z.string().describe('Username')
    });
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It states it's a read operation ('Get'), but lacks details on permissions, rate limits, pagination behavior (beyond implied by limit/offset), error handling, or response format. This is a significant gap for a tool with parameters and no output schema.

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 that directly states the tool's purpose without unnecessary words. It's front-loaded and wastes no space, making it highly concise and well-structured.

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 tool has 3 parameters, no annotations, and no output schema, the description is incomplete. It doesn't address behavioral aspects like response format, error cases, or usage context, leaving gaps that could hinder an AI agent's ability to use the tool effectively.

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 description adds no parameter semantics beyond what the input schema provides, which has 100% coverage with clear descriptions for 'user', 'limit', and 'offset'. The baseline score of 3 is appropriate since the schema adequately documents the parameters, though the description doesn't enhance understanding.

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 verb 'Get' and the resource 'users that a specific user is following', making the purpose unambiguous. However, it doesn't explicitly differentiate from its sibling 'get_user_followers', which retrieves followers rather than following, though this distinction is implied by the tool names.

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. The description doesn't mention prerequisites, such as whether the user must exist or be public, or contrast it with similar tools like 'get_user_followers' or 'search_users' for broader user 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/gigachadtrey/websimm'

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