Skip to main content
Glama

ebay_get_oauth_url

Generate an eBay OAuth authorization URL for user consent. Open the URL in a browser to grant permissions and start the OAuth 2.0 Authorization Code flow.

Instructions

Generate the eBay OAuth authorization URL for user consent. The user should open this URL in a browser to grant permissions to the application. This supports the OAuth 2.0 Authorization Code grant flow. The redirect URI can be provided as a parameter or will be read from EBAY_REDIRECT_URI environment variable.

IMPORTANT: eBay has different OAuth scopes available for production vs sandbox environments:

  • Sandbox includes additional Buy API scopes (e.g., buy.order.readonly, buy.guest.order, buy.shopping.cart) and extended Identity scopes

  • Production includes sell.edelivery, commerce.message (explicit), and commerce.shipping scopes not available in sandbox

  • If you provide custom scopes, they will be validated against the current environment (set via EBAY_ENVIRONMENT). Any scopes not valid for the environment will generate warnings.

OAUTH FLOW INSTRUCTIONS:

  1. Generate OAuth URL with this tool (optionally specify scopes)

  2. User opens URL in browser, authorizes, and gets redirected with a code parameter

  3. Use ebay_exchange_authorization_code tool with the code (URL-encoded format accepted)

  4. Tokens are automatically stored and will auto-refresh every 2 hours

COMMON SCOPES:

  • Basic (always included): https://api.ebay.com/oauth/api_scope

  • Inventory: https://api.ebay.com/oauth/api_scope/sell.inventory

  • Inventory (readonly): https://api.ebay.com/oauth/api_scope/sell.inventory.readonly

  • Account: https://api.ebay.com/oauth/api_scope/sell.account

  • Fulfillment: https://api.ebay.com/oauth/api_scope/sell.fulfillment

TROUBLESHOOTING:

  • Authorization codes expire in ~5 minutes - get fresh code if "invalid grant" error

  • "Insufficient permissions" errors mean you need to re-authorize with additional scopes

  • OAuth URL format: Use + to separate scopes (e.g., scope=scope1+scope2), not %2B

  • Refresh tokens last 18 months and are saved to .env file for persistence

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
redirectUriNoOptional redirect URI registered with your eBay application (RuName). If not provided, will use EBAY_REDIRECT_URI from .env file.
scopesNoOptional array of OAuth scopes. If not provided, uses environment-specific default scopes (production or sandbox based on EBAY_ENVIRONMENT). Custom scopes will be validated against the environment.
stateNoOptional state parameter for CSRF protection
Behavior5/5

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

Despite no annotations, the description thoroughly explains OAuth flow details, environment-specific scopes, token lifetimes (auth code expires in 5 min, refresh token lasts 18 months), auto-refresh behavior, and scope validation warnings.

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?

Well-structured with clear sections (flow, scopes, troubleshooting), but slightly verbose; could be more concise while retaining all essential information.

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?

Covers the OAuth flow, scopes, troubleshooting, and environment differences comprehensively. Lacks explicit mention of the return value (presumably a URL), but overall complete for the tool's purpose.

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

Parameters5/5

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

Adds significant value beyond the input schema: clarifies redirectUri as RuName, explains default scopes per environment, lists common scopes, and describes state parameter for CSRF protection.

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 explicitly states the tool generates an eBay OAuth authorization URL for user consent and clearly distinguishes it from related tools like ebay_exchange_authorization_code by outlining the OAuth flow steps.

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?

Provides explicit step-by-step flow instructions, mentions when to use alternative tools (e.g., re-authorize if insufficient permissions), and includes troubleshooting guidance for common errors.

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/YosefHayim/ebay-mcp'

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