Skip to main content
Glama
remuzel

Polarsteps MCP Server

by remuzel

search_trips

Find specific trips in a user's travel history by searching with destination names, themes, or partial trip titles using flexible matching that accommodates approximate spelling.

Instructions

Search through a user's trips by name/title using fuzzy matching to find specific trips. Ideal for finding trips by destination (e.g., 'japan', 'italy'), themes (e.g., 'honeymoon', 'business'), or partial name matches. Supports flexible search terms that don't need to match exactly - the fuzzy matching will find relevant trips even with approximate spelling or partial keywords. Use this as the first step when looking for specific trips by destination, theme, or name.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
usernameYesThe Polarsteps username whose trips you want to search through
name_queryYesSearch term to match against trip names/titles (supports partial matching and fuzzy search)

Implementation Reference

  • The main handler function that performs fuzzy search on user's trips by name or summary matching the query.
    def search_trips(polarsteps_client: PolarstepsClient, input: SearchTripsInput):
        user = _get_user(polarsteps_client, input.username)
        if user.alltrips is None:
            return single_text_content(
                f"No trips found for user with username={input.username}"
            )
    
        matched_trips = fuzzy_search_items(
            user.alltrips, input.name_query, field_name="name"
        )
        matched_trips.extend(
            fuzzy_search_items(user.alltrips, input.name_query, field_name="summary")
        )
    
        return [
            TextContent(type="text", text=trip.model_dump_json(include={"id", "name"}, exclude_none=True))
            for trip, _ in matched_trips
        ]
  • Pydantic model defining the input schema for the search_trips tool: username and name_query.
    class SearchTripsInput(BaseModel):
        username: str = Field(
            ...,
            description="The Polarsteps username whose trips you want to search through",
        )
        name_query: str = Field(
            ...,
            description="Search term to match against trip names/titles (supports partial matching and fuzzy search)",
        )
  • Tool registration in PolarstepsTool enum: name, description, and schema reference.
    SEARCH_TRIPS = (
        "search_trips",
        "Search through a user's trips by name/title using fuzzy matching to find specific trips. Ideal for finding trips by destination (e.g., 'japan', 'italy'), themes (e.g., 'honeymoon', 'business'), or partial name matches. Supports flexible search terms that don't need to match exactly - the fuzzy matching will find relevant trips even with approximate spelling or partial keywords. **Use this as the first step when looking for specific trips by destination, theme, or name.**",
        SearchTripsInput,
    )
  • Dispatch case in MCP server's call_tool handler that invokes the search_trips function.
    case PolarstepsTool.SEARCH_TRIPS:
        input = SearchTripsInput(**args)
        return search_trips(client, input)
  • MCP server tool listing function that registers all PolarstepsTool entries, including search_trips.
    @server.list_tools()
    async def list_tools() -> list[Tool]:
        return [
            Tool(
                name=tool.value,
                description=tool.description,
                inputSchema=tool.schema,
            )
            for tool in PolarstepsTool
        ]
Behavior4/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 effectively describes key behavioral traits: the fuzzy matching mechanism ('supports flexible search terms', 'approximate spelling or partial keywords'), search scope ('by name/title', 'destination', 'themes'), and that it's a search operation (implied read-only). However, it doesn't mention potential limitations like result limits, sorting, or error conditions.

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 well-structured and appropriately sized. It front-loads the core purpose, provides specific examples, explains the fuzzy matching behavior, and ends with clear usage guidance. Every sentence adds value without redundancy or unnecessary elaboration.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's moderate complexity (search operation with fuzzy matching), no annotations, and no output schema, the description does a good job covering the essential context. It explains what the tool does, when to use it, and how the search works. The main gap is lack of information about return format or result structure, which would be helpful since there's no output schema.

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?

Schema description coverage is 100%, so the schema already documents both parameters thoroughly. The description adds some context about how 'name_query' works with fuzzy matching and examples of search terms, but doesn't provide additional semantic meaning beyond what's in the schema descriptions. This meets the baseline for high schema coverage.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose with specific verbs ('search through a user's trips') and resources ('trips'), and distinguishes it from siblings by specifying fuzzy matching capabilities. It explicitly mentions what it searches (name/title, destination, themes) and how it works (fuzzy matching, partial matches).

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides explicit usage guidance: 'Use this as the first step when looking for specific trips by destination, theme, or name.' This clearly indicates when to use this tool versus alternatives (e.g., get_trips for unfiltered listing), and specifies the ideal scenarios (finding trips by destination, theme, or partial name).

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

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