edi_build
Compiles structured JSON into standards-valid X12. The parts that get documents rejected are exactly the parts a language model cannot hold in its head: the 856 hierarchy needs sequential HL IDs where every level names its parent's ID, and on a multi-carton, multi-SKU shipment that bookkeeping go...
This record as markdown: /tools/com-fluentedi-tools/edi-build.md
What edi_build does on Tools
AI agents invoke edi_build to trigger actions in Tools. What it does depends on the arguments the agent supplies, and its effects often reach beyond the immediate call: builds kicked off, notifications sent, workflows started.
| Parameter | Type | Required | Description |
|---|---|---|---|
data | object | Yes | Document content. For 856: {shipment_id, ship_date, orders:[{po_number, packs:[{sscc, items:[{upc, quantity, unit}]}]}], parties:[{role,name,id}]}. For 850: {po |
document | string | — | Transaction set to build. |
sender_id | string | — | ISA06 sender identifier. |
timestamp | string | — | ISO instant for the envelope date/time. Defaults to now. |
receiver_id | string | — | ISA08 receiver identifier. |
control_number | integer | — | Interchange control number (ISA13). Also seeds GS06 and ST02. |
test_indicator | boolean | — | Mark the interchange as test (ISA15 = T) rather than production (P). |
include_envelope | boolean | — | Wrap the transaction set in ISA/GS ... GE/IEA. |
sender_qualifier | string | — | ISA05 qualifier, e.g. ZZ, 01 (DUNS), 12 (phone). |
receiver_qualifier | string | — | ISA07 qualifier. |
Parameters from the server's own tool schema.
Why edi_build is rated High
edi_build triggers real processes with real consequences. An agent gone sideways doesn't fire it once. It starts dozens of builds, sends mass notifications, or burns through compute before anyone looks up.
Risk signalsHigh parameter count (10 properties) · Bulk/mass operation — affects multiple targets
Attacks that exploit this kind of access
The rule that runs edi_build safely
PolicyLayer is an MCP gateway: it sits between your AI agents and Tools, and checks every tool call against a rule you set before the call runs. Nothing changes on the server itself. For edi_build, this is the rule to start with:
edi_build stays usable, but rate-capped: a runaway agent can't fire it dozens of times a minute. Everything else on the server is denied unless you say otherwise.
The button opens the PolicyLayer dashboard: create your workspace, connect Tools, apply this rule, and every edi_build call is checked against it from then on.
Questions about edi_build
Compiles structured JSON into standards-valid X12. The parts that get documents rejected are exactly the parts a language model cannot hold in its head: the 856 hierarchy needs sequential HL IDs where every level names its parent's ID, and on a multi-carton, multi-SKU shipment that bookkeeping goes wrong silently. The ISA header is fixed-width — 106 characters exactly, every element space-padded to size — and one character out crashes the receiver's translator. Segment counts in SE01, CTT01, GE01 and IEA01 must agree with what was actually emitted. All of that is computed here rather than written by hand. It is categorised as a Execute tool in the Tools MCP Server, which means it can trigger actions or run processes. Use rate limits and argument validation.
edi_build accepts 10 parameters: data, document, sender_id, timestamp, receiver_id, control_number, test_indicator, include_envelope, sender_qualifier, receiver_qualifier. Required: data. The full parameter table on this page comes from the server's own tool schema.
Register the Tools MCP server in PolicyLayer and add a rule for edi_build: allow, deny, rate-limit, or require approval. Point your MCP client at the PolicyLayer proxy URL and the rule is enforced on every call, before it reaches Tools. Nothing to install.
edi_build is a Execute tool with high risk. Execute tools should be rate-limited and have argument validation enabled.
Yes. Add a rate_limit block to the edi_build rule in your PolicyLayer policy. For example, setting max: 10 and window: 60 limits the tool to 10 calls per minute. Rate limits are tracked per agent session and reset automatically.
Set action: deny in the PolicyLayer policy for edi_build. The AI agent will receive a policy violation error and cannot call the tool. You can also include a reason field to explain why the tool is blocked.
edi_build is provided by the Tools MCP server (https://fluentedi.com/mcp). PolicyLayer sits as a proxy in front of this server to enforce policies before tool calls reach the server.
More on Tools, and thousands of servers like it.
This server
Across the catalogue