Tinker Tool calling & MCP

by Kondasamy Jayaraman · drawn with Colorfigures by April Zhu

...

Nothing sent yet.

Chapter 2 of 7

Your first tool

In chapter 1 the assistant guessed an order’s status, because nothing joined the model to the order system. The team writes its first tool so the assistant can look orders up.

This chapter: How does a model know a tool exists, and when to use it?

You will learn

  • What a tool definition holds: a name, a description and a schema for its arguments
  • The loop: the model proposes a call, the host runs it, the result goes back, the model answers
  • Why the description decides whether the model picks the tool at all
Words you’ll meet (5)
Tool definition
What the model reads about a tool: its name, a description of when to use it, and a JSON Schema for its arguments.
JSON Schema
A standard way to describe the shape of data: which fields, of which type, in which range.
Host app
The software around the model: it sends the model the question and the tools, runs the calls the model asks for, and returns the results.
Tool call
A structured request from the model to run one tool with given arguments, such as get_order with order_id 1042.
Tool result
What the host sends back to the model after running a call: the data, or an error.

The picture on the left is live. Each step below asks you to do one thing in it; the story continues here as you go.

Step 1 of 6

The team gives the assistant its first tool, get_order. A tool is defined by a name, a description of when to use it, and a JSON Schema for its arguments. Open the definition they wrote.