Skip to content
Back to full roadmap
topicfoundation

Tool Fundamentals

Tool = name + description + JSON schema + executor function. Without these 4, no agent.

3 hours2 resources1 prereqs

Anatomy of an LLM tool:

  1. nameget_weather. Snake_case, short.
  2. description — "Returns current weather for the given city. Only for cities with known coordinates." The model decides when to call based on this text. Quality is critical.
  3. input_schema — JSON Schema. Parameter types, descriptions, required/optional.
  4. execute(args) — the actual function. API call, DB query, computation.

Anthropic format:

{
  "name": "get_weather",
  "description": "Get current weather for a city.",
  "input_schema": {
    "type": "object",
    "properties": {
      "city": {"type": "string", "description": "City name"}
    },
    "required": ["city"]
  }
}

The LLM sees this schema, returns {"name":"get_weather","input":{"city":"Istanbul"}}, you execute, and feed the result back as tool_result.

What you'll gain

You can define a tool from scratch and optimize its description so the model calls it at the right time.

Prerequisites

Resources(2)