Intelligent tool selection for agents: match task descriptions to optimal tools, rank by capability fit, detect tool con