Skip to main content
Glama
BigRedCloud

Red MCP Server

Official
by BigRedCloud

brc_create_sales_invoice

Creates a BRC sales invoice with mandatory validation of customer, products, sales reps, and analysis categories. Requires explicit user confirmation before posting, showing a plain-English draft preview first.

Instructions

Creates a BRC sales invoice using structured MCP fields. Requires a reference when the company is configured for manual sales references; otherwise prefer brc_create_sales_invoice_gen_ref. Draft previews include a Missing or not provided section for blank customer phone or email only — warnings only, do not invent values. Optional. BRC "Note" field on the sales document (JSON field note). Leave blank to default it to the customer name (BRC customer "Name" / JSON name). Do not use the product name as the note. Only set this when the user explicitly provides a note. Optional. BRC "Delivery To" address (JSON field deliveryTo). Leave blank unless the user explicitly provides a delivery address. Do not invent or default a delivery address (for example "MCP Test"). Requires saleRepId and saleRepCode. Do not use default or demo sales rep values. If missing, list sales reps or ask the user to choose one before creating. Requires analysisCategoryId and accountCode from a Sales Analysis category on each product line. Do not default to CR01/Customer or the first listed category. Set confirmCrAnalysisCategory=true only after the user confirms a CR account code is intentional. When Gross Price Entry is enabled for sales invoicing, this tool requires priceBasis. Use priceBasis "gross" when unit prices are VAT-inclusive/gross, or priceBasis "net" when unit prices are VAT-exclusive/net. Do not tell the user to disable Gross Price Entry if they have provided priceBasis. Do not invent productId values and do not use productId 0 or 1 as placeholders. productId 0 and 1 are treated as placeholders and are blocked at runtime before the draft preview and before posting. If a product line is needed, first call brc_list_products and use a real product from the connected company. If no suitable product exists, ask the user whether to create/select a product, or use a service/non-product line only if the endpoint supports it. Sales invoices must use Sales VAT rates. Purchase/non-Sales VAT rates are blocked before draft and before posting, even if the VAT percentage matches. First call without confirmWrite: true returns confirmation_required and a payload preview — show a plain-English draft in chat, then retry with confirmWrite: true only after explicit user confirmation in a later message. Passing preflight is not confirmation. Also requires confirmCounterpartyExplicit: true once the user has explicitly named or confirmed the customer/supplier in the current conversation. Do not reuse a counterparty from an earlier draft without that confirmation.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
noteNoOptional. BRC "Note" field on the sales document (JSON field `note`). Leave blank to default it to the customer name (BRC customer "Name" / JSON `name`). Do not use the product name as the note. Only set this when the user explicitly provides a note.
acCodeYes
procDateYes
quantityYes
entryDateYes
netAmountYes
productIdYesproductCode is the BRC product "Code" (JSON `productCode`); productId is the BRC product "Id" (JSON `productId`) from brc_list_products. The product name is not a payload field — do not place it in the BRC "Note" field (JSON `note`).
referenceNoOptional. BRC "Reference" field (JSON field `reference`). BRC "Our Ref" (JSON `ourReference`) and BRC "Your Ref" (JSON `yourReference`) default to this value when not supplied separately.
saleRepIdYesSales rep id from brc_list_sales_reps.
unitPriceYes
vatRateIdYes
customerIdYes
deliveryToNoOptional. BRC "Delivery To" address (JSON field `deliveryTo`). Leave blank unless the user explicitly provides a delivery address. Do not invent or default a delivery address (for example "MCP Test").
priceBasisNoRequired when Gross Price Entry is enabled. Use `gross` when unit prices are VAT-inclusive/gross. Use `net` when unit prices are VAT-exclusive/net.
accountCodeYes
companyNameYesCompany context name, for example YOUR-COMPANY-NAME.
descriptionYesProduct line description shown on the document line (BRC product line description / JSON `tranNotes`, also used on the line's analysis entry description). This is the line narrative, not the BRC "Note" field.
productCodeYesproductCode is the BRC product "Code" (JSON `productCode`); productId is the BRC product "Id" (JSON `productId`) from brc_list_products. The product name is not a payload field — do not place it in the BRC "Note" field (JSON `note`).
saleRepCodeYesSales rep code from brc_list_sales_reps.
confirmWriteNoMust be true only after a plain-English draft has been shown in the current conversation and the user explicitly confirmed posting (for example yes, create it / post it now / confirm). Never set true on the first call or because the user initially asked to create something.
customerNameNoOptional. The selected customer's name (BRC customer "Name" / JSON `name`). Used as the default sales document note (BRC "Note" / JSON `note`) when no explicit note is given.
vatPercentageYes
bookTranTypeIdYes
analysisCategoryIdYes
confirmCrAnalysisCategoryNoSet true only after the user confirms a CR sales analysis account code is intentional for this product line.
confirmCounterpartyExplicitNoMust be true only after the user explicitly named or confirmed the customer, supplier, or other counterparty in the current conversation. Never set true because a customer or supplier appeared in an earlier draft, was inferred from context, or was filled in without the user's explicit choice in this conversation.
Behavior5/5

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

With no annotations, the description fully discloses behavioral traits: productId 0/1 are blocked at runtime, purchase VAT rates are blocked, first call returns confirmation_required with payload preview, requires confirmCounterpartyExplicit, and addresses gross price entry behavior. All critical behaviors are transparent.

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 description is very long and dense, lacking section breaks. While all information is valuable, it could be more concise. For a tool with 26 parameters, the length is somewhat justified, but improvement in structure would enhance readability.

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?

Given the high complexity (26 params, no output schema), the description is remarkably complete. It covers prerequisites, workflows, confirmation steps, relationships with other tools (brc_list_products, brc_list_sales_reps), and edge cases. It even instructs on what to do when no suitable product exists. Only missing detail is the return value after posting, but that is acceptable without an output schema.

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?

Schema coverage is 54%, and the description adds significant meaning beyond the schema. It explains constraints for note (default to customer name), deliveryTo (do not invent), priceBasis (required when Gross Price Entry enabled), confirmWrite (never true on first call), and clarifies that productId 0/1 are placeholders blocked at runtime.

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 clearly states 'Creates a BRC sales invoice using structured MCP fields.' It differentiates from the sibling brc_create_sales_invoice_gen_ref by specifying when each should be used (manual vs automatic reference generation). The verb 'creates' and resource 'sales invoice' are specific.

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?

Extensive guidance on when to use this tool vs alternatives (e.g., prefer gen_ref when manual references not needed). Includes many 'do not' instructions (invent values, use default sales rep, default analysis category) and explicit workflow steps (first call without confirmWrite, show draft, retry with confirmation).

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

Install Server

Other Tools

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/BigRedCloud/red-mcp-server'

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