able-leather-48732
09/15/2025, 5:00 PMtall-airline-16756
09/15/2025, 5:00 PMtall-airline-16756
09/15/2025, 5:01 PMtools property of the Agent class. This property gives you a list of tools defined within the agent class or those passed during initialization. Here's a simple example to get you started:
agent = MyAgent(...) # Your agent instance
function_tools = agent.tools # Returns list of FunctionTool | RawFunctionTool
What's even better is that you can update these tools dynamically using the update_tools() method. Let me show you how:
# To add a tool
await agent.update_tools(agent.tools + [tool_a])
# To remove a tool
await agent.update_tools([t for t in agent.tools if t != tool_a])
# To replace all tools
await agent.update_tools([tool_a, tool_b])
If your agent is connected with Model Context Protocol (MCP) servers, it’s great to know that tools from these servers are automatically fetched and combined with your agent’s native tools. You can also retrieve these tools using the list_tools() method of the MCPServer class.
If you’d like to dive deeper or need more examples, feel free to check out the LiveKit documentation. I’m here if you have any more questions or want to explore this further together!
Sources: livekit-agents/livekit/agents/llm/__init__.py | Tool definition and use | LiveKit Docsable-leather-48732
09/15/2025, 5:08 PMfunction_tools using the following code:
function_tools = agent.tools
then how can i log them using logger.debug or <http://logger.info|logger.info>, bcz if i simply use <http://logger.info|logger.info>(f"Assistant tools: {tools}") , it then only displays object address or code idk:
<bound method VoiceAssistant.get_customer_and_equipment_details_by_name of <__mp_main__.VoiceAssistant object at 0x7bce8dbff110>>tall-airline-16756
09/15/2025, 5:08 PMagent.tools? For instance, are they objects with certain attributes or methods that you'd like to log? If you can provide an example of the tool's structure or let me know which details you're interested in logging, I’ll be able to guide you more effectively.able-leather-48732
09/15/2025, 5:09 PMAssistant tools: [<bound method VoiceAssistant.get_customer_and_equipment_details_by_name of <__mp_main__.VoiceAssistant object at 0x7bce8dbff110>>]tall-airline-16756
09/15/2025, 5:09 PM