Skip to content

AI 201 · Module 3

Tool Discovery & Tool Calls

How an AI finds a tool, prepares arguments, calls it and turns the result into a grounded answer

Start Section 1
0 / 6 completed
Sync my progressJoin a session to keep progress across devices and share it with your instructor

Info

After you join, your completed lesson numbers are sent to your instructor together with your learner code, so they can see your progress. Use the codes your instructor gave you, and do not enter your name, company secrets or other personal data. Progress is kept with the rest of that session's data.

Learning objectives

  • Walk through the 10 steps from a user question to a human-verified answer
  • Explain tool discovery (tools/list) and tool invocation (tools/call) in plain words
  • Read a tool description and a tool call, and say which arguments were sent and why
  • Separate what you can observe (tool choice, arguments, result, provenance) from what you cannot

Discovering Tools

8 min

From Question to Verified Answer

Suppose a user asks: "Which faculty work on agentic AI?" Here is the whole journey in 10 steps. The rest of this module zooms in on each stage.

The tool-call flow
  1. User question
  2. Interpret intent
  3. Discover tools
  4. Select tool
  5. Prepare arguments
  6. Validate against the schema
  7. Execute the tool
  8. Return a structured result
  9. Generate a grounded response
  10. Human verification

Info

Notice the first and last steps belong to the human: Human defines intent → AI selects a capability → MCP invokes a trusted tool → Human verifies the result.

Key takeaway: A tool call is a chain of small steps, and a person opens and closes it.

10 min

Tool Discovery: tools/list

Before an AI can use a tool, it has to know the tool exists. The client asks the server "what tools do you have?" using a request named tools/list. The server answers with a description of each tool.

Illustrative excerpt of a tools/list result
{
  "tools": [
    {
      "name": "find_research_experts",
      "description": "Find people by research topic and role.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "topic": { "type": "string" },
          "role": { "type": "string", "enum": ["faculty", "student", "staff"] }
        },
        "required": ["topic"]
      }
    }
  ]
}
  • name: what the tool is called
  • description: what the tool is for, in words the AI can read
  • inputSchema: which inputs are allowed and which are required (here, topic is required)

Info

Real tool descriptions may look different. This excerpt is illustrative and shortened. The idea is what matters: the tool describes itself.
Check yourself

What is the purpose of tools/list?

What is the purpose of tools/list?

Key takeaway: tools/list is how a tool introduces itself: name, purpose and allowed inputs.

Calling a Tool

10 min

Selecting a Tool and Preparing Arguments

With the tool descriptions in hand, the AI matches the question to a capability and fills in the schema. For "Which faculty work on agentic AI?", the description of find_research_experts fits, and the boxes get these values.

From question to arguments (illustrative)
Part of the questionArgumentValue
"work on agentic AI"topicagentic AI
"Which faculty"rolefaculty

Warning

What you can observe is the tool that was selected and the arguments that were sent. A model's private reasoning is not something the interface can show, so do not treat an explanation as a window into its "thinking". Judge the visible choice and the visible arguments instead.
Check yourself

Which of these can a learner actually observe in a well-designed tool-call view?

Which of these can a learner actually observe in a well-designed tool-call view?

Key takeaway: Check the visible tool choice and the visible arguments, not an imagined thought process.

12 min

Tool Invocation: tools/call

To run the tool, the client sends a request named tools/call, with the tool name and the arguments. Before running anything, the server validates the arguments against the schema. If a required value is missing or a value is not allowed, the call is rejected instead of guessed.

Illustrative tools/call request for find_research_experts
{
  "method": "tools/call",
  "params": {
    "name": "find_research_experts",
    "arguments": {
      "topic": "agentic AI",
      "role": "faculty"
    }
  }
}
  1. Send
    The client sends the tool name and the arguments.
  2. Validate
    The server checks the arguments against the schema.
  3. Execute
    If valid, the server runs the tool against the authoritative data.
  4. Reject
    If invalid, the server returns an error the AI can act on, such as fixing the missing value.
Check yourself

The arguments sent do not match the schema (a required value is missing). What should happen?

The arguments sent do not match the schema (a required value is missing). What should happen?

Key takeaway: tools/call sends a name and arguments; the server validates first and rejects instead of guessing.

Result and Verification

10 min

A Structured Result with Provenance

The tool returns a structured result: fields the AI and the interface can read reliably. A good result also carries provenance, which says where the data came from and how fresh it is.

Illustrative result excerpt (fictional people, not real records)
{
  "results": [
    { "name": "Example Person A", "role": "faculty", "topics": ["agentic AI"] },
    { "name": "Example Person B", "role": "faculty", "topics": ["agentic AI", "learning analytics"] }
  ],
  "provenance": {
    "source": "AI4X research directory",
    "retrievedAt": "2026-01-15T09:00:00Z",
    "lastUpdated": "2026-01-10",
    "completeness": "partial"
  }
}
How to read provenance
FieldWhat it tells you
sourceWhich authoritative system the data came from
retrievedAtWhen the tool fetched it just now
lastUpdatedWhen the source record itself was last changed
completenessWhether the list is complete or only partial
Check yourself

A result says "completeness": "partial". How should the final answer treat it?

A result says "completeness": "partial". How should the final answer treat it?

Key takeaway: A result is only as useful as its provenance: source, freshness and completeness.

10 min

Grounded Answer and Human Verification

The AI now writes its answer from the tool result. A grounded answer keeps two things apart: facts that came from the tool, and the AI's own wording or summary around them.

Grounded answer

  • Names come from the tool result
  • Says where the data came from and how fresh it is
  • Notes when the result is partial or empty
  • Marks its own summary as a summary

Ungrounded answer

  • Adds names that are not in the result
  • Shows no source or date
  • Fills a gap with a confident guess
  • Blends facts and opinion together

Done

If the tool finds nothing or fails, the right answer is "no result found" with what you can do next. It is never a plausible-sounding replacement.

The last step is yours. Check the names against the source, look at the date, and decide whether the answer is good enough for what you will use it for.

Check yourself

The tool returns no matching experts. What is the best final answer?

The tool returns no matching experts. What is the best final answer?

Key takeaway: Ground the answer in the result, report gaps honestly, and let a human verify.

What next?