Skip to main content
Glama

Taokeh MCP server

Replaced by its MCP Registry listing

This endpoint is listed in the official MCP Registry as mcp. If you published it, claim ownership there.

File invoice draft

create_invoice_draft

Files a sales-invoice draft in Taokeh from a sales note. It does not post: the draft stays pending until a person approves it in Taokeh, and only that approval posts it (and moves stock). customerId is the id returned by resolve_customer; productRef is the id or exact SKU returned by resolve_product; the field rules are in intake_contract(doc_type:'invoice'). The server recomputes every line quantity from the tally and the grand total with SST, and its figures are the ones that post; working and printedTotal are cross-checks. needsReview with a short notes line flags doubts for the reviewer. Line keys are strict: a key not in the schema is refused by name (with the key it probably meant) and nothing is filed. On a perpetual-stock company, an approval that would take an item below zero is refused and nothing posts. The original sales note can ride the draft (the owner sees it at review, s.82 record-keeping) and lands on the posted invoice: inline base64 for a small file, an attachmentToken from request_attachment_upload for a larger one, or shoeboxItemId; inline also works for a client that cannot reach taokeh.my. Returns the draft id, computedTotal, review and approval links, and flags such as discrepancy and quantityOverridden.

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": {
      "saleDate": "<saleDate>",
      "paymentMethod": "<paymentMethod>",
      "lines": "<lines>"
    },
    "name": "create_invoice_draft"
  }
}

Input Schema

