bbq_calculate_rest_time
Calculate recommended rest time and predict final temperature after carryover cooking for BBQ proteins. Input protein type and current temperature to get precise resting guidance.
Instructions
Calculate recommended rest time and expected carryover cooking.
Resting allows juices to redistribute and temperature to equalize. This tool provides rest time recommendations and predicts final temperature after carryover.
Args:
protein_type: Type of protein
current_temp: Current internal temperature when removed from heat
target_final_temp: Desired final temperature after resting (optional)
response_format: 'markdown' or 'json'
Examples:
"Brisket is at 200°F, how long to rest?" -> protein_type='beef_brisket', current_temp=200
"Pulled steak at 125°F for medium-rare" -> protein_type='beef_ribeye', current_temp=125, target_final_temp=130
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| protein_type | Yes | Type of protein | |
| current_temp | Yes | Current internal temperature when removed from heat | |
| target_final_temp | No | Desired final temperature after resting | |
| response_format | No | Output format | markdown |
Implementation Reference
- src/services/cooking.ts:394-447 (handler)Core handler function that calculates recommended rest time, expected carryover cooking, final temperature, and provides protein-specific resting instructions.export function calculateRestTime( proteinType: ProteinType, currentTemp: number, targetFinalTemp?: number ): { recommendedRestMinutes: number; expectedCarryover: number; expectedFinalTemp: number; instructions: string[]; } { const profile = getProteinProfile(proteinType); const expectedCarryover = profile.carryoverDegrees; const expectedFinalTemp = currentTemp + expectedCarryover; const recommendedRestMinutes = profile.restTimeMinutes; const instructions: string[] = []; if (!profile.requiresRest) { instructions.push(`${profile.displayName} doesn't require significant resting.`); instructions.push("Serve immediately for best results."); } else { instructions.push(`Rest for ${recommendedRestMinutes} minutes.`); instructions.push(`Temperature will rise approximately ${expectedCarryover}°F during rest.`); instructions.push(`Expected final temperature: ${expectedFinalTemp}°F`); // Specific resting advice based on protein type if (profile.category === "beef" && (proteinType === "beef_brisket" || proteinType === "beef_prime_rib")) { instructions.push("For large roasts, rest in a cooler (without ice) wrapped in towels for up to 4 hours."); } else if (profile.category === "poultry") { instructions.push("Rest uncovered or loosely tented to keep skin crispy."); } else { instructions.push("Rest loosely tented with foil to retain heat."); } if (targetFinalTemp && expectedFinalTemp < targetFinalTemp) { const shortfall = targetFinalTemp - expectedFinalTemp; instructions.push( `⚠️ Final temp may be ${shortfall}°F below target. Consider pulling a bit later next time.` ); } else if (targetFinalTemp && expectedFinalTemp > targetFinalTemp + 5) { instructions.push( `⚠️ Final temp may exceed target. Next time, pull earlier at ${targetFinalTemp - expectedCarryover}°F.` ); } } return { recommendedRestMinutes, expectedCarryover, expectedFinalTemp, instructions, }; }
- src/smithery.ts:235-253 (registration)MCP server tool registration including input schema, description, and thin async handler that delegates to calculateRestTime and formats Markdown output.server.tool( "bbq_calculate_rest_time", "Calculate rest time and carryover", { protein_type: z.string(), current_temp: z.number(), target_final_temp: z.number().optional(), }, async ({ protein_type, current_temp, target_final_temp }) => { try { const result = calculateRestTime(protein_type as ProteinType, current_temp, target_final_temp); const markdown = formatRestTimeMarkdown(result); return { content: [{ type: "text", text: markdown }] }; } catch (error) { const message = error instanceof Error ? error.message : "Unknown error"; return { content: [{ type: "text", text: `Error: ${message}` }], isError: true }; } } );
- src/smithery.ts:239-242 (schema)Zod schema defining input parameters: protein_type (string), current_temp (number), target_final_temp (optional number).protein_type: z.string(), current_temp: z.number(), target_final_temp: z.number().optional(), },
- src/services/formatting.ts:218-236 (helper)Helper function to format the rest time calculation results into a user-friendly Markdown response.export function formatRestTimeMarkdown(result: { recommendedRestMinutes: number; expectedCarryover: number; expectedFinalTemp: number; instructions: string[]; }): string { let output = `## 😴 Rest Time Guide\n\n`; output += `**Recommended Rest:** ${result.recommendedRestMinutes} minutes\n`; output += `**Expected Carryover:** +${result.expectedCarryover}°F\n`; output += `**Expected Final Temp:** ${result.expectedFinalTemp}°F\n\n`; output += `### Instructions\n\n`; for (const instruction of result.instructions) { output += `- ${instruction}\n`; } return output; }