Skip to main content
Glama
chrischall

myhotlunchbox-mcp

by chrischall

mhlb_checkout

Destructive

Pay for the lunches in your cart with a saved card. Review the total from checkout initialization, then approve the charge to complete the payment.

Instructions

PAY for the lunches in the cart. This charges a real payment method on the My Hot Lunchbox account. Run mhlb_init_checkout first, read the total it returns, and pass that figure as expectedTotal. Only a card ALREADY SAVED on the account can be used: paying with a new card needs a Stripe token minted by Stripe.js in a browser, which no server-side client can produce. Asks the user to confirm first: a confirmation prompt where the client supports one; otherwise the first call returns a preview and a confirmToken, and only a repeat call with that token proceeds (see MCP_CONFIRM_MODE). NOTE: this write is UNVERIFIED — its request shape was derived from the web app’s compiled API client but has not been exercised against a live account. Inspect the confirmation preview before approving it.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
orderIdsYesIds of the orders to pay for, from mhlb_get_cart.
couponCodeNoCoupon code to apply to this checkout.
checkoutTypeNoPayment method type, as mhlb_init_checkout reports it. Omit to let the server default.
confirmTokenNoONLY for the two-step confirmation fallback (a client without MCP elicitation). The confirmToken from this same tool's phase-1 "confirmation-required" response, passed back ONLY after the user has seen that preview and explicitly approved it in chat — never on the first call, never invented, never reused. Call again with the same arguments. Ignored when the client supports elicitation.
giftCardCodeNoGift card code to apply to this checkout.
expectedTotalYesThe amount you expect to be charged, as mhlb_init_checkout reported it. The server prices the charge from orderIds, so no client-side check can bind the amount — this is recorded in the confirmation preview and in the result so an unexpected charge is at least attributable.
idempotencyKeyNoReuse the SAME key when retrying a checkout that may already have gone through — that is what stops a retry becoming a second charge. Generated automatically when omitted. Pass the same value on both confirmation calls.
schoolDonationsNoSchool donation selections, as returned by mhlb_init_checkout.
availableCreditsNoAccount credit to apply, as parent_credit_value from mhlb_whoami.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changedv1.2.1
    • removedInput schema / properties / confirm
      Removed value: -{
      -  "description": "Must be true to proceed. Without this, the tool returns a preview.",
      -  "type": "boolean"
      -}
    • addedInput schema / properties / confirmToken
      Added value: +{
      +  "description": "ONLY for the two-step confirmation fallback (a client without MCP elicitation). The confirmToken from this same tool's phase-1 \"confirmation-required\" response, passed back ONLY after the user has seen that preview and explicitly approved it in chat — never on the first call, never invented, never reused. Call again with the same arguments. Ignored when the client supports elicitation.",
      +  "type": "string"
      +}
    • changedInput schema / properties / expectedTotal / description
      Previous value: -"The amount you expect to be charged, as mhlb_init_checkout reported it. The server prices the charge from orderIds, so no client-side check can bind the amount — this is recorded in the dry run and in the result so an unexpected charge is at least attributable."New value: +"The amount you expect to be charged, as mhlb_init_checkout reported it. The server prices the charge from orderIds, so no client-side check can bind the amount — this is recorded in the confirmation preview and in the result so an unexpected charge is at least attributable."
    • changedInput schema / properties / idempotencyKey / description
      Previous value: -"Reuse the SAME key when retrying a checkout that may already have gone through — that is what stops a retry becoming a second charge. Generated automatically when omitted."New value: +"Reuse the SAME key when retrying a checkout that may already have gone through — that is what stops a retry becoming a second charge. Generated automatically when omitted. Pass the same value on both confirmation calls."
  2. Changed1 schema field changedv1.0.0
    • changedInput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
  3. First observedv0.2.0

TDQS

A4.7/5.0
Behavior5/5

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

Annotations already mark this as destructive/non-read-only, and the description adds crucial context: it makes a real payment, requires prior checkout initialization, may require a two-step confirmation, and is explicitly marked as UNVERIFIED with a warning to inspect the preview before approving. This is exceptionally transparent about the operation's risk.

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

Conciseness5/5

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

Every sentence earns its place: the core action, prerequisite, card constraint, confirmation behavior, and verification warning are all essential. The description is dense but not bloated, and the safety-critical caveat about the unverified write is included without unnecessary filler.

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 high-stakes payment tool with no output schema and no annotation detail beyond mutability and destructiveness, the description covers prerequisites, confirmation semantics, limitations, and risk warnings. It gives an agent enough to invoke the tool safely and to route the user through the confirmation step properly.

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 description coverage is 100%, and each parameter already has detailed meaning in the schema. The description adds some operational context around expectedTotal and the confirmToken flow, but it largely restates what the schema already documents rather than providing substantial new parameter-level insight.

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?

The description opens with a specific verb and resource: 'PAY for the lunches in the cart' and immediately clarifies the real-world consequence: 'charges a real payment method.' It distinguishes itself from mhlb_init_checkout by requiring that tool as a prerequisite and positioning this one as the actual charging step.

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

Usage Guidelines5/5

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

The description gives explicit workflow instructions: run mhlb_init_checkout first, read the returned total, pass it as expectedTotal, and only use a card already saved on the account. It also clearly states when the tool cannot be used (new card requiring a Stripe token unavailable server-side) and describes the confirmation flow for both supported and unsupported environments.

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