detectCodeIndexingFromMcpServerName function

CodeIndexingTool? detectCodeIndexingFromMcpServerName(
  1. String serverName
)

Detects if an MCP server name corresponds to a code indexing tool.

Implementation

CodeIndexingTool? detectCodeIndexingFromMcpServerName(String serverName) {
  for (final entry in _mcpServerPatterns) {
    if (entry.pattern.hasMatch(serverName)) {
      return entry.tool;
    }
  }
  return null;
}