Skip to main content
Glama
stefanstranger

mcp-server-vanmoof

get_rider_preferences

Retrieve rider preferences from the VanMoof API to access personalized settings and configurations for bike customization.

Instructions

    Retrieves rider preferences from the vanMoof API.

    Returns:
        The rider preferences if authentication is successful, otherwise None.
    

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler function that implements the core logic of the 'get_rider_preferences' tool. It authenticates with the VanMoof API, retrieves the rider ID, constructs the API URL, and returns the preferences data.
    def get_rider_preferences() -> Dict[str, Any]:
        """
        Retrieves rider preferences from the vanMoof API.
    
        Returns:
            The rider preferences if authentication is successful, otherwise None.
        """
    
        # Get the Bearer token from the authenticate method
        token = VanMoofAPI.get_vanmoof_token(VANMOOF_USERNAME, VANMOOF_PASSWORD)
        application_token = VanMoofAPI.get_application_token(token)
        if not application_token:
            return {"error": "Authentication failed"}
    
        # Get the riderId from the customer data
        # path to rider is data.uuid in the customer data json response
        riderId = VanMoofAPI.get_customer_data().get('data', {}).get('uuid')
        if not riderId:
            return {"error": "RiderId not found"}
    
        url = f"https://tenjin.vanmoof.com/api/v1/riders/{riderId}/preferences"
        headers = {
            "authorization": f"Bearer {application_token}",
            "api-key": "fcb38d47-f14b-30cf-843b-26283f6a5819"
        }
        response = requests.get(url, headers=headers)
        return response.json()
  • server.py:161-161 (registration)
    The @mcp.tool() decorator registers the get_rider_preferences function as a tool in the FastMCP server.
    # Function to get rider preferences
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden. It discloses that authentication is required and describes the return behavior (preferences if successful, None otherwise). However, it lacks details on error handling, rate limits, or side effects, which are important for a tool interacting with an external API.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is brief and front-loaded, with the main purpose stated first and additional behavioral context in a second sentence. There's no wasted text, but the structure could be slightly improved by integrating the return information more seamlessly rather than as a separate 'Returns:' section.

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

Completeness3/5

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

Given no annotations, no output schema, and 0 parameters, the description covers the basic purpose and authentication behavior adequately. However, for an API tool, it lacks details on response format, error types, or integration context, which would help an agent use it more effectively in complex scenarios.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The tool has 0 parameters with 100% schema description coverage, so the schema fully documents the inputs. The description doesn't need to add parameter details, and it correctly avoids redundancy. A baseline of 4 is appropriate as it focuses on the tool's purpose without unnecessary parameter explanations.

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

Purpose4/5

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

The description clearly states the action ('Retrieves') and resource ('rider preferences'), and specifies the source ('from the vanMoof API'). It distinguishes from sibling tools that focus on rides, cities, or customer data. However, it doesn't explicitly contrast with specific alternatives, keeping it at 4 rather than 5.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives like 'get_customer_data' or other ride-related tools. It mentions authentication but doesn't specify prerequisites or contextual triggers for selecting this tool over siblings, leaving usage unclear.

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/stefanstranger/mcp-server-vanmoof'

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