Skip to main content
Glama

bbq_estimate_cook_time

Calculate cooking time for BBQ proteins based on weight, cooking method, and optional factors like temperature and doneness level.

Instructions

Estimate total cooking time for a protein based on weight and cooking method.

Provides time estimates with confidence levels and accounts for factors like stalls.

Args:

  • protein_type: Type of protein

  • weight_pounds: Weight in pounds

  • cook_method: Cooking method to use

  • smoker_temp: Smoker/grill temperature in °F (optional)

  • target_doneness: Target doneness level (optional)

  • response_format: 'markdown' or 'json'

Examples:

  • "How long for a 10 lb pork butt?" -> protein_type='pork_butt', weight_pounds=10, cook_method='smoke_low_slow'

  • "Time for hot and fast brisket" -> protein_type='beef_brisket', cook_method='smoke_hot_fast'

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
protein_typeYesType of protein being cooked
weight_poundsYesWeight of the protein in pounds
cook_methodYesCooking method to use
smoker_tempNoSmoker/grill temperature in Fahrenheit. Defaults based on cook method.
target_donenessNoTarget doneness level
response_formatNoOutput formatmarkdown

Implementation Reference

  • Primary MCP handler function for bbq_estimate_cook_time tool. Processes parameters, calls core estimateCookTime helper, handles JSON/markdown output formatting, and error handling.
    async (params: EstimateCookTimeInput) => { try { const profile = getProteinProfile(params.protein_type); const estimate = estimateCookTime( params.protein_type, params.weight_pounds, params.cook_method, params.smoker_temp ); if (params.response_format === "json") { const output = { protein: { type: params.protein_type, displayName: profile.displayName, weightPounds: params.weight_pounds, }, method: { method: params.cook_method, displayName: COOK_METHOD_INFO[params.cook_method].displayName, tempRange: COOK_METHOD_INFO[params.cook_method].tempRange, actualTemp: params.smoker_temp, }, estimate: { totalMinutes: estimate.totalMinutes, hoursAndMinutes: estimate.hoursAndMinutes, estimatedDoneTime: estimate.estimatedDoneTime.toISOString(), confidence: estimate.confidence, }, rest: { required: profile.requiresRest, minutes: profile.restTimeMinutes, }, assumptions: estimate.assumptions, warnings: estimate.warnings, }; return { content: [{ type: "text", text: JSON.stringify(output, null, 2) }], structuredContent: output, }; } let markdown = `## ⏱️ Cook Time Estimate: ${profile.displayName}\n\n`; markdown += `**Weight:** ${params.weight_pounds} lbs\n`; markdown += `**Method:** ${COOK_METHOD_INFO[params.cook_method].displayName}\n`; if (params.smoker_temp) { markdown += `**Smoker Temp:** ${params.smoker_temp}°F\n`; } markdown += `\n### Estimate\n\n`; markdown += `**Total Time:** ${estimate.hoursAndMinutes}\n`; markdown += `**Confidence:** ${estimate.confidence}\n`; markdown += `**Done Around:** ${estimate.estimatedDoneTime.toLocaleTimeString()}\n\n`; if (profile.requiresRest) { markdown += `**+ Rest Time:** ${profile.restTimeMinutes} minutes\n\n`; } if (estimate.assumptions.length > 0) { markdown += `### Notes\n\n`; for (const note of estimate.assumptions) { markdown += `- ${note}\n`; } } if (estimate.warnings.length > 0) { markdown += `\n### ⚠️ Warnings\n\n`; for (const warning of estimate.warnings) { markdown += `- ${warning}\n`; } } return { content: [{ type: "text", text: markdown }], }; } catch (error) { const message = error instanceof Error ? error.message : "Unknown error occurred"; return { isError: true, content: [{ type: "text", text: `Error estimating cook time: ${message}` }], }; } }
  • Zod input schema for bbq_estimate_cook_time tool defining parameters like protein_type, weight_pounds, cook_method, etc.
    export const EstimateCookTimeSchema = z .object({ protein_type: ProteinTypeSchema.describe("Type of protein being cooked"), weight_pounds: z.number().positive().max(50).describe("Weight of the protein in pounds"), cook_method: CookMethodSchema.describe("Cooking method to use"), smoker_temp: z .number() .min(200) .max(500) .optional() .describe("Smoker/grill temperature in Fahrenheit. Defaults based on cook method."), target_doneness: DonenessLevelSchema.optional().describe("Target doneness level"), response_format: ResponseFormatSchema.describe("Output format"), }) .strict(); export type EstimateCookTimeInput = z.infer<typeof EstimateCookTimeSchema>;
  • Core helper function implementing the cook time estimation logic: base time per pound, temperature adjustments, stall buffers, confidence levels, assumptions, and warnings.
    export function estimateCookTime( proteinType: ProteinType, weightPounds: number, cookMethod: CookMethod, smokerTemp?: number ): CookTimeEstimate { const profile = getProteinProfile(proteinType); const methodInfo = COOK_METHOD_INFO[cookMethod]; // Get base time per pound for this method const baseTimePerPound = profile.estimatedTimePerPound[cookMethod]; if (baseTimePerPound === 0) { return { totalMinutes: 0, hoursAndMinutes: "Not recommended", estimatedDoneTime: new Date(), confidence: "low", assumptions: [], warnings: [`${methodInfo.displayName} is not recommended for ${profile.displayName}`], }; } // Adjust for smoker temperature (baseline is 225°F for low/slow, 300°F for hot/fast) let tempAdjustment = 1.0; const baseTemp = cookMethod.includes("hot_fast") ? HOT_FAST_TEMP : DEFAULT_SMOKER_TEMP; if (smokerTemp) { // Higher temp = faster cook (roughly 10% faster per 25°F) const tempDiff = smokerTemp - baseTemp; tempAdjustment = 1 - tempDiff / 250; tempAdjustment = Math.max(0.5, Math.min(1.5, tempAdjustment)); // Clamp between 0.5x and 1.5x } // Calculate base cook time let totalMinutes = baseTimePerPound * weightPounds * tempAdjustment; // Add time for stall if applicable const assumptions: string[] = []; const warnings: string[] = []; if (profile.stallRange) { totalMinutes += 60; // Add 1 hour buffer for stall assumptions.push("Includes ~1 hour buffer for the stall (150-175°F range)"); assumptions.push("Wrapping can reduce stall time by 30-50%"); } // Add rest time to total timeline if (profile.requiresRest && profile.restTimeMinutes > 0) { assumptions.push(`Add ${profile.restTimeMinutes} minutes rest time before serving`); } // Calculate done time const estimatedDoneTime = new Date(); estimatedDoneTime.setMinutes(estimatedDoneTime.getMinutes() + totalMinutes); // Determine confidence level let confidence: "high" | "medium" | "low" = "medium"; if (profile.stallRange) { confidence = "low"; // Stall-prone cooks are unpredictable warnings.push("Large cuts with stalls are unpredictable - plan for variability"); } else if (baseTimePerPound > 50) { confidence = "medium"; } else { confidence = "high"; } // Format hours and minutes const hours = Math.floor(totalMinutes / 60); const minutes = Math.round(totalMinutes % 60); const hoursAndMinutes = hours > 0 ? `${hours} hour${hours > 1 ? "s" : ""} ${minutes} minutes` : `${minutes} minutes`; return { totalMinutes: Math.round(totalMinutes), hoursAndMinutes, estimatedDoneTime, confidence, assumptions, warnings, }; }
  • src/index.ts:505-531 (registration)
    Tool registration call for bbq_estimate_cook_time including title, description, input schema reference, and annotations.
    server.registerTool( "bbq_estimate_cook_time", { title: "Estimate Cook Time", description: `Estimate total cooking time for a protein based on weight and cooking method. Provides time estimates with confidence levels and accounts for factors like stalls. Args: - protein_type: Type of protein - weight_pounds: Weight in pounds - cook_method: Cooking method to use - smoker_temp: Smoker/grill temperature in °F (optional) - target_doneness: Target doneness level (optional) - response_format: 'markdown' or 'json' Examples: - "How long for a 10 lb pork butt?" -> protein_type='pork_butt', weight_pounds=10, cook_method='smoke_low_slow' - "Time for hot and fast brisket" -> protein_type='beef_brisket', cook_method='smoke_hot_fast'`, inputSchema: EstimateCookTimeSchema, annotations: { readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false, }, },

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/jweingardt12/bbq-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server