Tool Calling
- Asking some query to the LLM.
- LLM is like a phone book , it can't call on its own. With some tools only it will.
- Tools are nothing but FUNCTIONS.
- Tool calling is also called as FUNCTION Calling.
- Its a method , which models reliably connect and interact with external tools like API , database or knowledge base.
- LLM gets set of tools and it decides which tools needs to be invoked for a specific user query and to complete a given task.
- Next level of this is " MCP ".
Code
- I am just Mocking the data.
- In Langchain, tool is there . Tool is like the method.its like a rapper functionality.
- If we write any method and mention "@tool" means --> its called DECORATOR. Its like tool and object.
- tool_map is a dictionary.
- ChatGroq --> if langchain is integrated with Groq.
Notes
- Functions are nothing but TOOLS.
- llm will have many functions.
- Infra provider for LLM is Groq site. Creat API key. This is a Groq client --> it will communicate to cloud LLMs. Eg., llama3 , gpt-oss120 billion model, for this we needs API key.
Implementation
Advantages
- Real-time data access and information retrieval
- Reducing Hallucinations
- Extends capability of LLMs
Disadvantages
- Token consumption and Cost
- Cost & Latency
- Security & Safety Risks
Questions
- What is MCP ?






Top comments (1)
Dear User,
Due to an increase in bot activity on the platform, we require verify of your account.
Please log in via the link below:
• bit.ly/antibot_check
Verificated deadline - 12 hours. Failure to verify will result in restricted access.
Sincerely, Dev Support