Discovering Object Attributes by Prompting Large Language Models with Perception-Action APIs