3.5 · Lesson

Create Your Tools

Each tool in my-tools/tools.md becomes a function like this one, below the comment YOUR TOOLS GO HERE in server/main.py.

annotations=The decorator registers the function as a tool. The function name is the tool's nameThe parameters come from the Parameters in the definitionThe docstring is the description from the definition. An agent reads it to decide when to use the toolThe query comes from the tool's definition in `tools.md`. `read()` runs it in read-only mode, and the values are passed as parameters, never built into the query textThe tool returns plain values, such as a list of dictionaries layout="side"

annotations=The decorator registers the function as a tool. The function name is the tool's nameThe parameters come from the Parameters in the definitionThe docstring is the description from the definition. An agent reads it to decide when to use the toolThe query comes from the tool's definition in `tools.md`. `read()` runs it in read-only mode, and the values are passed as parameters, never built into the query textThe tool returns plain values, such as a list of dictionaries layout="stack"