Skip to main content
Glama

RestaurantDoctorAI

Prime cost calculator

restaurantdoctor_prime_cost
Read-onlyIdempotent

Works out a restaurant's prime cost from the owner's own figures for one week or month, as the free prime cost calculator on restaurantdoctorai.com does: food and drink used plus labor, as a share of net sales, against the target for its type of restaurant, with what the points over or under are worth, food and labor each against their own range, and which to look at first. Takes net sales, food and drink purchases and wages, plus optional payroll taxes and benefits, stock counts and the owner's unpaid hours, in any currency; a figure that isn't sent is never counted as 0. Returns the calculator's result, how it was worked out, and a link that opens the calculator with the same figures filled in. The figures aren't stored; only an anonymous daily count of calculator runs is kept.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "format": "<format>",
      "period": "<period>"
    },
    "name": "restaurantdoctor_prime_cost"
  }
}

Input Schema

NameRequiredDescriptionDefault
salesNo
wagesNo
formatYesThe type of restaurant, which sets the targets: prime cost, and the ranges for food and drink and for labor: quick_service = Quick service (Counter or kiosk, fast turnover); fast_casual = Fast casual (Order at the counter, served at the table); full_service = Full service / casual dining (Servers, moderate check); fine_dining = Fine dining (Chef-driven, higher check); bar_lounge = Bar, taproom or lounge (Drinks are about half of sales or more); cafe = Café or coffee shop (Drinks lead, with pastries and light food).
periodYesWhether every figure covers one week or one month, the same dates for all of them. Sets how a year is worked out (52 weeks or 12 months).
ownerPayNo
purchasesNo
closingStockNo
openingStockNo
payrollCostsNo

Output Schema

