Skip to main content
Glama
remuzel

Polarsteps MCP Server

by remuzel

get_user_profile

Retrieve a Polarsteps user's profile to view their current location, countries visited, and trip count by providing their username.

Instructions

Get a users' profile overview including their living location and their number of countries visited & trips.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
usernameYesThe username of the Polarstep user to look for.

Implementation Reference

  • Implements the core logic of the get_user_profile tool by fetching the user via _get_user helper and returning profile text content or error message.
    def get_user_profile(
        polarsteps_client: PolarstepsClient, input: GetUserProfile
    ) -> 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_profile())
  • Pydantic BaseModel defining the input parameters for the get_user_profile tool: username field.
    class GetUserProfile(BaseModel):
        username: str = Field(
            ...,
            description="The username of the Polarstep user to look for.",
        )
  • Registers the 'get_user_profile' tool in the PolarstepsTool enum with name, description, and schema reference.
    USER_PROFILE = (
        "get_user_profile",
        "Get a users' profile overview including their living location and their number of countries visited & trips.",
        GetUserProfile,
    )
  • Dispatches calls to the get_user_profile handler in the server's call_tool method.
    case PolarstepsTool.USER_PROFILE:
        input = GetUserProfile(**args)
        return get_user_profile(client, input)
  • Helper function _get_user that retrieves the user from Polarsteps API by username, returns dummy User if not found.
    def _get_user(polarsteps_client: PolarstepsClient, username: str) -> User:
        api_response = polarsteps_client.get_user_by_username(username)
        if api_response.is_error or api_response.user is None:
            return User(
                id=-1, uuid="00000000-0000-4000-8000-000000000000", username="unknown"
            )
        return api_response.user

Tool Definition Quality

Score is being calculated. Check back soon.

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

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