search_products
Search your product catalog using natural language or keyword queries. Parameters:| Parameter | Type | Required | Description |
|---|---|---|---|
query | string | Yes | Search query (natural language or keywords) |
limit | integer | No | Max results (default: 10, max: 100) |
catalog_id | string | No | Filter to a specific catalog |
filters | object | No | Structured filters (see below) |
# Via MCP tool call (JSON-RPC)
curl -X POST "https://app.alana.shopping/api/mcp/sse" \
-H "Authorization: Bearer sk_live_your_api_key" \
-H "Content-Type: application/json" \
-d '{"method":"tools/call","params":{"name":"search_products","arguments":{"query":"cotton t-shirt","limit":5}}}'
const result = await client.callTool({
name: "search_products",
arguments: {
query: "cotton t-shirt",
limit: 5,
filters: { availability: "in_stock", min_price: 20 },
},
});
result = await session.call_tool(
"search_products",
arguments={
"query": "cotton t-shirt",
"limit": 5,
"filters": {"availability": "in_stock", "min_price": 20},
},
)
{
"products": [
{
"id": "SKU-001",
"title": "Blue Cotton T-Shirt",
"price": 29.99,
"availability": "in_stock",
"score": 0.94
}
],
"total": 47,
"query_time_ms": 23
}
get_product
Retrieve full details for a specific product by ID or SKU. Parameters:| Parameter | Type | Required | Description |
|---|---|---|---|
product_id | string | Yes | Product ID or SKU |
include_variants | boolean | No | Include variant details (default: false) |
const result = await client.callTool({
name: "get_product",
arguments: { product_id: "SKU-001", include_variants: true },
});
result = await session.call_tool(
"get_product",
arguments={"product_id": "SKU-001", "include_variants": True},
)
list_catalogs
List all catalogs available in your workspace. Parameters:| Parameter | Type | Required | Description |
|---|---|---|---|
include_stats | boolean | No | Include product counts (default: false) |
const result = await client.callTool({
name: "list_catalogs",
arguments: { include_stats: true },
});
result = await session.call_tool(
"list_catalogs",
arguments={"include_stats": True},
)
{
"catalogs": [
{ "id": "cat_abc", "name": "Main Catalog", "product_count": 1432 },
{ "id": "cat_def", "name": "Summer 2026", "product_count": 284 }
]
}
get_catalog_stats
Get statistics for a specific catalog. Parameters:| Parameter | Type | Required | Description |
|---|---|---|---|
catalog_id | string | Yes | Catalog ID |
const result = await client.callTool({
name: "get_catalog_stats",
arguments: { catalog_id: "cat_abc" },
});
result = await session.call_tool(
"get_catalog_stats",
arguments={"catalog_id": "cat_abc"},
)
{
"catalog_id": "cat_abc",
"product_count": 1432,
"in_stock": 1298,
"out_of_stock": 134,
"avg_optimization_score": 0.76,
"last_updated_at": "2026-03-17T10:00:00Z"
}