Skip to main content
Glama
loldwyer

Red MCP Server

by loldwyer

brc_batch_sales_invoices

Create sales invoices in batch after confirming a plain-English draft and counterparty. Applies safety checks: blocks placeholder productIds, validates sales VAT, and requires explicit confirmation.

Instructions

Processes a batch of sales invoices. Batch sales invoices apply the same safety checks as single sales invoices: productId 0/1 placeholder blocking before draft and posting; Sales VAT category validation before draft and posting; Gross Price Entry priceBasis handling; CR analysis category confirmation; and counterparty confirmation covering all listed customers. If the batch includes multiple customers, confirming means confirming all listed customers, not just one. Set confirmCrAnalysisCategory=true at batch level only after the user confirms CR sales analysis account codes are intentional. Per item, the BRC "Note" field (JSON note) defaults to the customer name when omitted (never the product name), and the BRC "Delivery To" address (JSON deliveryTo) is only included when explicitly provided. 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. Maximum 5 items per batch request. 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
itemsYesBatch items to process. Maximum 5 items per request.
priceBasisNoApplies to every sales invoice/credit note item in this batch. Required when Gross Price Entry is enabled. Use `gross` when unit prices are VAT-inclusive/gross. Use `net` when unit prices are VAT-exclusive/net.
companyNameYesCompany context name, for example YOUR-COMPANY-NAME.
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.
confirmCrAnalysisCategoryNoApplies to every sales document item in this batch. Set true only after the user confirms a CR (customer) sales analysis account code is intentional for these product lines.
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?

No annotations, so description fully covers behavioral traits: placeholder blocking, VAT validation, CR analysis, counterparty confirmation, preflight flow, item constraints. Discloses defaults and conditions for note and deliveryTo fields.

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?

Description is verbose and contains some redundancy (e.g., productId blocking mentioned twice). However, it is well-structured front-loading purpose, and the complexity justifies length.

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

Completeness4/5

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

No output schema, but description explains preflight response and draft preview. Lacks details on success response and error handling. Usage flow is well covered.

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?

Schema coverage is 100%, but description adds significant meaning beyond schema: explains preflight flow, confirmation semantics, and details for items (note, deliveryTo). However, items schema is minimal so description compensates well.

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?

Clearly states it processes a batch of sales invoices. Distinguishes from single sales invoice tool and other batch tools by specifying batch-specific behavior and safety checks.

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?

Provides explicit when-to-use and when-not-to-use guidance, including maximum 5 items, requiring confirmWrite and confirmCounterpartyExplicit, not reusing counterparty, and calling brc_list_products first for product lines.

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/loldwyer/Red'

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