cd /news/artificial-intelligence/ai-agents-tool-calling · home topics artificial-intelligence article
[ARTICLE · art-124013] src=dev.to ↗ pub= topic=artificial-intelligence verified=true sentiment=· neutral

AI Agents - Tool Calling

A developer explains how AI agents use tool calling to let large language models access external functions, such as fetching weather or stock data, by analyzing queries and suggesting appropriate tools with parameters. The post emphasizes the importance of clear tool descriptions for accurate semantic matching and provides an example docstring for an addition function.

by read1 min views14 publishedSep 9, 2026

When a user asks the LLM to perform an action, e.g., get the current weather or current stock market details, the LLM cannot get this information on its own. It needs some functionality or tools along with a description of when to call these tools/functionality.

The LLM analyzes the query to find out whether it is related to any of the tools and their descriptions.

If so, the LLM will suggest the tool along with the parameters to the agent/external logic. The external logic will perform the action and send the result back to the LLM.

The LLM reads the result and generates the structured output.

Suppose the tool call is not matched; the LLM will derive the answer from its own knowledge. If we give an ambiguous description, the LLM may not generate the output properly.

The description for the tool calls must be proper so that the LLM can semantically identify the tool and match the arguments.

example description

"""
Add up two integer numbers.

This function simply wraps the `+` operator, and does not
do anything interesting, except for illustrating what is
the docstring of a very simple function.

Parameters
----------
num1 : int
    First number to add
num2 : int
    Second number to add

Returns
-------
int
    The sum of `num1` and `num2`

See Also
--------
subtract : Subtract one integer from another

Examples
--------
>>> add(2, 2)
4
>>> add(25, 0)
25
>>> add(10, -10)
0
"""
── more in #artificial-intelligence 4 stories · sorted by recency
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
Live at https://your-agent.zahid.host
Get free account → Pricing
from €0/mo · no card required
LIVE [news/ai-agents-tool-calli…] indexed:0 read:1min 2026-09-09 ·