Skip to main content
Glama

uber_set_access_token

Store Uber access tokens after OAuth authentication to enable AI assistants to book and manage rides through the MCP Uber Server.

Instructions

Set the access token for a user after OAuth callback

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
userIdYesUnique identifier for the user
accessTokenYesUber access token for the user

Implementation Reference

  • Handler for the uber_set_access_token tool: parses input using SetTokenSchema, stores the access token in the userTokens Map for the user, sets it on the UberClient instance, and returns a success message.
    case 'uber_set_access_token': { const { userId, accessToken } = SetTokenSchema.parse(args); userTokens.set(userId, accessToken); uberClient.setAccessToken(accessToken); return { content: [ { type: 'text', text: 'Access token set successfully', }, ], }; }
  • Zod input schema for the uber_set_access_token tool, validating userId and accessToken as strings.
    const SetTokenSchema = z.object({ userId: z.string().describe('Unique identifier for the user'), accessToken: z.string().describe('Uber access token for the user'), });
  • src/index.ts:113-117 (registration)
    Registration of the uber_set_access_token tool in the TOOLS array used for ListToolsRequest, including name, description, and derived JSON input schema.
    { name: 'uber_set_access_token', description: 'Set the access token for a user after OAuth callback', inputSchema: zodToJsonSchema(SetTokenSchema), },

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