Skip to main content
Glama

BusCalc — Business & Trade Calculations

Recipe portion cost

buscalc_recipe_portion_cost
Read-onlyIdempotent

Find the ingredient cost of a batch and each sellable portion from package prices and quantities used. Use this tested BusCalc worksheet when the task matches its inputs and scope. Returns named results, units, formula, assumptions, method version and a source-page URL. No prices or omitted costs are looked up; no private projects or purchases are accessed. Put tool fields inside inputs. Supply units or modelVersion only when listed in inputSchema. Follow its required fields and exact choices. Do not pass the REST calculator field inside MCP arguments.

Example tool call

This call uses example arguments supplied in the tool’s input schema.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "inputs": {
        "portions": 10,
        "batchCost": 30,
        "recipeEntry": "total"
      }
    },
    "name": "buscalc_recipe_portion_cost"
  }
}

Input Schema

NameRequiredDescriptionDefault
unitsNo
inputsYes
modelVersionNoOptional expected method version; a mismatch is rejected.

Output Schema

NameRequiredDescriptionDefault
unitsNo
inputsYes
receiptYes
resultsYes
sourceURLYes
calculatorYes
modelVersionYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed30 schema fields changed
    • addedInput schema / properties / inputs / properties / batchCost / anyOf
      Added value: +[
      +  {
      +    "maximum": 1000000000000,
      +    "minimum": 0,
      +    "type": "number"
      +  },
      +  {
      +    "pattern": "^\\s*(?:[+-]?(?:\\d+(?:\\.\\d*)?|\\.\\d+)(?:[eE][+-]?\\d+)?|0[xX][\\da-fA-F]+|0[bB][01]+|0[oO][0-7]+)\\s*$",
      +    "type": "string"
      +  }
      +]
    • changedInput schema / properties / inputs / properties / batchCost / description
      Previous value: -"Known ingredient cost for this complete batch. Invoices, recipe quantity and measured batch yield. Owner records or explicit assumption; no account connection or maintained rate tables required."New value: +"Known ingredient cost for this complete batch. Invoices, recipe quantity and measured batch yield. Owner records or explicit assumption; no account connection or maintained rate tables required. JSON numbers are preferred. Nonblank strings are also accepted when JavaScript Number conversion yields a finite value meeting the same bounds and whole-number rules."
    • removedInput schema / properties / inputs / properties / batchCost / maximum
      Removed value: -1000000000000
    • removedInput schema / properties / inputs / properties / batchCost / minimum
      Removed value: -0
    • removedInput schema / properties / inputs / properties / batchCost / type
      Removed value: -"number"
    • addedInput schema / properties / inputs / properties / batchCost / x-buscalc-numeric-string
      Added value: +true
    • addedInput schema / properties / inputs / properties / ingredients / items / properties / packCost / anyOf
      Added value: +[
      +  {
      +    "maximum": 1000000000000,
      +    "minimum": 0,
      +    "type": "number"
      +  },
      +  {
      +    "pattern": "^\\s*(?:[+-]?(?:\\d+(?:\\.\\d*)?|\\.\\d+)(?:[eE][+-]?\\d+)?|0[xX][\\da-fA-F]+|0[bB][01]+|0[oO][0-7]+)\\s*$",
      +    "type": "string"
      +  }
      +]
    • changedInput schema / properties / inputs / properties / ingredients / items / properties / packCost / description
      Previous value: -"Price paid for package. Invoices, recipe quantity and measured batch yield. Owner records or explicit assumption; no account connection or maintained rate tables required."New value: +"Price paid for package. Invoices, recipe quantity and measured batch yield. Owner records or explicit assumption; no account connection or maintained rate tables required. JSON numbers are preferred. Nonblank strings are also accepted when JavaScript Number conversion yields a finite value meeting the same bounds and whole-number rules."
    • removedInput schema / properties / inputs / properties / ingredients / items / properties / packCost / maximum
      Removed value: -1000000000000
    • removedInput schema / properties / inputs / properties / ingredients / items / properties / packCost / minimum
      Removed value: -0
    • removedInput schema / properties / inputs / properties / ingredients / items / properties / packCost / type
      Removed value: -"number"
    • addedInput schema / properties / inputs / properties / ingredients / items / properties / packCost / x-buscalc-numeric-string
      Added value: +true
    • addedInput schema / properties / inputs / properties / ingredients / items / properties / packQty / anyOf
      Added value: +[
      +  {
      +    "exclusiveMinimum": 0,
      +    "maximum": 1000000000000,
      +    "type": "number"
      +  },
      +  {
      +    "pattern": "^\\s*(?:[+-]?(?:\\d+(?:\\.\\d*)?|\\.\\d+)(?:[eE][+-]?\\d+)?|0[xX][\\da-fA-F]+|0[bB][01]+|0[oO][0-7]+)\\s*$",
      +    "type": "string"
      +  }
      +]
    • changedInput schema / properties / inputs / properties / ingredients / items / properties / packQty / description
      Previous value: -"Quantity in package. Invoices, recipe quantity and measured batch yield. Owner records or explicit assumption; no account connection or maintained rate tables required."New value: +"Quantity in package. Invoices, recipe quantity and measured batch yield. Owner records or explicit assumption; no account connection or maintained rate tables required. JSON numbers are preferred. Nonblank strings are also accepted when JavaScript Number conversion yields a finite value meeting the same bounds and whole-number rules."
    • removedInput schema / properties / inputs / properties / ingredients / items / properties / packQty / exclusiveMinimum
      Removed value: -0
    • removedInput schema / properties / inputs / properties / ingredients / items / properties / packQty / maximum
      Removed value: -1000000000000
    • removedInput schema / properties / inputs / properties / ingredients / items / properties / packQty / type
      Removed value: -"number"
    • addedInput schema / properties / inputs / properties / ingredients / items / properties / packQty / x-buscalc-numeric-string
      Added value: +true
    • addedInput schema / properties / inputs / properties / ingredients / items / properties / usedQty / anyOf
      Added value: +[
      +  {
      +    "maximum": 1000000000000,
      +    "minimum": 0,
      +    "type": "number"
      +  },
      +  {
      +    "pattern": "^\\s*(?:[+-]?(?:\\d+(?:\\.\\d*)?|\\.\\d+)(?:[eE][+-]?\\d+)?|0[xX][\\da-fA-F]+|0[bB][01]+|0[oO][0-7]+)\\s*$",
      +    "type": "string"
      +  }
      +]
    • changedInput schema / properties / inputs / properties / ingredients / items / properties / usedQty / description
      Previous value: -"Quantity taken for this batch. Invoices, recipe quantity and measured batch yield. Owner records or explicit assumption; no account connection or maintained rate tables required."New value: +"Quantity taken for this batch. Invoices, recipe quantity and measured batch yield. Owner records or explicit assumption; no account connection or maintained rate tables required. JSON numbers are preferred. Nonblank strings are also accepted when JavaScript Number conversion yields a finite value meeting the same bounds and whole-number rules."
    • removedInput schema / properties / inputs / properties / ingredients / items / properties / usedQty / maximum
      Removed value: -1000000000000
    • removedInput schema / properties / inputs / properties / ingredients / items / properties / usedQty / minimum
      Removed value: -0
    • removedInput schema / properties / inputs / properties / ingredients / items / properties / usedQty / type
      Removed value: -"number"
    • addedInput schema / properties / inputs / properties / ingredients / items / properties / usedQty / x-buscalc-numeric-string
      Added value: +true
    • addedInput schema / properties / inputs / properties / portions / anyOf
      Added value: +[
      +  {
      +    "maximum": 1000000,
      +    "minimum": 1,
      +    "type": "integer"
      +  },
      +  {
      +    "pattern": "^\\s*(?:[+-]?(?:\\d+(?:\\.\\d*)?|\\.\\d+)(?:[eE][+-]?\\d+)?|0[xX][\\da-fA-F]+|0[bB][01]+|0[oO][0-7]+)\\s*$",
      +    "type": "string"
      +  }
      +]
    • changedInput schema / properties / inputs / properties / portions / description
      Previous value: -"Sellable portions from batch. Invoices, recipe quantity and measured batch yield. Owner records or explicit assumption; no account connection or maintained rate tables required."New value: +"Sellable portions from batch. Invoices, recipe quantity and measured batch yield. Owner records or explicit assumption; no account connection or maintained rate tables required. JSON numbers are preferred. Nonblank strings are also accepted when JavaScript Number conversion yields a finite value meeting the same bounds and whole-number rules."
    • removedInput schema / properties / inputs / properties / portions / maximum
      Removed value: -1000000
    • removedInput schema / properties / inputs / properties / portions / minimum
      Removed value: -1
    • removedInput schema / properties / inputs / properties / portions / type
      Removed value: -"integer"
    • addedInput schema / properties / inputs / properties / portions / x-buscalc-numeric-string
      Added value: +true
  2. Changed1 schema field changed
    • addedInput schema / examples
      Added value: +[
      +  {
      +    "inputs": {
      +      "batchCost": 30,
      +      "portions": 10,
      +      "recipeEntry": "total"
      +    }
      +  }
      +]
  3. Changed1 schema field changed
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "properties": {
      +    "calculator": {
      +      "type": "string"
      +    },
      +    "inputs": {
      +      "type": "object"
      +    },
      +    "modelVersion": {
      +      "type": "string"
      +    },
      +    "receipt": {
      +      "properties": {
      +        "additionalResults": {
      +          "type": "object"
      +        },
      +        "assumptions": {
      +          "type": "string"
      +        },
      +        "calculator": {
      +          "type": "string"
      +        },
      +        "checks": {
      +          "items": {
      +            "properties": {
      +              "name": {
      +                "type": "string"
      +              },
      +              "status": {
      +                "enum": [
      +                  "passed"
      +                ],
      +                "type": "string"
      +              }
      +            },
      +            "required": [
      +              "name",
      +              "status"
      +            ],
      +            "type": "object"
      +          },
      +          "type": "array"
      +        },
      +        "formula": {
      +          "type": "string"
      +        },
      +        "inputs": {
      +          "type": "object"
      +        },
      +        "integrity": {
      +          "type": "string"
      +        },
      +        "methodVersion": {
      +          "type": "string"
      +        },
      +        "replay": {
      +          "type": "string"
      +        },
      +        "replayRequest": {
      +          "type": "object"
      +        },
      +        "results": {
      +          "items": {
      +            "type": "object"
      +          },
      +          "type": "array"
      +        },
      +        "schemaVersion": {
      +          "enum": [
      +            "1.0.0"
      +          ],
      +          "type": "string"
      +        },
      +        "scope": {
      +          "type": "string"
      +        },
      +        "sourceURL": {
      +          "format": "uri",
      +          "type": "string"
      +        },
      +        "status": {
      +          "enum": [
      +            "calculated"
      +          ],
      +          "type": "string"
      +        },
      +        "tool": {
      +          "type": "string"
      +        },
      +        "units": {
      +          "type": "object"
      +        },
      +        "warnings": {
      +          "items": {
      +            "type": "string"
      +          },
      +          "type": "array"
      +        }
      +      },
      +      "required": [
      +        "schemaVersion",
      +        "status",
      +        "tool",
      +        "calculator",
      +        "methodVersion",
      +        "sourceURL",
      +        "formula",
      +        "assumptions",
      +        "inputs",
      +        "units",
      +        "results",
      +        "replayRequest",
      +        "additionalResults",
      +        "checks",
      +        "warnings",
      +        "scope",
      +        "integrity",
      +        "replay"
      +      ],
      +      "type": "object"
      +    },
      +    "results": {
      +      "items": {
      +        "properties": {
      +          "label": {
      +            "type": "string"
      +          },
      +          "unit": {
      +            "type": "string"
      +          },
      +          "value": {
      +            "oneOf": [
      +              {
      +                "type": "number"
      +              },
      +              {
      +                "type": "string"
      +              }
      +            ]
      +          }
      +        },
      +        "required": [
      +          "label",
      +          "value"
      +        ],
      +        "type": "object"
      +      },
      +      "type": "array"
      +    },
      +    "sourceURL": {
      +      "format": "uri",
      +      "type": "string"
      +    },
      +    "units": {
      +      "type": "object"
      +    }
      +  },
      +  "required": [
      +    "calculator",
      +    "modelVersion",
      +    "sourceURL",
      +    "inputs",
      +    "results",
      +    "receipt"
      +  ],
      +  "type": "object"
      +}
  4. First observed

