Skip to main content
Glama
remuzel

Polarsteps MCP Server

by remuzel

get_user_stats

Retrieve travel statistics and analytics for a Polarsteps user, including countries visited, distance traveled, and trip details to analyze travel history.

Instructions

Get available travel statistics and metrics for a Polarsteps user, including countries visited, total distance traveled, trip counts, and detailed travel analytics. Perfect for getting a complete picture of someone's travel history and achievements.

Input Schema

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

Implementation Reference

  • The core handler function that implements the get_user_stats tool logic. It retrieves the user via _get_user helper and returns their stats as TextContent or an error message if none available.
    def get_user_stats( polarsteps_client: PolarstepsClient, input: GetUserStats ) -> list[TextContent]: user = _get_user(polarsteps_client, input.username) if user.stats is None: return single_text_content( f"No travel stats found for username={input.username}" ) return single_text_content(user.stats)
  • Pydantic schema/model for the input parameters of the get_user_stats tool, defining the required 'username' field.
    class GetUserStats(BaseModel): username: str = Field( ..., description="The username of the Polarstep user to look for.", )
  • Registration of the 'get_user_stats' tool within the PolarstepsTool Enum, specifying the tool name, description, and input schema class.
    USER_STATS = ( "get_user_stats", "Get available travel statistics and metrics for a Polarsteps user, including countries visited, total distance traveled, trip counts, and detailed travel analytics. Perfect for getting a complete picture of someone's travel history and achievements.", GetUserStats, )
  • Dispatch/handling case in the MCP server's call_tool method that invokes the get_user_stats implementation from tools.py.
    case PolarstepsTool.USER_STATS: input = GetUserStats(**args) return get_user_stats(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