docs: surface Kijiji AND-matching behavior in tool, API, and MCP responses
Kijiji zero-result queries (e.g. 'macbook air m1 apple silicon') are confusing because the failure mode is non-obvious. Surface the root cause everywhere the caller can see it: - MCP tool description warns about AND-matching and gives a concrete before/after example - API 404 body includes the actionable hint via emptySearchResponse(hint) - Core scraper logs the built URL and tip on page-1 zero results - MCP handler unwraps the API message field so the hint reaches the LLM
This commit is contained in:
@@ -893,7 +893,17 @@ export default async function fetchKijijiItems(
|
||||
|
||||
const searchResults = parseSearch(searchHtml, BASE_URL);
|
||||
if (searchResults.length === 0) {
|
||||
logger.log(`No more results found on page ${page}. Stopping pagination.`);
|
||||
if (page === 1) {
|
||||
logger.log(
|
||||
`No results found on page 1. The search URL was: ${searchUrl}\n` +
|
||||
`Tip: Kijiji matches ALL words in the query against listing titles. ` +
|
||||
`Try a shorter or more common query (e.g. "macbook air m1" instead of "macbook air m1 apple silicon").`,
|
||||
);
|
||||
} else {
|
||||
logger.log(
|
||||
`No more results found on page ${page}. Stopping pagination.`,
|
||||
);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user