6 tools registered. Strongest in tool selection, weakest in shared experience.
search_products, get_product_details, track_order, get_delivery_estimate, get_bag_delivery_estimate// Make the tool's effect visible on the page the person is looking at:
// update the same UI your existing human flow uses when search_products runs,
// so the person co-browsing sees what the agent just did.
execute: async (args, { signal }) => {
const result = await performAction(args, signal);
renderResultInPage(result); // the human-visible half of the same action
return result;
}{
"name": "search_products",
"description": "Search this store's products by keyword, with optional sort, page and filters.",
"inputSchema": {
"type": "object",
"properties": {
"query": {
"type": "string",
"minLength": 3,
"description": "Search keywords, e.g. \"gold name necklace\""
},
"sort": {
"type": "string",
"enum": [
"featured",
"from-low-price-to-high",
"from-high-price-to-low"
],
"description": "Sort order. Defaults to \"featured\""
},
"page": {
"type": "integer",
"minimum": 1,
"description": "Page number, starting at 1. Defaults to 1"
},
"filters": {
"type": "object",
"additionalProperties": {
"type": "array",
"items": {
"type": "string"
}
},
"description": "Filters to apply, as { \"<filter name>\": [\"<value>\", ...] }. Use the names and values from the \"filters\" field of a previous result"
}
},
"required": [
"query"
]
},
"annotations": {
"readOnlyHint": true
}
}search_products, get_product_details, track_order, get_delivery_estimate, get_bag_delivery_estimate// Make the tool's effect visible on the page the person is looking at:
// update the same UI your existing human flow uses when search_products runs,
// so the person co-browsing sees what the agent just did.
execute: async (args, { signal }) => {
const result = await performAction(args, signal);
renderResultInPage(result); // the human-visible half of the same action
return result;
}get_bag_delivery_estimate: registered at 1630ms// Register tools as soon as they're ready, not behind a deferred/async chunk.
document.modelContext.registerTool({ /* ... */ });