66 questionsQuestion · Short answer
Tool Design & MCP Integration
For MCP 2025-06-18, the client sends initialize with its requested protocol version, capabilities and client information. The server returns its supported choice and capabilities. If the client cannot use the returned version, disconnect.…
Tool Design & MCP Integration
Treat a timed-out write as an unknown outcome if the destination may have received it. Check the destination using the recorded operation ID or idempotency key before retrying. Retry only within a defined budget and when the destination…
Tool Design & MCP Integration
For custom client tools, append Claude's assistant message, then send the results together in the immediately following user message. Return one tool_result for every client tool_use , even on failure, and set each tool_use_id to the ID…
Context Management & Reliability
Retry a plausibly temporary failure only within a finite attempt and elapsed-time budget. On the first-party Claude API, an overload ( 529 ) or retryable rate limit ( 429 ) can warrant backoff. Fix invalid input or request configuration…
Context Management & Reliability
Use compaction to summarize older conversation turns when the next decision can proceed from a concise state record. Preserve current policy and authorization constraints, decisions already made, open questions, and references to the…
Context Management & Reliability
Set a context budget below the documented limit of the selected Claude model. Count the prompt, history, tool definitions, and available tool results in the input estimate. Reserve room for the response, likely next tool results, and any…
Context Management & Reliability
Define a separate measurable threshold or rubric for each outcome that matters to the application. A production Claude system may need checks for task correctness, evidence grounding, response shape, policy compliance, tool selection and…
Context Management & Reliability
Define the application’s fallback and review gates before deployment. Use a safe partial answer, a request for missing information, or a bounded retry of a transient read when those options satisfy policy. Escalate when the evidence is…
Context Management & Reliability
Build a versioned suite of realistic cases with expected properties or a review rubric. Give routine requests and edge cases meaningful coverage, including missing evidence, conflicting input, tool errors, policy-sensitive requests, and…
Context Management & Reliability
Start by identifying the failed contract, such as incorrect task outcome, malformed output, weak grounding, wrong tool behavior, an authorization problem, excess latency or cost, or a confusing user experience. Capture a redacted trace…
Context Management & Reliability
Store data that must survive restarts, support audit, or be shared across workers in an application-controlled system. Keep the workflow ID, current stage, source versions, approved decisions, authorization and validation records, and…
Prompt Engineering & Structured Output
Check the Claude API completion state before parsing a structured response. An HTTP 200 can carry stop_reason: "refusal" , which can produce text outside the schema. stop_reason: "max_tokens" can leave an incomplete result. Route a…