resultSchema and a resultCollection identifying the array and its item IDs. This is a single-result operation, not streaming filtering.
Declare the collection
The following extends your existing provider tool definitions with a result contract:tools must include the actual list_products tool and its input schema. Match the result schema to the complete real provider response rather than removing fields to fit this example.
Apply the plan at the delivery boundary
This fragment belongs inside the existing tool handler:trustedContext comes from authenticated application state and must match the declared context schema.
For Python, use guard_tool_result(..., allow_result_export=True, apply=...) after declaring the same contract with tools(..., results=...). The default is no result export; this opt-in needs the owner’s approval and is not silently added by the setup prompt.
Read the decision and receipt
Each item has its own decision. The SDK validates result/item/plan fingerprints before applying it and reports Result delivered or Result filtered. Direct API callers must apply and report the exact index partition themselves.
Transient policy failures or malformed/mismatched plans fall back to the original items in the SDK. An older server missing the result endpoint also falls back; deterministic request or permission errors still surface. Test both normal filtering and the integration’s fallback path before relying on it.