Skip to main content
Glama
loldwyer

Red MCP Server

by loldwyer

brc_create_purchase_gen_ref

Create a purchase with an auto-generated reference after reviewing a draft and confirming the supplier explicitly.

Instructions

Creates a Purchases Book purchase with a generated reference using structured fields. Use when the company is configured for auto-generated purchase references. 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
noteYes
acCodeYes
procDateYes
entryDateYes
netAmountYes
vatRateIdYes
supplierIdYes
accountCodeYes
companyNameYesCompany context name, for example YOUR-COMPANY-NAME.
descriptionYes
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.
vatPercentageYes
bookTranTypeIdYes
analysisCategoryIdYes
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.
Behavior4/5

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

No annotations provided, so description carries full burden. Explains the two-step commit pattern, preflight response, and explicit confirmation requirements. Could add details on error handling or response format, but covers essential behavioral traits.

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?

Single paragraph with several sentences that convey necessary workflow steps. Some redundancy (e.g., 'retry with confirmWrite: true only after explicit user confirmation' is restated). Could be more structured with bullet points for clarity.

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

Completeness2/5

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

High number of parameters (15) and no output schema. Description covers agreement flow but omits explanation of core financial fields (netAmount, vatRateId, etc.), return values, or error scenarios. Incomplete for practical use without supplementary parameter documentation.

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

Parameters2/5

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

Schema coverage is only 20% with descriptions only for companyName, confirmWrite, and confirmCounterpartyExplicit. The description adds value for these two boolean flags, but over 13 other parameters (e.g., supplierId, acCode, netAmount) have no additional explanation. Fails to compensate for low schema coverage.

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?

Clearly states it creates a purchase with a generated reference. Lacks explicit differentiation from sibling brc_create_purchase for manual references, but the condition 'Use when the company is configured for auto-generated purchase references' provides context.

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?

Explicitly states when to use ('Use when the company is configured for auto-generated purchase references') and provides a detailed workflow: first call without confirmWrite, show draft, then retry with confirmWrite after user confirmation. Also covers counterparty confirmation and warns against reusing counterparty from earlier drafts.

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