TDQS

B3.3/5.0
Behavior3/5

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

Annotations already declare readOnly, idempotent, non-destructive, closed-world behavior, so the description only needs to add context. It does add some — no price lookups, no access to private projects or purchases, and a note not to pass a REST calculator field — but it spends more words on generic worksheet boilerplate than on behavior specific to this computation.

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

Conciseness3/5

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

The first sentence is well front-loaded, but the remainder is padded with reusable boilerplate ('Use this tested BusCalc worksheet when the task matches its inputs and scope', 'Follow its required fields and exact choices') that carries little specific meaning. Several sentences could be merged or dropped without losing information.

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

Completeness3/5

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

An output schema exists, so return details need not be explained, and the annotations cover the safety profile. However, for a nested-schema tool with conditional required fields (batchCost when recipeEntry=total, ingredients when recipeEntry=ingredients), the description omits exactly the branch logic an agent must get right before calling.

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

Parameters3/5

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

Schema coverage is 33% at the top level, but nested fields carry detailed descriptions, so the description's main added value is the wrapper convention 'Put tool fields inside inputs' and the caution to supply units/modelVersion only when listed. It never explains the ingredients-vs-total recipeEntry branches, which is the single most important invocation decision, so it only partially compensates.

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

Purpose4/5

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

The opening sentence gives a specific verb and resource — ingredient cost of a batch and per-portion cost from package prices and quantities — which is concrete enough to distinguish it from generic siblings like buscalc_markup_vs_margin or buscalc_business_data_calculations. It stops short of naming any sibling it should be preferred over, so 4 rather than 5.

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

Usage Guidelines3/5

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

Usage is only implied: 'use this tested BusCalc worksheet when the task matches its inputs and scope' restates the obvious, but 'No prices or omitted costs are looked up' does tell the agent it must supply price data rather than expect a lookup. There is no explicit when-not guidance and no routing to alternative calculators for related cost questions.

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.

Resources