Skip to main content
Glama

Red by Big Red Cloud

Batch Sales Entries

brc_batch_sales_entries
Destructive

Processes sales entries with positive, zero or negative amounts and multiple VAT lines. The optional batchSize is a per-request limit. An omitted value uses the sales-entry configuration, then the general batch configuration, then fallback 20. The hard ceiling is 100, with no automatic splitting. Maximum 100 items per batch request. Requires a valid routeToken issued for the matching action workflow. The token remains valid through lookup, preview and the permitted transaction. Placeholder tokens are invalid. A routeToken does not bypass preview or explicit-confirmation requirements. A call without confirmWrite: true returns confirmation_required and a payload preview. confirmWrite: true applies the previewed change after explicit confirmation. Passing preflight is not confirmation. Requires confirmCounterpartyExplicit: true; confirmation is scoped to the counterparty selected for the current preview.

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": {
      "companyName": "<companyName>",
      "items": "<items>",
      "routeToken": "<routeToken>"
    },
    "name": "brc_batch_sales_entries"
  }
}

Input Schema

NameRequiredDescriptionDefault
itemsYesBatch items to process. Maximum 100 items per request.
batchSizeNoMaximum item count for this request, not an automatic chunk size. If omitted: BRC_SALES_ENTRY_BATCH_SIZE, then BRC_MAX_BATCH_ITEMS, then fallback 20. Hard ceiling 100. RED never auto-splits requests; preview/confirm each submitted set.
routeTokenYesOpaque routeToken from brc_route_request for this action workflow. Required for transactional tools. Routing permission only — does not replace preview-before-posting or confirmWrite.
companyNameYesCompany context name, for example YOUR-COMPANY-NAME.
confirmWriteNoMust be true only after a plain-English preview before posting 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. Nothing is written to Big Red Cloud until you confirm.
connectionRefNoOpaque Red connection reference returned by brc_confirm_company_connection. Pass this exact value on every later tool call when the MCP client rotates session ids (for example Vibe/Mistral). Keep reusing the same connectionRef after successful tool calls — do not start a new connection because a lookup returned empty or partial data. It is not an API key and does not contain credentials.
detailedResponseNoReturn full payload and BRC response for audit inspection. Default is compact.
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 preview, was inferred from context, or was filled in without the user's explicit choice in this conversation.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / batchSize / description
      Previous value: -"Approved maximum item count in this call. Defaults to server configuration or 20; ceiling 100. Split larger jobs deterministically and preview each approved set."New value: +"Maximum item count for this request, not an automatic chunk size. If omitted: BRC_SALES_ENTRY_BATCH_SIZE, then BRC_MAX_BATCH_ITEMS, then fallback 20. Hard ceiling 100. RED never auto-splits requests; preview/confirm each submitted set."
  2. Changed24 schema fields changed
    • addedInput schema / properties / batchSize
      Added value: +{
      +  "description": "Approved maximum item count in this call. Defaults to server configuration or 20; ceiling 100. Split larger jobs deterministically and preview each approved set.",
      +  "maximum": 100,
      +  "minimum": 1,
      +  "type": "integer"
      +}
    • addedInput schema / properties / detailedResponse
      Added value: +{
      +  "description": "Return full payload and BRC response for audit inspection. Default is compact.",
      +  "type": "boolean"
      +}
    • changedInput schema / properties / items / description
      Previous value: -"Batch items to process. Maximum 20 items per request."New value: +"Batch items to process. Maximum 100 items per request."
    • removedInput schema / properties / items / items / properties / item / properties / acCode / description
      Removed value: -"Customer account code."
    • removedInput schema / properties / items / items / properties / item / properties / accountCode / description
      Removed value: -"Sales analysis account code."
    • removedInput schema / properties / items / items / properties / item / properties / analysisCategoryId / description
      Removed value: -"Sales analysis category id."
    • removedInput schema / properties / items / items / properties / item / properties / bookTranTypeId / description
      Removed value: -"Sales Entry book transaction type id; use 5."
    • removedInput schema / properties / items / items / properties / item / properties / customerId / description
      Removed value: -"BRC customer id."
    • removedInput schema / properties / items / items / properties / item / properties / description / description
      Removed value: -"Analysis-line description."
    • removedInput schema / properties / items / items / properties / item / properties / description / minLength
      Removed value: -1
    • removedInput schema / properties / items / items / properties / item / properties / entryDate / description
      Removed value: -"Entry date in ISO format."
    • changedInput schema / properties / items / items / properties / item / properties / netAmount / description
      Previous value: -"Positive net amount before VAT."New value: +"Signed net total: positive, zero, or negative credit. No record-type conversion."
    • removedInput schema / properties / items / items / properties / item / properties / netAmount / exclusiveMinimum
      Removed value: -0
    • removedInput schema / properties / items / items / properties / item / properties / note / description
      Removed value: -"Sales Entry note."
    • removedInput schema / properties / items / items / properties / item / properties / note / minLength
      Removed value: -1
    • removedInput schema / properties / items / items / properties / item / properties / procDate / description
      Removed value: -"Processing date in ISO format."
    • addedInput schema / properties / items / items / properties / item / properties / total
      Added value: +{
      +  "type": "number"
      +}
    • addedInput schema / properties / items / items / properties / item / properties / totalNet
      Added value: +{
      +  "type": "number"
      +}
    • addedInput schema / properties / items / items / properties / item / properties / totalVAT
      Added value: +{
      +  "type": "number"
      +}
    • addedInput schema / properties / items / items / properties / item / properties / vatLines
      Added value: +{
      +  "description": "Separate VAT allocations; net amounts must sum to netAmount. Legacy vatRateId/vatPercentage remain supported.",
      +  "items": {
      +    "additionalProperties": false,
      +    "properties": {
      +      "netAmount": {
      +        "type": "number"
      +      },
      +      "vatPercentage": {
      +        "type": "number"
      +      },
      +      "vatRateId": {
      +        "exclusiveMinimum": 0,
      +        "maximum": 9007199254740991,
      +        "type": "integer"
      +      }
      +    },
      +    "required": [
      +      "vatRateId",
      +      "vatPercentage",
      +      "netAmount"
      +    ],
      +    "type": "object"
      +  },
      +  "maxItems": 100,
      +  "type": "array"
      +}
    • removedInput schema / properties / items / items / properties / item / properties / vatPercentage / description
      Removed value: -"VAT percentage."
    • removedInput schema / properties / items / items / properties / item / properties / vatRateId / description
      Removed value: -"BRC VAT rate id."
    • changedInput schema / properties / items / items / properties / item / required
      Previous value: -[
      -  "customerId",
      -  "acCode",
      -  "note",
      -  "entryDate",
      -  "procDate",
      -  "bookTranTypeId",
      -  "analysisCategoryId",
      -  "accountCode",
      -  "description",
      -  "netAmount",
      -  "vatRateId",
      -  "vatPercentage"
      -]New value: +[
      +  "customerId",
      +  "acCode",
      +  "note",
      +  "entryDate",
      +  "procDate",
      +  "bookTranTypeId",
      +  "netAmount"
      +]
    • changedInput schema / properties / items / maxItems
      Previous value: -20New value: +100
  3. Changed5 schema fields changed
    • changedInput schema / properties / items / items / additionalProperties
      Previous value: -{}New value: +false
    • addedInput schema / properties / items / items / properties
      Added value: +{
      +  "item": {
      +    "additionalProperties": false,
      +    "properties": {
      +      "acCode": {
      +        "description": "Customer account code.",
      +        "minLength": 1,
      +        "type": "string"
      +      },
      +      "accountCode": {
      +        "description": "Sales analysis account code.",
      +        "minLength": 1,
      +        "type": "string"
      +      },
      +      "analysisCategoryId": {
      +        "description": "Sales analysis category id.",
      +        "exclusiveMinimum": 0,
      +        "maximum": 9007199254740991,
      +        "type": "integer"
      +      },
      +      "bookTranTypeId": {
      +        "description": "Sales Entry book transaction type id; use 5.",
      +        "exclusiveMinimum": 0,
      +        "maximum": 9007199254740991,
      +        "type": "integer"
      +      },
      +      "customerId": {
      +        "description": "BRC customer id.",
      +        "exclusiveMinimum": 0,
      +        "maximum": 9007199254740991,
      +        "type": "integer"
      +      },
      +      "description": {
      +        "description": "Analysis-line description.",
      +        "minLength": 1,
      +        "type": "string"
      +      },
      +      "entryDate": {
      +        "description": "Entry date in ISO format.",
      +        "minLength": 1,
      +        "type": "string"
      +      },
      +      "netAmount": {
      +        "description": "Positive net amount before VAT.",
      +        "exclusiveMinimum": 0,
      +        "type": "number"
      +      },
      +      "note": {
      +        "description": "Sales Entry note.",
      +        "minLength": 1,
      +        "type": "string"
      +      },
      +      "procDate": {
      +        "description": "Processing date in ISO format.",
      +        "minLength": 1,
      +        "type": "string"
      +      },
      +      "vatPercentage": {
      +        "description": "VAT percentage.",
      +        "type": "number"
      +      },
      +      "vatRateId": {
      +        "description": "BRC VAT rate id.",
      +        "exclusiveMinimum": 0,
      +        "maximum": 9007199254740991,
      +        "type": "integer"
      +      }
      +    },
      +    "required": [
      +      "customerId",
      +      "acCode",
      +      "note",
      +      "entryDate",
      +      "procDate",
      +      "bookTranTypeId",
      +      "analysisCategoryId",
      +      "accountCode",
      +      "description",
      +      "netAmount",
      +      "vatRateId",
      +      "vatPercentage"
      +    ],
      +    "type": "object"
      +  },
      +  "opCode": {
      +    "const": 1,
      +    "description": "BRC batch create operation code. Must be 1.",
      +    "type": "number"
      +  }
      +}
    • removedInput schema / properties / items / items / propertyNames
      Removed value: -{
      -  "type": "string"
      -}
    • addedInput schema / properties / items / items / required
      Added value: +[
      +  "opCode",
      +  "item"
      +]
    • removedInput schema / properties / priceBasis
      Removed value: -{
      -  "description": "Applies 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.",
      -  "enum": [
      -    "net",
      -    "gross"
      -  ],
      -  "type": "string"
      -}
  4. Changed2 schema fields changed
    • addedInput schema / properties / routeToken
      Added value: +{
      +  "description": "Opaque routeToken from brc_route_request for this action workflow. Required for transactional tools. Routing permission only — does not replace preview-before-posting or confirmWrite.",
      +  "minLength": 1,
      +  "type": "string"
      +}
    • changedInput schema / required
      Previous value: -[
      -  "companyName",
      -  "items"
      -]New value: +[
      +  "companyName",
      +  "items",
      +  "routeToken"
      +]
  5. Changed2 schema fields changed
    • removedInput schema / properties / routeToken
      Removed value: -{
      -  "description": "Opaque routeToken from brc_route_request for this action workflow. Required for transactional tools. Routing permission only — does not replace preview-before-posting or confirmWrite.",
      -  "minLength": 1,
      -  "type": "string"
      -}
    • changedInput schema / required
      Previous value: -[
      -  "companyName",
      -  "items",
      -  "routeToken"
      -]New value: +[
      +  "companyName",
      +  "items"
      +]
  6. Changed2 schema fields changed
    • addedInput schema / properties / routeToken
      Added value: +{
      +  "description": "Opaque routeToken from brc_route_request for this action workflow. Required for transactional tools. Routing permission only — does not replace preview-before-posting or confirmWrite.",
      +  "minLength": 1,
      +  "type": "string"
      +}
    • changedInput schema / required
      Previous value: -[
      -  "companyName",
      -  "items"
      -]New value: +[
      +  "companyName",
      +  "items",
      +  "routeToken"
      +]
  7. First observed

