Reference

Glossary

44 exam-critical terms across 7 categories.

AllAPIAgenticPromptClaude CodeTool DesignMCPContext

Token

API

The unit an LLM reads and writes. ~4 characters or ¾ of a word in English. You pay per input + output token, and context limits are measured in tokens.

Context window

API

Max tokens the model considers per call. Claude models today have ~200K windows. Includes system prompt, history, tool results, and output room.

stop_reason

API

Field in Claude's response indicating why generation stopped. Values: end_turn (done), tool_use (wants a tool), max_tokens (hit output cap), stop_sequence (hit a stop string).

tool_use

API

A content block Claude returns when it wants to call a tool. Contains tool name, input args, and a unique tool_use_id you must reference in the tool_result.

tool_result

API

A content block you send back in the next user message containing the tool's output. Must reference the matching tool_use_id or the API rejects the call.

tool_choice

API

Controls tool calling. 'auto' = model decides (may return text). 'any' = must call a tool, model picks which. Forced name = must call that specific tool.

Agent

Agentic

An LLM in a loop that decides its own next step until it judges the task done. Three properties: autonomy, tool use, action loop.

Agentic loop

Agentic

Send messages → inspect stop_reason → if tool_use, execute + append tool_result → call again → if end_turn, done.

Subagent

Agentic

A delegated worker LLM with its own context window and tool set. Returns only a summary to the caller. Does NOT inherit the caller's conversation history — pass context explicitly.

Coordinator

Agentic

The top-level agent in a hub-and-spoke multi-agent system. Plans, dispatches subagents, synthesizes. All communication routes through it — subagents never talk to each other directly.

Task tool

Agentic

The Agent SDK primitive for spawning a subagent. Emit multiple Task calls in a single response to spawn subagents in parallel and reduce round-trip latency.

Orchestrator-workers

Agentic

Pattern where a coordinator plans at runtime and dispatches worker subagents. Different from a workflow — the plan is decided by the model, not pre-written.

Extended thinking

API

Built-in capability where Claude reasons in a dedicated internal channel before answering. Different from CoT prompting (a technique). Use for complex problems.

Chain of thought (CoT)

Prompt

Prompt technique asking the model to reason step by step (often in <thinking> tags) before producing the answer. Improves accuracy on reasoning tasks; costs tokens.

CLAUDE.md

Claude Code

Instructions file Claude Code reads every turn. Three levels: user (~/.claude/CLAUDE.md, personal), project (./CLAUDE.md, shared via git), directory (path-specific).

.claudeignore

Claude Code

.gitignore-syntax file that excludes paths from Claude Code's reads. Controls reading, not writing. For blocking writes, use hooks.

.claude/rules/

Claude Code

Path-specific rules with YAML glob frontmatter that apply across an entire codebase — unlike directory-level CLAUDE.md which is location-bound.

Plan mode

Claude Code

Mode where Claude proposes a plan before executing destructive changes. Use for multi-file migrations, architecture decisions, or anything you want to inspect first.

Slash command

Claude Code

User-triggered prompt template in .claude/commands/. File name becomes /name. For repeatable workflows like /pr-review, /release.

Skill

Claude Code

Folder with SKILL.md describing when to trigger and what to do. The 'description' frontmatter field is Claude's routing signal. May include supporting files.

context: fork

Claude Code

Skill option that runs the skill in an isolated subagent context, keeping verbose output out of the main conversation window. Preserves parent context.

Hook

Claude Code

External script fired on lifecycle events (PreToolUse, PostToolUse, Stop). Exit 0 allows; exit 2 blocks and surfaces stderr to Claude as feedback. Deterministic gate.

-p (non-interactive)

Claude Code

CLI flag: claude -p 'prompt' runs a single non-interactive turn and exits. Mandatory for CI/CD pipelines — without it the job hangs waiting for input.

Claude Code SDK

Claude Code

Programmatic API to drive Claude Code sessions from your own code. For building higher-level tools, dashboards, or batch automations on top.

Tool description

Tool Design

The #1 lever for tool selection. Should specify: what it does, expected inputs, example queries handled, and explicit boundaries vs similar tools.

input_schema

Tool Design

JSON Schema defining a tool's parameters. Use enums to constrain choices; describe every field; mark required fields explicitly.

MCP

MCP

Model Context Protocol. Standard protocol connecting AI applications to external systems. Think 'USB-C for AI.' JSON-RPC based.

Host / client / server

MCP

Host = the AI app the user opens (Claude Desktop). Client = connector inside the host that speaks MCP. Server = external process exposing tools/resources/prompts.

stdio transport

MCP

Transport for local MCP servers running as subprocesses. Communication via stdin/stdout as JSON-RPC. Easy to ship, no network.

Streamable HTTP

MCP

Current preferred transport for remote MCP servers per the 2025-06-18 spec. SSE is being deprecated for new deployments.

Idempotency key

Tool Design

Parameter on mutating tools that lets the agent safely retry after a timeout without doubling side effects. Standard for anything that changes state.

Few-shot

Prompt

Prompt pattern: include 2-5 input/output examples in <example> tags. Beats detailed instructions for classification, format, and edge cases.

XML tags

Prompt

Structural delimiters Claude is trained to recognize: <instructions>, <example>, <document>, <output_format>. Partition long prompts unambiguously.

Structured output

Prompt

Reliable way to get JSON: define a tool whose input_schema matches your desired JSON, then use tool_choice to force it. Schema is server-enforced.

Nullable field

Prompt

Schema pattern: fields that may not exist in source documents should be nullable, so Claude doesn't fabricate to fill a required field.

Prompt caching

Prompt

Mark stable prompt prefixes with cache_control: ephemeral. Subsequent calls within TTL reuse cached compute at reduced cost and latency. Dynamic content must go AFTER the cached prefix.

Batch API

API

Async, high-volume, cheaper per-token API. For latency-tolerant workloads (overnight reports, bulk extraction). NOT for blocking pre-merge checks where latency matters.

Lost in the middle

Context

Documented failure mode: content near the middle of a long context gets less attention than content near the start or end. Put critical facts at the top or bottom.

Hybrid retrieval

Context

Combine vector search (semantics) with BM25/keyword (exact terms) and rerank with a cross-encoder. Standard production RAG pattern; beats either method alone.

Case facts block

Context

Persistent verbatim block containing transactional data (amounts, dates, IDs) that must NEVER be summarized. Included in every prompt to prevent progressive summarization from corrupting details.

Model routing

Context

Cost pattern: cheap fast model (haiku) triages, strong model (opus/sonnet) does actual reasoning. Typical outcome: 70-80% of turns handled by cheap model.

Independent review

Prompt

Fresh Claude instance with a reviewer prompt reviews another instance's output. More effective than self-review because it doesn't share the generator's assumptions.

Escalation trigger

Context

Three valid triggers: explicit customer request, policy gap (no rule covers the case), inability to make meaningful progress. NOT sentiment or self-reported confidence.

Progressive summarization

Context

Compaction strategy that summarizes older turns. DANGEROUS for transactional data — amounts, IDs, and dates get paraphrased into vague summaries. Use case facts block instead.