Skip to content

Commit 657c178

Browse files
committed
fix: properly handle allow-tools all
1 parent 0d6bf3e commit 657c178

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/app.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ const ALLOW_TOOLS_OPTIONS_TUPLE = [
5656
"Comma separated list of tool ids (or all)",
5757
(val: string) => {
5858
if (val.trim().toLowerCase() === "all") {
59-
return undefined;
59+
return [];
6060
}
6161
return val.split(",").map((tool) => tool.trim());
6262
},

src/toolFilters.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ const INTERNAL_DENIED_TOOLS = new Set(["customGet", "customPost", "customPut", "
1515

1616
export const getToolFilter = (opts: CliFilteringOptions): ToolFilter => {
1717
return {
18-
allowedTools: opts.allowTools ? new Set(opts.allowTools) : undefined,
19-
deniedTools: opts.denyTools ? new Set(opts.denyTools) : undefined,
18+
allowedTools: opts.allowTools?.length ? new Set(opts.allowTools) : undefined,
19+
deniedTools: opts.denyTools?.length ? new Set(opts.denyTools) : undefined,
2020
};
2121
};
2222

0 commit comments

Comments
 (0)