Skip to main content
Glama

ebay_get_oauth_url

Generate the eBay OAuth authorization URL for user consent. Open the URL in a browser to grant permissions and obtain an authorization code to exchange for tokens.

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:

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
stateNoOptional state parameter for CSRF protection
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.
redirectUriNoOptional redirect URI registered with your eBay application (RuName). If not provided, will use EBAY_REDIRECT_URI from .env file.
Behavior5/5

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

No annotations are provided, so the description carries full burden. It thoroughly discloses behavioral traits: it involves user interaction via browser, scopes differ by environment, tokens auto-refresh every 2 hours, authorization codes expire in ~5 minutes, and refresh tokens last 18 months. It also includes troubleshooting tips, making the behavior fully transparent.

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 lengthy but well-structured with sections (IMPORTANT, OAUTH FLOW, COMMON SCOPES, TROUBLESHOOTING). Each section adds value, and the main purpose is front-loaded. Minor redundancy could be trimmed, but overall it is efficient for the complexity.

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

Completeness5/5

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

Given the complexity of OAuth and no output schema, the description is exceptionally complete. It covers the full flow, environment differences, common scopes, troubleshooting, and even references the next tool. No critical information is missing for correct usage.

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?

Schema coverage is 100%, baseline 3. The description adds significant value beyond schema: it explains that omitting scopes uses defaults, redirectUri can come from environment variable, and provides a list of common scopes with details. It also clarifies the scope format (using +) and validation against environment. This greatly enhances understanding.

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 clearly states 'Generate the eBay OAuth authorization URL for user consent', specifying the verb (generate), resource (OAuth authorization URL), and purpose. It distinguishes itself from the many sibling tools, which are unrelated to OAuth flow.

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

Usage Guidelines4/5

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

The description provides explicit step-by-step OAuth flow instructions (steps 1-4) and mentions the follow-up tool 'ebay_exchange_authorization_code'. It also explains when to use it (to initiate user consent) but does not explicitly state when not to use it or alternatives. The guidance is clear and actionable.

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