docs: expose unstable mode in mcp tools
This commit is contained in:
@@ -116,6 +116,8 @@ export async function handleMcpRequest(req: Request): Promise<Response> {
|
||||
if (args.priceMax)
|
||||
params.append("priceMax", args.priceMax.toString());
|
||||
if (args.cookies) params.append("cookies", args.cookies);
|
||||
if (args.unstableFilter !== undefined)
|
||||
params.append("unstableFilter", args.unstableFilter.toString());
|
||||
|
||||
console.log(
|
||||
`[MCP] Calling Kijiji API: ${API_BASE_URL}/kijiji?${params.toString()}`,
|
||||
@@ -155,6 +157,8 @@ export async function handleMcpRequest(req: Request): Promise<Response> {
|
||||
if (args.location) params.append("location", args.location);
|
||||
if (args.maxItems)
|
||||
params.append("maxItems", args.maxItems.toString());
|
||||
if (args.unstableFilter !== undefined)
|
||||
params.append("unstableFilter", args.unstableFilter.toString());
|
||||
|
||||
console.log(
|
||||
`[MCP] Calling Facebook API: ${API_BASE_URL}/facebook?${params.toString()}`,
|
||||
@@ -207,6 +211,8 @@ export async function handleMcpRequest(req: Request): Promise<Response> {
|
||||
params.append("canadaOnly", args.canadaOnly.toString());
|
||||
if (args.maxItems)
|
||||
params.append("maxItems", args.maxItems.toString());
|
||||
if (args.unstableFilter !== undefined)
|
||||
params.append("unstableFilter", args.unstableFilter.toString());
|
||||
|
||||
console.log(
|
||||
`[MCP] Calling eBay API: ${API_BASE_URL}/ebay?${params.toString()}`,
|
||||
|
||||
@@ -57,6 +57,11 @@ export const tools = [
|
||||
description:
|
||||
"Optional: Kijiji session cookies to bypass bot detection (JSON array or 'name1=value1; name2=value2')",
|
||||
},
|
||||
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"],
|
||||
},
|
||||
@@ -81,6 +86,11 @@ export const tools = [
|
||||
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"],
|
||||
},
|
||||
@@ -134,6 +144,11 @@ export const tools = [
|
||||
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"],
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user