NameRequiredDescriptionDefault
termNoThe payment term as the paper states it ('Due on Receipt', 'Net 7', 'Net 14', 'Net 30', 'Net 60'). Any other wording is kept verbatim and shown to the reviewer as written. Omitted when the paper states none.
linesYes
notesNoShort reviewer note (one or two sentences, in the reviewer's language) naming what to double-check: a smudged total, an uncertain party, a judgment call. Shown on the approval card. Empty when nothing needs flagging.
refNoNoThe customer's own document number printed on the note: their delivery-order or purchase-order number ("DO 1074", "PO 88231"). Not the invoice number, which is `reference`. Omitted when the paper shows none.
dueDateNoThe due date when the paper states one. For the five preset terms Taokeh fills it (invoice date + 0/7/14/30/60 days) and shows it at approval; a sent date overrides that. An unrecognised term derives nothing, so without dueDate the invoice is due on its issue date.
customerNo
saleDateYes
referenceNo
customerIdNo
needsReviewNo
printedTotalNo
paymentMethodYes
shoeboxItemIdNoId of the Shoebox photo (from shoebox_items) this draft was read from. Taokeh attaches its own stored copy, so no image is sent with it; mutually exclusive with attachmentBase64 and attachmentToken. A photo already booked, set aside or carrying a pending draft is refused. Approval closes the Shoebox item.
attachmentBytesNoDecoded byte size of the original file. With attachmentBase64, the server refuses a truncated paste instead of filing a corrupt file.
attachmentTokenNoToken from request_attachment_upload, after the file bytes were PUT to its uploadUrl; carries a larger file without base64. Mutually exclusive with attachmentBase64. Lands on the posted invoice on approval.
attachmentBase64NoThe original sales note as base64, for a small file (a few KB). It rides the draft and lands on the posted invoice on approval. A bad type or oversize file is refused and nothing is filed.
attachmentSha256NoSHA-256 of the original file (64 hex chars): an optional second check alongside attachmentBase64.
attachmentFilenameNoOptional original filename, e.g. sales-note.jpg.
confirmNewCustomerNotrue means the user confirmed this customer is new. It skips the near-miss guard, which otherwise refuses a name that looks like shorthand for an existing customer.
attachmentMediaTypeNoMIME type, e.g. 'image/jpeg' or 'application/pdf'. Needed with attachmentBase64; a type that does not match the bytes is refused and nothing is filed.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
  2. Changed19 schema fields changed
    • changedInput schema / properties / attachmentBase64 / description
      Previous value: -"The ORIGINAL sales note as base64 — SMALL files only (a few KB). For a real photo or multi-page PDF use request_attachment_upload instead (attachmentToken). Rides the draft and lands on the posted invoice on approval — no re-upload. A bad type/oversize file is rejected and NOTHING is filed."New value: +"The original sales note as base64, for a small file (a few KB). It rides the draft and lands on the posted invoice on approval. A bad type or oversize file is refused and nothing is filed."
    • changedInput schema / properties / attachmentBytes / description
      Previous value: -"The decoded byte size of the ORIGINAL file on disk — send it alongside attachmentBase64 and the server rejects a truncated paste instead of filing a corrupt file."New value: +"Decoded byte size of the original file. With attachmentBase64, the server refuses a truncated paste instead of filing a corrupt file."
    • changedInput schema / properties / attachmentFilename / description
      Previous value: -"Optional original filename for the attachment, e.g. sales-note.jpg."New value: +"Optional original filename, e.g. sales-note.jpg."
    • changedInput schema / properties / attachmentMediaType / description
      Previous value: -"The attachment's MIME type, e.g. 'image/jpeg' or 'application/pdf'. Required when attachmentBase64 is given. It must match the file's bytes — a mismatch is refused and nothing is filed."New value: +"MIME type, e.g. 'image/jpeg' or 'application/pdf'. Needed with attachmentBase64; a type that does not match the bytes is refused and nothing is filed."
    • changedInput schema / properties / attachmentSha256 / description
      Previous value: -"The SHA-256 of the ORIGINAL file as 64 hex chars — optional second check alongside attachmentBase64, so corrupted bytes are rejected instead of filed."New value: +"SHA-256 of the original file (64 hex chars): an optional second check alongside attachmentBase64."
    • changedInput schema / properties / attachmentToken / description
      Previous value: -"The token from request_attachment_upload, AFTER you have PUT the file bytes to its uploadUrl. Use this instead of attachmentBase64 for any real photo/PDF — it carries the file out-of-band (no base64 in this call). Mutually exclusive with attachmentBase64. The uploaded file rides the draft and lands on the posted invoice on approval, exactly as an inline one does."New value: +"Token from request_attachment_upload, after the file bytes were PUT to its uploadUrl; carries a larger file without base64. Mutually exclusive with attachmentBase64. Lands on the posted invoice on approval."
    • changedInput schema / properties / confirmNewCustomer / description
      Previous value: -"Set to true ONLY after the user has EXPLICITLY confirmed this customer is genuinely new. It skips the near-miss guard (which rejects a name that looks like shorthand for an existing customer). Never set it to push a near-miss through — ask the user first."New value: +"true means the user confirmed this customer is new. It skips the near-miss guard, which otherwise refuses a name that looks like shorthand for an existing customer."
    • changedInput schema / properties / dueDate / description
      Previous value: -"The due date when the paper states one outright. For one of the five preset terms you can leave it out — Taokeh fills the due date on the draft (invoice date + 0/7/14/30/60 days) and the owner sees it on the approval screen. Send it to override that, or when the paper's due date does not follow the term. A term Taokeh does not recognise derives NOTHING, so state the due date yourself on those or the invoice posts due on its own issue date."New value: +"The due date when the paper states one. For the five preset terms Taokeh fills it (invoice date + 0/7/14/30/60 days) and shows it at approval; a sent date overrides that. An unrecognised term derives nothing, so without dueDate the invoice is due on its issue date."
    • changedInput schema / properties / lines / items / properties / description / description
      Previous value: -"The line text as PRINTED on the document, when it says more than the product name does — a size, a grade, a job reference, a period covered. It rides onto the posted line and prints on the customer's copy, so send what the paper says rather than a tidier phrasing of your own. Leave it out when the product name already says it. This is TEXT, not a field: Taokeh has no column for a dimension, a grade or a variant, so anything of that kind belongs here."New value: +"The line text as printed, when it says more than the product name (a size, a grade, a job reference, a period). It prints on the customer's copy. Dimensions, grades and variants have no field in Taokeh and are carried here as text."
    • changedInput schema / properties / lines / items / properties / quantity / description
      Previous value: -"The line quantity. On a measurement-profile company (see intake_contract's `measureProfile`) OMIT it whenever you give thickness/width/tally, or write the measure detail into the description ('2x2 = 10/10 12/14') — the server derives the authoritative quantity from those, and a quantity sent alongside a parseable tally is NOT used to compute: it is kept as your advisory figure and shown to the reviewer beside the server's. On the default passthrough company nothing is derived, so this IS the quantity — send it. On a timber company, for an item kept in tons, a per-ton quantity MORE than the tons a description's size and total feet give ('2x2 = 400'' and '2\" x 2\" = 400'' are 0.2222 ton) is refused, naming the tons — send the tons, never the feet. Beside a cut list ('2x2 = 15/10 12/8') your quantity is replaced by the cut list's tons; where it cannot be (inch marks on the size, a named size such as 'Nepek = 15/10', spaces around the '/'), a quantity more than the cut list's tons is refused the same way."New value: +"Line quantity. On a measurement-profile company a readable tally or description measure ('2x2 = 10/10 12/14') sets the quantity, and a sent figure is kept as advisory. Timber, item kept in tons: a quantity above the tons that the description's size and total feet give ('2x2 = 400'' is 0.2222 ton) is refused, naming the tons. Beside a readable cut list, the cut list's tons replace the quantity."
    • changedInput schema / properties / lines / items / properties / tally / description
      Previous value: -"The tally as pieces/length_ft pairs — '10/10 12/14' is 10 pieces of 10 ft and 12 of 14 ft — OR the total running feet like 400' when the paper gives no cut list. Never invent a cut list (no '1/400'). With thickness and width this is what the quantity is derived FROM. Every token must be a pieces/length pair — a tally with anything else in it (a grade word, a stray number, '=') is refused; put grade words in the description. A total-feet tally needs thickness and width (or a named size) to work out the tons, and has no pieces, so it cannot carry a per-piece price — both are refused."New value: +"Pieces/length_ft pairs: '10/10 12/14' is 10 pieces of 10 ft and 12 of 14 ft. Or the total running feet, like 400', when the paper has no cut list (needs thickness and width or a named size; no per-piece price). With thickness and width the quantity is derived from it. A token that is not a pieces/length pair is refused; grade words belong in the description."
    • changedInput schema / properties / lines / items / properties / thickness / description
      Previous value: -"Thickness in inches on a dimensional line — measurement-profile companies only (intake_contract shows this company's `measureProfile`). Give thickness + width + tally INSTEAD of a quantity and the server computes the authoritative quantity from them."New value: +"Thickness in inches on a dimensional line (measurement-profile companies; intake_contract shows `measureProfile`). With width and tally, the server computes the quantity."
    • changedInput schema / properties / lines / items / properties / unit / description
      Previous value: -"The unit the PRICE is quoted in. On a timber company: 'feet' = per running foot, 'pcs' = per piece, 'ton' or omitted = per ton. A per-foot/per-piece price is converted to the per-ton rate from thickness/width/tally, or from a cut list in the description ('2x2 = 10/10 12/14'); a description cut list the server cannot read cleanly is refused — send thickness/width/tally instead."New value: +"The unit the price is quoted in. Timber company: 'feet' = per running foot, 'pcs' = per piece, 'ton' or omitted = per ton. A per-foot or per-piece price is converted to a per-ton rate from thickness/width/tally or a cut list in the description; a description cut list that does not read cleanly is refused."
    • changedInput schema / properties / lines / items / properties / unitPrice / description
      Previous value: -"Two decimals at most (whole sen, or whole cents in another currency); put a discount or tax in its own field, never folded into the price."New value: +"Two decimals at most (whole sen, or whole cents in another currency). Discount and tax have their own fields and are not folded into the price."
    • changedInput schema / properties / lines / items / properties / width / description
      Previous value: -"Width in inches on a dimensional line. Goes with thickness and tally."New value: +"Width in inches on a dimensional line, with thickness and tally."
    • changedInput schema / properties / notes / description
      Previous value: -"A SHORT reviewer note: one or two plain sentences, written in the reviewer's language, flagging what the human should double-check before approving — a smudged or ambiguous total, a vendor/customer you weren't sure of, a judgment call you made. The reviewer reads this on a small approval card, so keep it brief and human. This is NOT a place to dump lengthy reasoning, your working, or boilerplate — just the one thing to check. Leave it empty when there is nothing to flag."New value: +"Short reviewer note (one or two sentences, in the reviewer's language) naming what to double-check: a smudged total, an uncertain party, a judgment call. Shown on the approval card. Empty when nothing needs flagging."
    • changedInput schema / properties / refNo / description
      Previous value: -"The CUSTOMER's own document number as printed on the note — their delivery-order number or purchase-order number (\"DO 1074\", \"PO 88231\"). NOT the invoice number: that is `reference`. Leave it out when the paper shows none; never copy the invoice number into it."New value: +"The customer's own document number printed on the note: their delivery-order or purchase-order number (\"DO 1074\", \"PO 88231\"). Not the invoice number, which is `reference`. Omitted when the paper shows none."
    • changedInput schema / properties / shoeboxItemId / description
      Previous value: -"The id of a SHOEBOX photo (from shoebox_items) that this draft was read from — the paper someone in the business snapped and sent in. Taokeh attaches ITS OWN stored copy of that photo to the draft, so DO NOT also send the image: no re-upload, no base64, nothing to truncate. Mutually exclusive with attachmentBase64 and attachmentToken. The item must still be waiting: one already booked, set aside, or already carrying a pending draft is refused with the reason. Approving the draft closes that shoebox item against the document it became."New value: +"Id of the Shoebox photo (from shoebox_items) this draft was read from. Taokeh attaches its own stored copy, so no image is sent with it; mutually exclusive with attachmentBase64 and attachmentToken. A photo already booked, set aside or carrying a pending draft is refused. Approval closes the Shoebox item."
    • changedInput schema / properties / term / description
      Previous value: -"The payment term exactly as the paper states it ('Due on Receipt', 'Net 7', 'Net 14', 'Net 30', 'Net 60'). Anything else the note actually says is kept verbatim and shown to the reviewer as-is — do not round it to the nearest familiar term. Leave it out when the paper states none."New value: +"The payment term as the paper states it ('Due on Receipt', 'Net 7', 'Net 14', 'Net 30', 'Net 60'). Any other wording is kept verbatim and shown to the reviewer as written. Omitted when the paper states none."
  3. Changed2 schema fields changed
    • removedInput schema / properties / lines / items / properties / discount / anyOf
      Removed value: -[
      -  {
      -    "type": "number"
      -  },
      -  {
      -    "type": "string"
      -  }
      -]
    • addedInput schema / properties / lines / items / properties / discount / type
      Added value: +[
      +  "number",
      +  "string"
      +]
  4. Changed1 schema field changed
    • changedInput schema / properties / lines / items / properties / quantity / description
      Previous value: -"The line quantity. On a measurement-profile company (see intake_contract's `measureProfile`) OMIT it whenever you give thickness/width/tally, or write the measure detail into the description ('2x2 = 10/10 12/14') — the server derives the authoritative quantity from those, and a quantity sent alongside a parseable tally is NOT used to compute: it is kept as your advisory figure and shown to the reviewer beside the server's. On the default passthrough company nothing is derived, so this IS the quantity — send it. On a timber company, for an item kept in tons, a per-ton quantity MORE than the tons a description's size and total feet give ('2x2 = 400'' is 0.2222 ton) is refused, naming the tons — send the tons, never the feet."New value: +"The line quantity. On a measurement-profile company (see intake_contract's `measureProfile`) OMIT it whenever you give thickness/width/tally, or write the measure detail into the description ('2x2 = 10/10 12/14') — the server derives the authoritative quantity from those, and a quantity sent alongside a parseable tally is NOT used to compute: it is kept as your advisory figure and shown to the reviewer beside the server's. On the default passthrough company nothing is derived, so this IS the quantity — send it. On a timber company, for an item kept in tons, a per-ton quantity MORE than the tons a description's size and total feet give ('2x2 = 400'' and '2\" x 2\" = 400'' are 0.2222 ton) is refused, naming the tons — send the tons, never the feet. Beside a cut list ('2x2 = 15/10 12/8') your quantity is replaced by the cut list's tons; where it cannot be (inch marks on the size, a named size such as 'Nepek = 15/10', spaces around the '/'), a quantity more than the cut list's tons is refused the same way."
  5. Changed1 schema field changed
    • changedInput schema / properties / attachmentMediaType / description
      Previous value: -"The attachment's MIME type, e.g. 'image/jpeg' or 'application/pdf'. Required when attachmentBase64 is given."New value: +"The attachment's MIME type, e.g. 'image/jpeg' or 'application/pdf'. Required when attachmentBase64 is given. It must match the file's bytes — a mismatch is refused and nothing is filed."
  6. Changed1 schema field changed
    • changedInput schema / properties / lines / items / properties / quantity / description
      Previous value: -"The line quantity. On a measurement-profile company (see intake_contract's `measureProfile`) OMIT it whenever you give thickness/width/tally, or write the measure detail into the description ('2x2 = 10/10 12/14') — the server derives the authoritative quantity from those, and a quantity sent alongside a parseable tally is NOT used to compute: it is kept as your advisory figure and shown to the reviewer beside the server's. On the default passthrough company nothing is derived, so this IS the quantity — send it."New value: +"The line quantity. On a measurement-profile company (see intake_contract's `measureProfile`) OMIT it whenever you give thickness/width/tally, or write the measure detail into the description ('2x2 = 10/10 12/14') — the server derives the authoritative quantity from those, and a quantity sent alongside a parseable tally is NOT used to compute: it is kept as your advisory figure and shown to the reviewer beside the server's. On the default passthrough company nothing is derived, so this IS the quantity — send it. On a timber company, for an item kept in tons, a per-ton quantity MORE than the tons a description's size and total feet give ('2x2 = 400'' is 0.2222 ton) is refused, naming the tons — send the tons, never the feet."
  7. Changed1 schema field changed
    • addedInput schema / properties / lines / items / properties / unitPrice / description
      Added value: +"Two decimals at most (whole sen, or whole cents in another currency); put a discount or tax in its own field, never folded into the price."
  8. Changed2 schema fields changed
    • changedInput schema / properties / lines / items / properties / tally / description
      Previous value: -"The piece tally as pieces/length_ft pairs — '10/10 12/14' is 10 pieces of 10 ft and 12 of 14 ft. With thickness and width this is what the quantity is derived FROM."New value: +"The tally as pieces/length_ft pairs — '10/10 12/14' is 10 pieces of 10 ft and 12 of 14 ft — OR the total running feet like 400' when the paper gives no cut list. Never invent a cut list (no '1/400'). With thickness and width this is what the quantity is derived FROM. Every token must be a pieces/length pair — a tally with anything else in it (a grade word, a stray number, '=') is refused; put grade words in the description. A total-feet tally needs thickness and width (or a named size) to work out the tons, and has no pieces, so it cannot carry a per-piece price — both are refused."
    • addedInput schema / properties / lines / items / properties / unit / description
      Added value: +"The unit the PRICE is quoted in. On a timber company: 'feet' = per running foot, 'pcs' = per piece, 'ton' or omitted = per ton. A per-foot/per-piece price is converted to the per-ton rate from thickness/width/tally, or from a cut list in the description ('2x2 = 10/10 12/14'); a description cut list the server cannot read cleanly is refused — send thickness/width/tally instead."
  9. Changed2 schema fields changed
    • addedInput schema / properties / lines / items / additionalProperties
      Added value: +false
    • addedInput schema / properties / lines / items / properties / description / description
      Added value: +"The line text as PRINTED on the document, when it says more than the product name does — a size, a grade, a job reference, a period covered. It rides onto the posted line and prints on the customer's copy, so send what the paper says rather than a tidier phrasing of your own. Leave it out when the product name already says it. This is TEXT, not a field: Taokeh has no column for a dimension, a grade or a variant, so anything of that kind belongs here."
  10. Changed2 schema fields changed
    • changedInput schema / properties / lines / items / properties / quantity / description
      Previous value: -"The line quantity. On a measurement-profile workspace (see intake_contract's `measureProfile`) OMIT it whenever you give thickness/width/tally, or write the measure detail into the description ('2x2 = 10/10 12/14') — the server derives the authoritative quantity from those, and a quantity sent alongside a parseable tally is NOT used to compute: it is kept as your advisory figure and shown to the reviewer beside the server's. On the default passthrough workspace nothing is derived, so this IS the quantity — send it."New value: +"The line quantity. On a measurement-profile company (see intake_contract's `measureProfile`) OMIT it whenever you give thickness/width/tally, or write the measure detail into the description ('2x2 = 10/10 12/14') — the server derives the authoritative quantity from those, and a quantity sent alongside a parseable tally is NOT used to compute: it is kept as your advisory figure and shown to the reviewer beside the server's. On the default passthrough company nothing is derived, so this IS the quantity — send it."
    • changedInput schema / properties / lines / items / properties / thickness / description
      Previous value: -"Thickness in inches on a dimensional line — measurement-profile workspaces only (intake_contract shows this workspace's `measureProfile`). Give thickness + width + tally INSTEAD of a quantity and the server computes the authoritative quantity from them."New value: +"Thickness in inches on a dimensional line — measurement-profile companies only (intake_contract shows this company's `measureProfile`). Give thickness + width + tally INSTEAD of a quantity and the server computes the authoritative quantity from them."
  11. Changed4 schema fields changed
    • addedInput schema / properties / lines / items / properties / quantity / description
      Added value: +"The line quantity. On a measurement-profile workspace (see intake_contract's `measureProfile`) OMIT it whenever you give thickness/width/tally, or write the measure detail into the description ('2x2 = 10/10 12/14') — the server derives the authoritative quantity from those, and a quantity sent alongside a parseable tally is NOT used to compute: it is kept as your advisory figure and shown to the reviewer beside the server's. On the default passthrough workspace nothing is derived, so this IS the quantity — send it."
    • addedInput schema / properties / lines / items / properties / tally / description
      Added value: +"The piece tally as pieces/length_ft pairs — '10/10 12/14' is 10 pieces of 10 ft and 12 of 14 ft. With thickness and width this is what the quantity is derived FROM."
    • addedInput schema / properties / lines / items / properties / thickness / description
      Added value: +"Thickness in inches on a dimensional line — measurement-profile workspaces only (intake_contract shows this workspace's `measureProfile`). Give thickness + width + tally INSTEAD of a quantity and the server computes the authoritative quantity from them."
    • addedInput schema / properties / lines / items / properties / width / description
      Added value: +"Width in inches on a dimensional line. Goes with thickness and tally."
  12. Changed3 schema fields changed
    • addedInput schema / properties / dueDate
      Added value: +{
      +  "description": "The due date when the paper states one outright. For one of the five preset terms you can leave it out — Taokeh fills the due date on the draft (invoice date + 0/7/14/30/60 days) and the owner sees it on the approval screen. Send it to override that, or when the paper's due date does not follow the term. A term Taokeh does not recognise derives NOTHING, so state the due date yourself on those or the invoice posts due on its own issue date.",
      +  "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
      +  "type": "string"
      +}
    • addedInput schema / properties / refNo
      Added value: +{
      +  "description": "The CUSTOMER's own document number as printed on the note — their delivery-order number or purchase-order number (\"DO 1074\", \"PO 88231\"). NOT the invoice number: that is `reference`. Leave it out when the paper shows none; never copy the invoice number into it.",
      +  "maxLength": 200,
      +  "type": "string"
      +}
    • addedInput schema / properties / term
      Added value: +{
      +  "description": "The payment term exactly as the paper states it ('Due on Receipt', 'Net 7', 'Net 14', 'Net 30', 'Net 60'). Anything else the note actually says is kept verbatim and shown to the reviewer as-is — do not round it to the nearest familiar term. Leave it out when the paper states none.",
      +  "maxLength": 100,
      +  "type": "string"
      +}
  13. Changed1 schema field changed
    • addedInput schema / properties / shoeboxItemId
      Added value: +{
      +  "description": "The id of a SHOEBOX photo (from shoebox_items) that this draft was read from — the paper someone in the business snapped and sent in. Taokeh attaches ITS OWN stored copy of that photo to the draft, so DO NOT also send the image: no re-upload, no base64, nothing to truncate. Mutually exclusive with attachmentBase64 and attachmentToken. The item must still be waiting: one already booked, set aside, or already carrying a pending draft is refused with the reason. Approving the draft closes that shoebox item against the document it became.",
      +  "type": "string"
      +}
  14. Changed2 schema fields changed
    • addedInput schema / properties / attachmentBytes
      Added value: +{
      +  "description": "The decoded byte size of the ORIGINAL file on disk — send it alongside attachmentBase64 and the server rejects a truncated paste instead of filing a corrupt file.",
      +  "exclusiveMinimum": 0,
      +  "maximum": 9007199254740991,
      +  "type": "integer"
      +}
    • addedInput schema / properties / attachmentSha256
      Added value: +{
      +  "description": "The SHA-256 of the ORIGINAL file as 64 hex chars — optional second check alongside attachmentBase64, so corrupted bytes are rejected instead of filed.",
      +  "type": "string"
      +}
  15. First observed

TDQS

A4.7/5.0
Behavior5/5

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

Goes well beyond the annotations: no posting until human approval, stock moved only on approval, server-recomputed quantities and SST totals overriding sent figures, strict line keys refused by name with a suggested key, and perpetual-stock negative-quantity refusal where nothing posts. These are exactly the side effects and failure modes an agent needs for a non-idempotent mutation that the annotations (destructive=false, idempotent=false) cannot convey.

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-loads the most consequential fact ('It does not post') and every sentence carries operational information, but it is delivered as one dense unbroken block covering posting, refs, recomputation, review flags, attachments, and returns. Slight grouping or breaks would make it easier to scan without losing content.

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 complex 20-parameter mutation with no output schema, the description still names the return payload (draft id, computedTotal, review and approval links, discrepancy and quantityOverridden flags) and covers approval, refusal, and attachment behavior. Nothing an agent needs to call it correctly appears missing.

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

Parameters5/5

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

With 20 parameters and only 60% schema coverage, the description compensates by tying customerId to resolve_customer and productRef to resolve_product, explaining the three mutually exclusive attachment routes (inline base64, attachmentToken, shoeboxItemId), and defining working/printedTotal as cross-checks and needsReview plus notes as the reviewer flag. It adds meaning for several schema-undocumented fields rather than restating them.

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?

States a specific verb and resource ('Files a sales-invoice draft ... from a sales note') and immediately draws the essential line that it does not post. That distinction separates it from approval/posting paths and from the update/delivery-order draft siblings an agent might otherwise confuse it with.

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?

Gives clear when-to-use context (filing a draft from a sales note, pending human approval) and routes file attachments to request_attachment_upload for larger files, plus intake_contract for field rules. It lacks explicit when-not/alternative guidance against siblings like update_invoice_draft or create_delivery_order_invoice_draft, so it stops short of full routing.

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