Claude · Module 07 of 8

Advanced

Choose what Claude sees, and design tools it can pick and use correctly.

2 lessons8 techniques

Context engineering

Choose what goes in front of Claude, put it in the right order, trim what doesn't change the answer, and carry state across sessions with a file.

4 techniques →

Tool use

Write clear tool descriptions, keep the tool list short, report errors Claude can act on, and get JSON that matches a schema.

4 techniques →
Check yourself

How well do you manage context and tools in Claude?

Six questions for people building on Claude, on what to include, how to design tools and how to get reliable output. You get instant answers, and no sign-up is needed.

Take the quiz
Advanced Claude

Who this is for

These lessons are mostly for people building on the API or running long Claude Code sessions, though the context lesson also applies in chat. They cover the two things you control once your prompts are already good: what's in front of Claude when it answers, and what it can do.

Why they belong together

Tool definitions and tool results count as context, so the two topics overlap. A long tool list uses up tokens before any work starts, and a tool that returns a full database record fills the context with fields no step needs. If an agent is getting worse as you add to it, look at both before changing the prompt.

Frequently asked
What is context engineering?

It's the practice of choosing what's in front of a model when it answers, including instructions, documents, history, tools and tool results. Anthropic describes the goal as the smallest possible set of high-signal tokens that makes the result you want most likely.

What is tool use in Claude?

Tool use lets Claude call functions you define. Claude returns a request with a tool name and inputs, your code runs it, and you send back the result. Anthropic also offers server tools, such as web search, that run on its side.

Do I need the API to use these techniques?

Not all of them. Choosing what to paste, and where to put it, works in chat. Tool design and structured outputs apply on the API, and when you build MCP servers. Claude Code handles many context decisions for you, but still benefits from a short CLAUDE.md.

How big is Claude's context window?

Anthropic's docs say current models have a 1M-token context window on the API. In chat on paid plans, the help center says most current models offer 1M tokens, some 500K and older ones 200K. Anthropic also warns that more context isn't automatically better.