Skip to main content
Glama
199-mcp
by 199-mcp

uber_request_ride

Book an Uber ride by providing user ID, product selection, and pickup/destination coordinates to arrange transportation.

Instructions

Request an Uber ride

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
userIdYesUnique identifier for the user
productIdYesUber product ID (from price estimates)
startLatitudeYesStarting location latitude
startLongitudeYesStarting location longitude
endLatitudeYesDestination latitude
endLongitudeYesDestination longitude
fareIdNoFare ID from price estimate

Implementation Reference

  • src/index.ts:123-127 (registration)
    Registration of the 'uber_request_ride' tool in the TOOLS array, including name, description, and input schema.
    {
      name: 'uber_request_ride',
      description: 'Request an Uber ride',
      inputSchema: zodToJsonSchema(RequestRideSchema),
    },
  • Zod schema defining the input parameters for the uber_request_ride tool.
    const RequestRideSchema = z.object({
      userId: z.string().describe('Unique identifier for the user'),
      productId: z.string().describe('Uber product ID (from price estimates)'),
      startLatitude: z.number().describe('Starting location latitude'),
      startLongitude: z.number().describe('Starting location longitude'),
      endLatitude: z.number().describe('Destination latitude'),
      endLongitude: z.number().describe('Destination longitude'),
      fareId: z.string().optional().describe('Fare ID from price estimate'),
    });
  • MCP tool handler for 'uber_request_ride': parses input, authenticates user, calls UberClient.requestRide, and returns the ride request details.
    case 'uber_request_ride': {
      const { userId, productId, startLatitude, startLongitude, endLatitude, endLongitude, fareId } =
        RequestRideSchema.parse(args);
      
      const token = userTokens.get(userId);
      if (!token) {
        throw new Error('User not authenticated. Please authorize first.');
      }
      
      uberClient.setAccessToken(token);
      const rideRequest = await uberClient.requestRide(
        productId,
        startLatitude,
        startLongitude,
        endLatitude,
        endLongitude,
        fareId
      );
      
      return {
        content: [
          {
            type: 'text',
            text: JSON.stringify(rideRequest, null, 2),
          },
        ],
      };
    }
  • Core implementation in UberClient class that makes the HTTP POST request to Uber's /v1.2/requests endpoint to request a ride.
    async requestRide(
      productId: string,
      startLat: number,
      startLng: number,
      endLat: number,
      endLng: number,
      fareId?: string
    ): Promise<RideRequest> {
      const payload: any = {
        product_id: productId,
        start_latitude: startLat,
        start_longitude: startLng,
        end_latitude: endLat,
        end_longitude: endLng,
      };
    
      if (fareId) {
        payload.fare_id = fareId;
      }
    
      const response = await this.api.post('/v1.2/requests', payload);
      return response.data;
    }
Behavior2/5

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

With no annotations provided, the description carries full burden for behavioral disclosure. 'Request an Uber ride' implies a write/mutation operation that likely requires authentication, triggers real-world consequences (ride dispatch), and may have rate limits or payment implications, but none of these behavioral traits are mentioned. The description is minimal and fails to address critical operational aspects.

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 extremely concise at just three words, with zero wasted language. It's front-loaded with the core action and resource. While this conciseness comes at the cost of completeness, as a standalone statement it's efficiently structured.

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

Completeness2/5

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

Given the complexity of a ride-request tool (real-world mutation with financial implications), no annotations, no output schema, and 7 parameters, the description is inadequate. It doesn't address authentication needs, response format, error conditions, or how this fits with sibling tools. The minimal description fails to provide sufficient context for safe and effective use.

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?

The input schema has 100% description coverage, providing clear documentation for all 7 parameters. The tool description adds no additional parameter semantics beyond what's in the schema, so it meets the baseline of 3. However, it doesn't explain relationships between parameters (e.g., that fareId from price estimates is optional but recommended) or usage patterns.

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 'Request an Uber ride' clearly states the action (request) and resource (Uber ride), making the purpose immediately understandable. However, it doesn't differentiate from sibling tools like 'uber_cancel_ride' or 'uber_get_ride_status', which would require more specific language about initiating a new ride request versus managing existing ones.

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 'uber_get_price_estimates' (which might be needed first to obtain productId/fareId) or 'uber_cancel_ride' (for post-request actions). It lacks context about prerequisites, timing, or workflow relationships with sibling tools.

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/199-mcp/mcp-uber'

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