NameRequiredDescriptionDefault
leftYes
linkYesOpens the calculator on the website with these figures filled in.
guideYes
notesYes
checksYesFigures that look like a slip, as the page flags them. They don't block the result.
formatYes
periodYes
pointsYesPoints over the target, or to spare under it; 0 right at it.
resultYesThe result in the page's words, in its order.
targetYesThe prime cost ceiling for this type of restaurant, % of net sales.
figuresYesIn the currency of the figures sent.
standingYesAgainst the target, on the share as shown.
freeCheckYes
workedOutYesHow it was worked out, with the figures in each step.
laborShareYes
overTargetYes
pointValueYesOne point of prime cost (1% of net sales), a period and a year, rounded as the page shows it.
primeCostPctYesFood and drink used plus labor, % of net sales, one decimal.
withOwnerPayYes
usedStockCountsYes
foodAndDrinkShareYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / format / description
      Previous value: -"The type of restaurant, which sets the targets: prime cost, and the ranges for food and drink and for labor: quick_service = Quick service (Counter or kiosk, fast turnover); fast_casual = Fast casual (Order at the counter, food brought to the table); full_service = Full service / casual dining (Servers, moderate check); fine_dining = Fine dining (Chef-driven, higher check); bar_lounge = Bar, taproom or lounge (Drinks are about half of sales or more); cafe = Café or coffee shop (Drinks lead, with pastries and light food)."New value: +"The type of restaurant, which sets the targets: prime cost, and the ranges for food and drink and for labor: quick_service = Quick service (Counter or kiosk, fast turnover); fast_casual = Fast casual (Order at the counter, served at the table); full_service = Full service / casual dining (Servers, moderate check); fine_dining = Fine dining (Chef-driven, higher check); bar_lounge = Bar, taproom or lounge (Drinks are about half of sales or more); cafe = Café or coffee shop (Drinks lead, with pastries and light food)."
  2. Changed3 schema fields changed
    • changedInput schema / properties / format / description
      Previous value: -"The type of restaurant, which sets the targets: prime cost, and the ranges for food and drink and for labor: quick_service = Quick service (Counter or kiosk, fast turnover); fast_casual = Fast casual (Order at the counter, food brought to the table); full_service = Full service / casual dining (Servers, moderate check); fine_dining = Fine dining (Chef-driven, higher check); bar_lounge = Bar, taproom or lounge (Drinks are about half of sales or more)."New value: +"The type of restaurant, which sets the targets: prime cost, and the ranges for food and drink and for labor: quick_service = Quick service (Counter or kiosk, fast turnover); fast_casual = Fast casual (Order at the counter, food brought to the table); full_service = Full service / casual dining (Servers, moderate check); fine_dining = Fine dining (Chef-driven, higher check); bar_lounge = Bar, taproom or lounge (Drinks are about half of sales or more); cafe = Café or coffee shop (Drinks lead, with pastries and light food)."
    • changedInput schema / properties / format / enum
      Previous value: -[
      -  "quick_service",
      -  "fast_casual",
      -  "full_service",
      -  "fine_dining",
      -  "bar_lounge"
      -]New value: +[
      +  "quick_service",
      +  "fast_casual",
      +  "full_service",
      +  "fine_dining",
      +  "bar_lounge",
      +  "cafe"
      +]
    • changedOutput schema / properties / format / enum
      Previous value: -[
      -  "quick_service",
      -  "fast_casual",
      -  "full_service",
      -  "fine_dining",
      -  "bar_lounge"
      -]New value: +[
      +  "quick_service",
      +  "fast_casual",
      +  "full_service",
      +  "fine_dining",
      +  "bar_lounge",
      +  "cafe"
      +]
  3. Changed35 schema fields changed
    • addedInput schema / properties / closingStock / anyOf
      Added value: +[
      +  {
      +    "description": "Optional: stock at cost at the end of the period, counted on the same items the invoices cover. Used only with openingStock.",
      +    "maximum": 1000000000,
      +    "minimum": 0,
      +    "type": "number"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • removedInput schema / properties / closingStock / description
      Removed value: -"Optional: stock at cost at the end of the period, counted on the same items the invoices cover. Used only with openingStock."
    • removedInput schema / properties / closingStock / maximum
      Removed value: -1000000000
    • removedInput schema / properties / closingStock / minimum
      Removed value: -0
    • removedInput schema / properties / closingStock / type
      Removed value: -"number"
    • addedInput schema / properties / openingStock / anyOf
      Added value: +[
      +  {
      +    "description": "Optional: stock at cost at the start of the period. Used only with closingStock: food and drink then becomes what was used, opening + purchases - closing.",
      +    "maximum": 1000000000,
      +    "minimum": 0,
      +    "type": "number"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • removedInput schema / properties / openingStock / description
      Removed value: -"Optional: stock at cost at the start of the period. Used only with closingStock: food and drink then becomes what was used, opening + purchases - closing."
    • removedInput schema / properties / openingStock / maximum
      Removed value: -1000000000
    • removedInput schema / properties / openingStock / minimum
      Removed value: -0
    • removedInput schema / properties / openingStock / type
      Removed value: -"number"
    • addedInput schema / properties / ownerPay / anyOf
      Added value: +[
      +  {
      +    "description": "Optional: when the owner works in the restaurant without a salary, what they'd pay someone to do their hours, plus the payroll taxes on it. It's a second figure; the main one stays as the books have it.",
      +    "maximum": 1000000000,
      +    "minimum": 0,
      +    "type": "number"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • removedInput schema / properties / ownerPay / description
      Removed value: -"Optional: when the owner works in the restaurant without a salary, what they'd pay someone to do their hours, plus the payroll taxes on it. It's a second figure; the main one stays as the books have it."
    • removedInput schema / properties / ownerPay / maximum
      Removed value: -1000000000
    • removedInput schema / properties / ownerPay / minimum
      Removed value: -0
    • removedInput schema / properties / ownerPay / type
      Removed value: -"number"
    • addedInput schema / properties / payrollCosts / anyOf
      Added value: +[
      +  {
      +    "description": "Optional: the employer's payroll taxes and benefits for the period, such as health insurance or a pension, when the wages figure leaves them out.",
      +    "maximum": 1000000000,
      +    "minimum": 0,
      +    "type": "number"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • removedInput schema / properties / payrollCosts / description
      Removed value: -"Optional: the employer's payroll taxes and benefits for the period, such as health insurance or a pension, when the wages figure leaves them out."
    • removedInput schema / properties / payrollCosts / maximum
      Removed value: -1000000000
    • removedInput schema / properties / payrollCosts / minimum
      Removed value: -0
    • removedInput schema / properties / payrollCosts / type
      Removed value: -"number"
    • addedInput schema / properties / purchases / anyOf
      Added value: +[
      +  {
      +    "description": "Food and drink supplier invoices for the same dates, added up by delivery date, minus credits. No packaging. Needed for a result; if missing, the reply asks for it.",
      +    "maximum": 1000000000,
      +    "minimum": 0,
      +    "type": "number"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • removedInput schema / properties / purchases / description
      Removed value: -"Food and drink supplier invoices for the same dates, added up by delivery date, minus credits. No packaging. Needed for a result; if missing, the reply asks for it."
    • removedInput schema / properties / purchases / maximum
      Removed value: -1000000000
    • removedInput schema / properties / purchases / minimum
      Removed value: -0
    • removedInput schema / properties / purchases / type
      Removed value: -"number"
    • addedInput schema / properties / sales / anyOf
      Added value: +[
      +  {
      +    "description": "Net sales for the period, in the owner's own currency like every figure here, from the POS sales summary: after discounts and comps, before tax and tips, with any service charge paid out to staff added back. Needed for a result, and more than 0; if missing, the reply asks for it.",
      +    "maximum": 1000000000,
      +    "minimum": 0,
      +    "type": "number"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • removedInput schema / properties / sales / description
      Removed value: -"Net sales for the period, in the owner's own currency like every figure here, from the POS sales summary: after discounts and comps, before tax and tips, with any service charge paid out to staff added back. Needed for a result, and more than 0; if missing, the reply asks for it."
    • removedInput schema / properties / sales / maximum
      Removed value: -1000000000
    • removedInput schema / properties / sales / minimum
      Removed value: -0
    • removedInput schema / properties / sales / type
      Removed value: -"number"
    • addedInput schema / properties / wages / anyOf
      Added value: +[
      +  {
      +    "description": "Every wage and salary for the same dates, from payroll, managers included (a salary counts as a 52nd of a year for a week, a 12th for a month). No tips, but a service charge paid to staff stays in. Needed for a result; if missing, the reply asks for it.",
      +    "maximum": 1000000000,
      +    "minimum": 0,
      +    "type": "number"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • removedInput schema / properties / wages / description
      Removed value: -"Every wage and salary for the same dates, from payroll, managers included (a salary counts as a 52nd of a year for a week, a 12th for a month). No tips, but a service charge paid to staff stays in. Needed for a result; if missing, the reply asks for it."
    • removedInput schema / properties / wages / maximum
      Removed value: -1000000000
    • removedInput schema / properties / wages / minimum
      Removed value: -0
    • removedInput schema / properties / wages / type
      Removed value: -"number"
  4. Changed3 schema fields changed
    • changedInput schema / properties / purchases / description
      Previous value: -"Food and drink supplier invoices for the same dates, added up by delivery date, minus credits. No packaging. Required."New value: +"Food and drink supplier invoices for the same dates, added up by delivery date, minus credits. No packaging. Needed for a result; if missing, the reply asks for it."
    • changedInput schema / properties / sales / description
      Previous value: -"Net sales for the period, in the owner's own currency like every figure here, from the POS sales summary: after discounts and comps, before tax and tips, with any service charge paid out to staff added back. Required, and more than 0."New value: +"Net sales for the period, in the owner's own currency like every figure here, from the POS sales summary: after discounts and comps, before tax and tips, with any service charge paid out to staff added back. Needed for a result, and more than 0; if missing, the reply asks for it."
    • changedInput schema / properties / wages / description
      Previous value: -"Every wage and salary for the same dates, from payroll, managers included (a salary counts as a 52nd of a year for a week, a 12th for a month). No tips, but a service charge paid to staff stays in. Required."New value: +"Every wage and salary for the same dates, from payroll, managers included (a salary counts as a 52nd of a year for a week, a 12th for a month). No tips, but a service charge paid to staff stays in. Needed for a result; if missing, the reply asks for it."
  5. Added

TDQS

A4.6/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Goes well beyond the readOnly/idempotent/closed-world annotations: it discloses that figures are not stored (only an anonymous daily run count), that a missing figure is never treated as 0, and that the reply includes the result, the derivation, and a prefilled link. These are behaviors an agent could not infer from the structured fields.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded with the outcome and followed by inputs, return shape, and privacy note in a logical order. It is a single dense block with some run-on accumulation of clauses, but nearly every sentence carries information an agent needs.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 9-parameter calculator with an output schema, this covers the gap: what it computes, required vs optional inputs, currency-agnostic handling, null semantics, no-storage behavior, and the prefilled link. Nothing material for correct invocation is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

With schema coverage at 22%, the description must compensate, and it does: it names net sales, purchases, wages, optional payroll taxes/benefits, opening and closing stock, and unpaid owner hours, and clarifies they are 'in any currency' and that unsent values are never coerced to 0. It summarizes rather than fully specifying per-parameter interplay (e.g. the opening+closing pairing is only in the schema), keeping it just below a 5.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Opens with a specific verb and resource — 'works out a restaurant's prime cost' — and immediately scopes it to one week or month against type-of-restaurant targets. This is clearly distinguishable from narrower siblings like labor_cost, plate_cost and cost_recipe, which cover only a slice of what this computes.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Establishes clear context: a full prime-cost computation for a single week or month, using the owner's own figures, mirroring the free web calculator. It doesn't explicitly say when to prefer it over siblings such as restaurantdoctor_labor_cost or restaurantdoctor_break_even, so no exclusions are stated, but the intended use is unambiguous.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.