Six lessons covered: the toolset.execute_action(Action.X, {args}) shape, dict and list response patterns, defensive .get reading, Python-side filtering, max_results and query parameters, and try/except on tool calls.
Week 2 introduces side effects — calls that modify external state. Cement the reading patterns first.
| Lesson | Concept | Key syntax |
|---|---|---|
| 1 | Calling a tool | toolset.execute_action(Action.X, {args}) returns a dict |
| 2 | List responses | result.get("messages", []) — safe-read pattern |
| 3 | Dict responses | individual fields with .get(key, default) |
| 4 | Filtering | for + if + append, or list comprehension |
| 5 | Tool arguments | max_results, query for GMAIL_FETCH_EMAILS |
| 6 | Tool errors | try / except Exception as e + type(e).__name__ |
Week 2 = sending. Same shape, but the API call now changes external state.
Six lessons covered: the toolset.execute_action(Action.X, {args}) shape, dict and list response patterns, defensive .get reading, Python-side filtering, max_results and query parameters, and try/except on tool calls.
Week 2 introduces side effects — calls that modify external state. Cement the reading patterns first.
| Lesson | Concept | Key syntax |
|---|---|---|
| 1 | Calling a tool | toolset.execute_action(Action.X, {args}) returns a dict |
| 2 | List responses | result.get("messages", []) — safe-read pattern |
| 3 | Dict responses | individual fields with .get(key, default) |
| 4 | Filtering | for + if + append, or list comprehension |
| 5 | Tool arguments | max_results, query for GMAIL_FETCH_EMAILS |
| 6 | Tool errors | try / except Exception as e + type(e).__name__ |
Week 2 = sending. Same shape, but the API call now changes external state.
Create a free account to get started. Paid plans unlock all tracks.