/** * MCP tool definitions for marketplace scrapers */ export const tools = [ { name: "search_kijiji", description: "Search Kijiji marketplace for listings matching a query", inputSchema: { type: "object", properties: { query: { type: "string", description: "Search query for Kijiji listings. " + "Kijiji requires ALL words to appear in the listing title — keep queries short and use terms sellers actually write. " + "Avoid marketing/brand phrases sellers don't use (e.g. use 'macbook air m1' not 'macbook air m1 apple silicon'). " + "If the search returns no results, try a shorter or more common query.", }, location: { type: "string", description: "Location name or ID (e.g., 'toronto', 'gta', 'ontario')", }, category: { type: "string", description: "Category name or ID (e.g., 'computers', 'furniture', 'bikes')", }, keywords: { type: "string", description: "Additional keywords to filter results", }, sortBy: { type: "string", description: "Sort results by field", enum: ["relevancy", "date", "price", "distance"], default: "relevancy", }, sortOrder: { type: "string", description: "Sort order", enum: ["asc", "desc"], default: "desc", }, maxPages: { type: "number", description: "Maximum pages to fetch (~40 items per page)", default: 5, }, priceMin: { type: "number", description: "Minimum price in dollars", }, priceMax: { type: "number", description: "Maximum price in dollars", }, unstableFilter: { type: "boolean", description: "optional: when enabled, listings priced more than 20% below the median are moved into an `unstableResults` bucket. Changes the response shape from a plain list to an object with `results` and `unstableResults`.", }, }, required: ["query"], }, }, { name: "search_facebook", description: "Search Facebook Marketplace for listings matching a query", inputSchema: { type: "object", properties: { query: { type: "string", description: "Search query for Facebook Marketplace listings", }, location: { type: "string", description: "Location for search (e.g., 'toronto')", default: "toronto", }, maxItems: { type: "number", description: "Maximum number of items to return", default: 5, }, unstableFilter: { type: "boolean", description: "optional: when enabled, listings priced more than 20% below the median are moved into an `unstableResults` bucket. Changes the response shape from a plain list to an object with `results` and `unstableResults`.", }, }, required: ["query"], }, }, { name: "search_ebay", description: "Search eBay for listings matching a query (default: Buy It Now only, Canada only)", inputSchema: { type: "object", properties: { query: { type: "string", description: "Search query for eBay listings", }, minPrice: { type: "number", description: "Minimum price in dollars", }, maxPrice: { type: "number", description: "Maximum price in dollars", }, strictMode: { type: "boolean", description: "Enable strict search mode", default: false, }, exclusions: { type: "array", items: { type: "string" }, description: "Terms to exclude from results", }, keywords: { type: "array", items: { type: "string" }, description: "Keywords to include in search", }, buyItNowOnly: { type: "boolean", description: "Include only Buy It Now listings (exclude auctions)", default: true, }, canadaOnly: { type: "boolean", description: "Include only Canadian sellers/listings", default: true, }, maxItems: { type: "number", description: "Maximum number of items to return", default: 5, }, unstableFilter: { type: "boolean", description: "optional: when enabled, listings priced more than 20% below the median are moved into an `unstableResults` bucket. Changes the response shape from a plain list to an object with `results` and `unstableResults`.", }, }, required: ["query"], }, }, ];