()
| 2003 | * note in a description only adds once `cg` is loaded; the schemas are static). |
| 2004 | */ |
| 2005 | export function getStaticTools(): ToolDefinition[] { |
| 2006 | const raw = process.env.CODEGRAPH_MCP_TOOLS; |
| 2007 | if (!raw || !raw.trim()) { |
| 2008 | return tools.filter(t => DEFAULT_MCP_TOOLS.has(t.name.replace(/^codegraph_/, ''))); |
| 2009 | } |
| 2010 | const allow = new Set(raw.split(',').map(s => s.trim().replace(/^codegraph_/, '')).filter(Boolean)); |
| 2011 | return allow.size ? tools.filter(t => allow.has(t.name.replace(/^codegraph_/, ''))) : tools; |
| 2012 | } |
| 2013 | |
| 2014 | /** |
| 2015 | * The MCP tools served by DEFAULT (short names). Pared to ONLY `codegraph_explore` |
no test coverage detected