uber_get_ride_status
Check the current status of your Uber ride request to track driver location, estimated arrival time, and trip progress.
Instructions
Get the current status of a ride request
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| userId | Yes | Unique identifier for the user | |
| requestId | Yes | Ride request ID |
Implementation Reference
- src/index.ts:249-268 (handler)Handler function for uber_get_ride_status tool: validates input, checks user token, calls uberClient.getRideStatus, and returns JSON response.case 'uber_get_ride_status': { const { userId, requestId } = RideStatusSchema.parse(args); const token = userTokens.get(userId); if (!token) { throw new Error('User not authenticated. Please authorize first.'); } uberClient.setAccessToken(token); const status = await uberClient.getRideStatus(requestId); return { content: [ { type: 'text', text: JSON.stringify(status, null, 2), }, ], }; }
- src/index.ts:62-65 (schema)Zod schema for input validation of uber_get_ride_status tool (userId and requestId).const RideStatusSchema = z.object({ userId: z.string().describe('Unique identifier for the user'), requestId: z.string().describe('Ride request ID'), });
- src/index.ts:128-132 (registration)Tool registration in TOOLS array with name, description, and input schema.{ name: 'uber_get_ride_status', description: 'Get the current status of a ride request', inputSchema: zodToJsonSchema(RideStatusSchema), },
- src/uber-client.ts:91-94 (helper)Core implementation in UberClient: API call to Uber's /v1.2/requests/{requestId} endpoint.async getRideStatus(requestId: string): Promise<RideRequest> { const response = await this.api.get(`/v1.2/requests/${requestId}`); return response.data; }