Dynamic tool discovery lets an MCP client ask a server which tools it provides and receive standardized definitions before connecting those tools to an LLM. The server owns the definitions and later handles execution, while the client manages communication and provider-specific adaptation. section 3.4.1
A practical discovery flow follows these steps:
- Initialize an MCP ClientSession over a transport such as stdio. section 3.4.3
- Call list_tools() and inspect each returned name, description, and inputSchema. section 3.4.1
- Convert MCP definitions into the LLM provider’s outer tool format; inputSchema supplies the provider’s parameters field. section 3.4.3
- Give the converted definitions to the LLM, then route any selected tool call back through the MCP server. section 3.4.1 section 3.4.3
Discovering Tavily tools
A Python client launches tavily-mcp@latest through stdio, initializes the session, calls list_tools(), and prints tools such as tavily_search, tavily_extract, tavily_crawl, and tavily_map. The returned definitions can then be converted with mcp_tools_to_openai_format().
