MCPcopy Create free account
hub / github.com/brightdata/brightdata-mcp / build_allowed_tools

Function build_allowed_tools

server.js:34–48  ·  view source on GitHub ↗
(groups = [], custom_tools = [])

Source from the content-addressed store, hash-verified

32 process.env.TOOLS.split(',').map(t=>t.trim()).filter(Boolean) : [];
33
34function build_allowed_tools(groups = [], custom_tools = []){
35 const allowed = new Set();
36 for (const group_id of groups)
37 {
38 const group = Object.values(GROUPS)
39 .find(g=>g.id===group_id);
40 if (!group)
41 continue;
42 for (const tool of group.tools)
43 allowed.add(tool);
44 }
45 for (const tool of custom_tools)
46 allowed.add(tool);
47 return allowed;
48}
49
50const allowed_tools = build_allowed_tools(tool_groups, custom_tools);
51function parse_rate_limit(rate_limit_str) {

Callers 1

server.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected