SuperAPI AI Directory

linkfox-mercado-product-selection

Marketing & growth

View repository

Updated 10-16 00:00

About this skill

Mercado Libre Product Selection

This skill queries Mercado Libre product, catalog, keyword, category, trend, seller, review, exchange-rate, and plan-usage data through the LinkFox gateway. The gateway exposes one unified route, POST /mercado/productSelection, and the skill selects one of 24 supported toolName values with matching arguments.

Core Concepts

  • Call only ${LINKFOX_TOOL_GATEWAY}/mercado/productSelection. Do not call the upstream XP-MCP server directly, and do not ask the user for upstream secret-key / X-API-Key — upstream credentials are owned by the backend.
  • The request body is always {"toolName":"...","arguments":{...}}. The script takes this whole object as a single JSON argument.
  • Field names inside arguments must match references/mercado-tool-reference.md exactly, including camelCase names such as siteId, itemId, productId, categoryId, runDate, runMonth, pageNo, pageSize.
  • Read data first when presenting results. Read contentText when data is text or ambiguous. Show rawResponse only when the user asks for raw diagnostics.
  • Paid tools currently cost 16000 tokens per call; free tools cost 0. Trust the backend costToken field.

Reference Files

  • references/api.md: LinkFox gateway contract, request/response structure, error codes, curl example, and Feedback API.
  • references/mercado-tool-reference.md: detailed Chinese reference for the 24 Mercado Libre tools — parameters, site IDs, pagination, sorting, and billing status.

Tool Selection

User intent Use these tools
Product detail, product sales history, product search itemInfo, itemHistory, itemSearch
Catalog/product page detail, catalog sales history, catalog search catalogInfo, catalogHistory, catalogSearch
Daily/monthly hot keywords and reverse traffic keywords keywordDateSearch, keywordMonthSearch, keywordReverse
Category lookup before paid analysis categorySearch, categorySmallSearch
Category brand, item, seller, new item, price, sales, sold-history, statistics, warehouse distribution trendBrandTopBrand, trendBrandTopItem, trendBrandTopSeller, trendNewItems, trendPrice, trendSale, trendSoldHis, trendStatistical, trendStoreInventoryType
Seller search sellerSearch
Product reviews reviewSearch
Exchange rate and package usage rateInfo, myUsage

Free tools: categorySearch, categorySmallSearch, reviewSearch, rateInfo, myUsage. All others are paid.

Parameter Guide

  • toolName (string, required): one of the 24 tools above.
  • arguments (object, required): the tool's parameter object. Must be a JSON object, not an array/string/number. The backend strips uId/uid/memberId and trims empty values.
  • Sites: MLM (Mexico), MLB (Brazil), MLA (Argentina), MLC (Chile), MCO (Colombia — only for tools whose reference explicitly lists it).
  • When the user gives a category name instead of a categoryId, call categorySearch or categorySmallSearch first, then use the returned category ID for paid trend/product/catalog tools.
  • reviewSearch takes itemId only (no siteId). myUsage takes {}.
  • For broad research questions, narrow paid calls with site, category, keyword, date/month, pagination, price, sales, or sorting filters. Avoid exploratory paid calls not anchored to the user's goal.

How to call

  • API endpoint:POST /mercado/productSelection(for complete parameters/responses/error codes, see references/api.md)
  • Python script:python scripts/linkfox_mercado_product_selection.py '<JSON 参数>' [--inline]
  • Cost constraints: This tool consumes compute; by default, the same parameter combination is called only once per session, and the script has a 24h local cache. On failure/empty results, do not automatically try different keywords, paginate, or change the zip code to probe continuously; if further retrieval is needed, first explain to the user that additional consumption will be incurred.

