{"slug": "day-4-llm-tool-calling", "title": "Day 4 - LLM - Tool Calling", "summary": "A developer published a walkthrough of LLM tool calling, explaining that tools are functions a model can invoke to reach external APIs, databases, or knowledge bases, and that the model itself only selects which tool to call for a given query. The post demonstrates the approach in LangChain using the @tool decorator and a tool_map dictionary, with Groq as the inference provider for models such as llama3 and gpt-oss-120b, and notes MCP as the next level. It lists real-time data access, reduced hallucinations, and extended LLM capability as benefits, against token cost, latency, and security risks as drawbacks.", "body_md": "# \n  \n  \n  Tool Calling\n\n- Asking some query to the LLM.\n- LLM is like a phone book , it can't call on its own. With some tools only it will.\n- Tools are nothing but FUNCTIONS.\n\n- Tool calling is also called as FUNCTION Calling.\n- Its a method , which models reliably connect and interact with external tools like API , database or knowledge base.\n- 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.\n\n- Next level of this is \" MCP \".\n\n## \n  \n  \n  Code\n\n- I am just Mocking the data.\n- In Langchain, tool is there . Tool is like the method.its like a rapper functionality.\n- If we write any method and mention \"[@tool](https://dev.to/tool) \" means --> its called**DECORATOR** . Its like tool and object.\n- tool_map is a dictionary.\n- ChatGroq --> if langchain is integrated with Groq.\n\n# \n  \n  \n  Notes\n\n- Functions are nothing but TOOLS.\n- llm will have many functions.\n- 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.\n\n## \n  \n  \n  Implementation\n\n## \n  \n  \n  Advantages\n\n- Real-time data access and information retrieval\n- Reducing Hallucinations \n- Extends capability of LLMs\n\n## \n  \n  \n  Disadvantages\n\n- Token consumption and Cost\n- Cost & Latency\n- Security & Safety Risks\n\n# \n  \n  \n  Questions", "url": "https://wpnews.pro/news/day-4-llm-tool-calling", "canonical_source": "https://dev.to/technonotes/day-4-llm-tool-calling-i9p", "published_at": "2026-09-26 19:22:00+00:00", "updated_at": "2026-09-26 19:31:03.463623+00:00", "lang": "en", "topics": ["large-language-models", "ai-agents", "ai-tools", "developer-tools"], "entities": ["LangChain", "Groq", "llama3", "gpt-oss-120b", "MCP"], "also_reported_by": [], "alternates": {"html": "https://wpnews.pro/news/day-4-llm-tool-calling", "markdown": "https://wpnews.pro/news/day-4-llm-tool-calling.md", "text": "https://wpnews.pro/news/day-4-llm-tool-calling.txt", "jsonld": "https://wpnews.pro/news/day-4-llm-tool-calling.jsonld"}}