Tool Permission Filter
Return requested tools that appear in the allowed list, preserving request order and removing duplicates.
Examples
EXAMPLE WALKTHROUGHfiltered
A guided view of the published example, not a trace of your code.
INPUT
[["read","write","read"],["read"]]TASKallowed_tools()
EXPECTED OUTPUT
["read"]Start with the input values shown in this example.
Example 1 of 2
Input: requested = ["read","write","read"], allowed = ["read"]
Output: ["read"]
Explanation: filtered
Input: requested = [], allowed = ["read"]
Output: []
Explanation: empty
Hint 1
Use an allowed set and a seen set.