TDQS

A3.8/5.0
Behavior5/5

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

Goes well beyond the annotations (destructiveHint=true, readOnlyHint=false) by disclosing the whole write protocol: no automatic splitting, a hard ceiling of 100, preview/confirmation flow, confirmation_required return, that preflight is not confirmation, and that routeTokens cannot bypass preview. This is exactly the behavioral context an agent needs before mutating data.

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?

Front-loads purpose and then batches protocol details, but repeats itself: 'hard ceiling is 100, with no automatic splitting' is restated as 'Maximum 100 items per batch request,' which also duplicates the schema's maxItems note. Several sentences earn their place, yet the description is longer than it needs to be.

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?

Given no output schema and a nine-parameter nested mutation tool, the description covers routing, confirmation, counterparty scoping, and batching limits well. It is thin only on batch-level failure behavior (what happens if one of up to 100 items is rejected) and on return payload shape.

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 the description largely restates the schema's batchSize fallback chain, ceiling, and no-auto-split rules rather than adding new syntax or format detail. It reinforces semantics the agent will also read in the schema, so baseline 3 is appropriate.

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?

States a specific verb and resource (processes/batch sales entries) and adds scope detail: signed amounts, VAT lines, batching. It does not, however, differentiate itself from close siblings like brc_create_sales_entry or brc_batch_sales_invoices, so an agent must infer batch-vs-single from the name alone.

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?

The description gives rich conditional guidance for flags (when confirmWrite may be true, when a routeToken applies, when confirmCounterpartyExplicit is required), which is genuinely useful. But it never states when to choose this batch tool over brc_create_sales_entry or the other batch siblings — tool-selection guidance is only implied by the name.

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.