Skip to main content
Glama
taka392
by taka392

verify

Verify eBay API credentials — user tokens or application-only keysets — to confirm authentication and enable account access.

Instructions

Verify credentials.

User token: Commerce Identity profile. Application-only keyset: Browse ping + totals.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • Core handler for the 'verify' tool. Calls Commerce Identity API for user tokens or does a Browse search ping for application-only tokens.
    def verify(self) -> Dict[str, Any]:
  • Full implementation of EbayClient.verify() — the core handler logic for the verify tool.
    def verify(self) -> Dict[str, Any]:
        """Ping OAuth credentials.
    
        With a **User** token: Commerce Identity GET ``/commerce/identity/v1/user/``.
    
        With **Application** credentials only: skips Identity (needs User OAuth),
        runs a minimal Browse search as connectivity proof.
        """
        if self.token_kind == "application":
            probe = self.search_item_summary(
                "electronics",
                limit=1,
                offset=0,
                sort=None,
            )
            first = None
            summaries = probe.get("itemSummaries")
            if isinstance(summaries, list) and summaries:
                row = summaries[0]
                if isinstance(row, dict):
                    first = {
                        "title": row.get("title"),
                        "itemOriginDate": row.get("itemOriginDate"),
                        "itemWebUrl": row.get("itemWebUrl"),
                    }
            return {
                "token_kind": "application",
                "note": (
                    "Commerce Identity requires a User OAuth token (ebay-mcp-auth). "
                    "Browse ping succeeded using application credentials."
                ),
                "browse_total_estimate": probe.get("total"),
                "browse_sample_item": first,
            }
    
        url = f"{self.commerce_root}/commerce/identity/v1/user/"
        data = self._request_json(
            "GET",
            url,
            retry_refresh=True,
        )
        if not isinstance(data, dict):
            raise EbayError(f"Unexpected identity payload: {type(data)!r}")
        out = dict(data)
        out["token_kind"] = "user"
        return out
  • Registration of the 'verify' tool via @mcp.tool() decorator on the verify() function in server.py.
    @mcp.tool()
    def verify() -> Dict[str, Any]:
        """Verify credentials.
    
        User token: Commerce Identity profile. Application-only keyset: Browse ping + totals."""
        return _client().verify()
  • Smoke-test script calling client.verify() for end-to-end validation.
    _dump("verify (Commerce Identity user)", client.verify())
  • Helper factory function _client() that creates EbayClient instance used by the verify tool.
    def _client() -> EbayClient:
        try:
            return EbayClient()
        except EbayError as exc:
            raise RuntimeError(str(exc)) from exc
Behavior2/5

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

No annotations exist, so the description must explain behavioral traits. It only states the tool verifies credentials but does not mention whether it is read-only, requires authentication, or has side effects.

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 with two short sentences, front-loads the core purpose, and includes valuable detail on credential types without any unnecessary words.

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?

For a zero-parameter tool with an output schema, the description sufficiently explains what the tool does and covers credential types. It could mention the return value briefly, but the output schema compensates.

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?

Input schema has no parameters and 100% coverage, so baseline is 3. Description adds no further parameter information, which is acceptable given no parameters exist.

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 the tool verifies credentials, and specifies the two credential types it handles (User token and Application-only keyset), making its purpose distinct from sibling tools like get_item_summary and refresh_access_token.

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 context on when to use this tool (for verifying credentials) and implicitly differentiates from siblings by naming credential types, but lacks explicit when-not or alternative recommendations.

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

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