Are you the author? Sign in to claim
Hands-on assignment: writing effective tools for AI agents (MCP weather tool for Claude Code)
A short, hands-on assignment based on Anthropic's Writing tools for AI agents.
You get one small weather tool (an MCP server) wired into Claude Code. The tool works, but it's deliberately written badly — a vague name, no description, a raw response. Your job is to improve it across 4 rounds and watch the AI agent go from ignoring the tool to using it perfectly — without ever changing what the tool actually does.
The big idea: the agent never sees your code. It only sees the tool's name, parameters, description, and return value. Those four things decide whether it gets called and used well.
SETUP.md — get the weather tool running in Claude Code (~5 min).QUESTION.md — the assignment: what to ask, the 4 rounds, and how to
check whether the agent called your tool.Weather data comes from Open-Meteo — free, global, no API key required.
Python ≥ 3.10, Claude Code, and either uv
(recommended) or pip. Full details in SETUP.md.
Run Claude Code as an MCP server so any agent can delegate coding tasks to it
Browser automation using accessibility snapshots instead of screenshots
Google's universal MCP server supporting PostgreSQL, MySQL, MongoDB, Redis, and 10+ databases
Official GitHub integration for repos, issues, PRs, and CI/CD workflows