Output strategy (default script behavior):

  • Alwayswrite the complete response to <cwd>/linkfox/<YYYY-MM-DD>/<session>/data/linkfox-mercado-product-selection-<timestamp>.json(<cwd> is the working directory when the script runs, which in Claude Code is the current project directory;<session> is taken from the environment variable SESSION_ID, automatically aggregated according to the user's task;writing to /tmp is prohibited, and if the current directory is not writable, report an error)
  • Response body ≤ 8 KB: after writing to disk, print the complete JSON to stdout
  • Response body > 8 KB: after writing to disk, stdout outputs only a summary (top-level fields, common counts such as total/costToken, the length of the largest list field + the first 3 samples)
  • Add --inline to force full printing to stdout (also written to disk)

Data reading suggestions: first look at the summary to judge whether it is sufficient; when specific fields are needed, prefer to use jqorConvertFrom-Json to extract on demand from the saved json file, avoiding bringing the entire JSON into context.

Resolve authentication and compute issues

When the following abnormal situations occur, use references/onboarding.md to guide resolution:

Abnormal situations

  • API Key not configured: the environment variable is not configured LINKFOX_AGENT_API_KEY, and LINKFOXAGENT_API_KEY。
  • is also not configured
  • Response prompts insufficient compute or balance: the message contains "insufficient compute balance/insufficient billing/insufficient balance/quota exceeded/insufficient balance/package expired/recharge required/please recharge", or content with a similar meaning.

Usage Examples

The single JSON argument is the full payload {"toolName":...,"arguments":{...}}.

# Free: search Mexico categories by name
python scripts/linkfox_mercado_product_selection.py '{"toolName":"categorySearch","arguments":{"siteId":"MLM","searchText":"Auriculares"}}'

# Paid: product detail for a real MLM item
python scripts/linkfox_mercado_product_selection.py '{"toolName":"itemInfo","arguments":{"siteId":"MLM","itemId":"MLM4979447466"}}'

# Free: my plan usage (no arguments)
python scripts/linkfox_mercado_product_selection.py '{"toolName":"myUsage","arguments":{}}'

# Paid: monthly hot keywords for Brazil, 2026-06
python scripts/linkfox_mercado_product_selection.py '{"toolName":"keywordMonthSearch","arguments":{"siteId":"MLB","runMonth":"202606"}}'

On PowerShell, wrap the JSON in single quotes the same way; if quoting is troublesome, write the payload to a file and pass it via --inline after loading, or use ConvertTo-Json to build the argument.

Display Rules

  1. Present the returned data clearly without inventing unsupported business conclusions.
  2. Preserve the meaning and important field names from results; translate labels only when it improves readability.
  3. For large arrays or time series, summarize the visible slice and read only needed fields from the persisted JSON file.
  4. For "no data" or business-level failure messages, explain that the upstream Mercado data provider returned that result; do not label it as a system outage unless the wrapper response contains an actual error.
  5. Never expose internal LinkFox API keys, upstream secrets, or full sensitive raw payloads in user-facing output.

Important Limitations

  • The LinkFox route is a unified backend gateway; the skill does not publish separate HTTP endpoints for each toolName.
  • Required-field validation happens in the backend and is also documented in references/mercado-tool-reference.md.
  • Paid tools charge per backend invocation, even if the upstream business result is empty.
  • Response shapes vary by tool. Most tools return business results as text in data; use real responses and references/api.md as the source of truth instead of forcing a single table schema.

User Expression & Scenario Quick Reference

User says Likely action
"check this Mercado Libre product", "product details", "sales history" Use itemInfo or itemHistory
"search Mexico site earphones", "filter products" Use itemSearch; use categorySearch first if only category text is known
"official link", "catalog", "catalog link" Use a catalog* tool
"keyword hot searches", "monthly terms", "traffic keyword reverse lookup" Use keywordDateSearch, keywordMonthSearch, or keywordReverse
"category trends", "new product opportunities", "sales distribution", "brand ranking" Resolve categoryId, then use a trend* tool
"store", "seller" Use sellerSearch
"reviews", "reviews" Use reviewSearch
"exchange rate", "package usage" Use rateInfo or myUsage

Compute consumption rules

Consumes 12 compute.

Users pay fees due to compute consumption. Please fully assess: when this skill needs to be called frequently, or the user has insufficient expectations for compute consumption, be sure to remind the user and let the user decide whether to continue.

Feedback

Auto-detect and report feedback via the Feedback API when the skill behavior, documentation, or result presentation does not match the user's intent, when the user expresses praise or dissatisfaction, or when a concrete improvement is visible. Follow references/api.md; do not interrupt the user's task and do not report secrets, private data, or complete large responses.


For more high-quality, professional cross-border e-commerce skills, visit LinkFox Skills.