Skip to main content
Glama
remuzel

Polarsteps MCP Server

by remuzel

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
NameRequiredDescriptionDefault
usernameYesThe username of the Polarstep user to look for.

Implementation Reference

  • 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())
  • 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.",
        )
  • 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,
    )
  • 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)

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/remuzel/polarsteps-mcp'

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