Skip to main content
Glama
taka392
by taka392

search_item_summary

Search eBay marketplace listings with filters for category, limit, offset, and sort order to find items matching your query.

Instructions

Search marketplace listings (Browse item_summary/search).

Typical filters: limit 1–50 for quick previews. category_ids is optional (comma-separated eBay leaf category ids).

Sort: omit for Best Match; use newlyListed for newest listings first.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYes
limitNo
offsetNo
category_idsNo
sortNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • Core implementation of search_item_summary. Builds query parameters (q, limit, offset, category_ids, sort), sends GET to eBay Browse API /buy/browse/v1/item_summary/search, and returns the response dict. Handles validation (non-empty query, limit 1-200, non-negative offset).
    def search_item_summary(
        self,
        query: str,
        *,
        limit: int = 20,
        offset: int = 0,
        category_ids: Optional[str] = None,
        sort: Optional[str] = None,
    ) -> Dict[str, Any]:
        """Browse item summary search (Buy Browse).
    
        GET buy/browse/v1/item_summary/search
    
        ``sort`` examples: ``newlyListed`` (listing date), ``endingSoonest``,
        ``price``, ``-price``, ``distance`` (requires pickup filters).
        """
        q = query.strip()
        if not q:
            raise EbayError("query must not be empty")
        if limit < 1 or limit > 200:
            raise EbayError("limit must be between 1 and 200")
        if offset < 0:
            raise EbayError("offset must be >= 0")
        params: Dict[str, Any] = {"q": q, "limit": limit, "offset": offset}
        if category_ids and category_ids.strip():
            params["category_ids"] = category_ids.strip()
        if sort and sort.strip():
            params["sort"] = sort.strip()
        url = f"{self.api_root}/buy/browse/v1/item_summary/search"
        data = self._request_json(
            "GET",
            url,
            params=params,
            retry_refresh=True,
        )
        if not isinstance(data, dict):
            raise EbayError(f"Unexpected search payload: {type(data)!r}")
        return data
  • MCP tool registration using @mcp.tool() decorator. Defines the tool's schema (query, limit, offset, category_ids, sort params) and delegates to EbayClient.search_item_summary.
    @mcp.tool()
    def search_item_summary(
        query: str,
        limit: int = 20,
        offset: int = 0,
        category_ids: Optional[str] = None,
        sort: Optional[str] = None,
    ) -> Dict[str, Any]:
        """Search marketplace listings (Browse item_summary/search).
    
        Typical filters: limit 1–50 for quick previews. category_ids is optional
        (comma-separated eBay leaf category ids).
    
        Sort: omit for Best Match; use ``newlyListed`` for newest listings first.
        """
        return _client().search_item_summary(
            query,
            limit=limit,
            offset=offset,
            category_ids=category_ids,
            sort=sort,
        )
  • Input schema definition for the MCP tool via function signature. Parameters: query (str, required), limit (int, default 20), offset (int, default 0), category_ids (Optional[str]), sort (Optional[str]). Return type is Dict[str, Any].
    @mcp.tool()
    def search_item_summary(
        query: str,
        limit: int = 20,
        offset: int = 0,
        category_ids: Optional[str] = None,
        sort: Optional[str] = None,
    ) -> Dict[str, Any]:
  • Internal usage of search_item_summary within EbayClient.verify() as a probe call when using application tokens (no user token) to verify connectivity.
    if self.token_kind == "application":
        probe = self.search_item_summary(
            "electronics",
            limit=1,
            offset=0,
            sort=None,
        )
  • Smoke-test usage of search_item_summary in check.py for end-to-end verification, called with query from env var and sort='newlyListed'.
    latest = client.search_item_summary(
        kw,
        limit=int(os.getenv("EBAY_CHECK_LIMIT", "10")),
        offset=0,
        sort="newlyListed",
    )
Behavior3/5

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

No annotations provided, so description carries full burden. It mentions limit range and sort behavior, but lacks details on query semantics, pagination (offset), authentication, or rate limits. Adequate but not rich.

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 concise with three focused sentences, no redundant information, and front-loaded with the primary purpose.

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

Completeness3/5

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

Despite having an output schema and reasonable parameter hints, missing context on query semantics, offset usage, and authentication requirements. Adequate for a simple search tool but could be improved.

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?

Schema coverage is 0%, so description must compensate. It describes limit (1-50), category_ids (comma-separated leaf ids), and sort (Best Match vs newlyListed). However, query and offset are not described, so only partial coverage.

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 states 'Search marketplace listings' which is a clear verb+resource. It distinguishes itself from sibling tools like get_item_summary (single item retrieval) and auth/verify tools.

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?

Provides typical filter usage (limit 1-50 for previews, category_ids optional, sort options). Does not explicitly state when not to use, but the purpose is clear and no alternative search tool exists among siblings.

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