get_user_social
Retrieve a user's social profile data including followers, followees, counts, and popularity status from the Polarsteps travel platform.
Instructions
Get a users' social information including: followers, followees, their count and if they're considered popular.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| username | Yes | The username of the Polarstep user to look for. |
Implementation Reference
- src/polarsteps_mcp/tools.py:43-52 (handler)The main handler function for the 'get_user_social' tool. It retrieves the user by username using _get_user, checks if found, and returns social info or error message.def get_user_social( polarsteps_client: PolarstepsClient, input: GetUserSocial ) -> list[TextContent]: user = _get_user(polarsteps_client, input.username) if user.id == -1: return single_text_content( f"User not found: No Polarsteps user exists with username={input.username}. Please verify the username is correct and the user's profile is public." ) return single_text_content(user.to_social())
- src/polarsteps_mcp/tools.py:36-41 (schema)Pydantic schema/model for input validation of the get_user_social tool, requiring a 'username' field.class GetUserSocial(BaseModel): username: str = Field( ..., description="The username of the Polarstep user to look for.", )
- src/polarsteps_mcp/tools.py:207-211 (registration)Registration of the 'get_user_social' tool in the PolarstepsTool enum, including name, description, and schema.USER_SOCIAL = ( "get_user_social", "Get a users' social information including: followers, followees, their count and if they're considered popular.", GetUserSocial, )
- src/polarsteps_mcp/server.py:48-51 (registration)Tool dispatch/registration in the MCP server's call_tool handler, matching on the tool name and calling the handler with client and parsed input.case PolarstepsTool.USER_SOCIAL: input = GetUserSocial(**args) return get_user_social(client, input)