Create mapping association
create-mapping-associationLink a chart-of-accounts element to a US GAAP reporting concept. One mapping edge per call — use auto-map-elements for bulk AI-assisted mapping. Duplicate (from, to, type) tuples return 409. The target must be a leaf concept: a subtotal the statement sums from its children is refused (422). Map before you close: a new arc for an account with landed history in a closed month is refused (422), since the month's stamped statements were computed through the arcs as they stood. To move such an account, pass replaces_association_id (its current arc, removed in the same write). A move within the same primary statement is a reclassification and goes through: the stamped statements keep the answer as closed, live renders follow the new arc, and reclassified_periods names the months. A move across statements restates net income and is refused, naming the months to reopen latest-first.
Example tool call
This call uses example arguments supplied in the tool’s input schema.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"weight": 1,
"confidence": 0.95,
"mapping_id": "map_01HVF8T0M2YTAY3BBNRH0V0",
"suggested_by": "user",
"to_element_id": "elem_usgaap_Revenues",
"from_element_id": "elem_coa_revenue_product",
"association_type": "mapping"
},
"name": "create-mapping-association"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| reason | No | Why the account is reclassified. Recorded on the new arc beside the months it reaches. | |
| weight | No | Calculation weight (typically +1.0 or -1.0). Used by calculation linkbases to express signed roll-ups. | |
| confidence | No | Confidence score (0–1). For AI-suggested mappings: ≥0.90 auto-approved, 0.70–0.89 flagged for review, <0.70 skipped. | |
| mapping_id | Yes | Target mapping structure ID. | |
| order_value | No | Display order within the structure (lower = earlier). | |
| suggested_by | No | Source of the suggestion (e.g., 'mapping_agent', 'user'). Captured for audit; not used by the runtime. | |
| to_element_id | Yes | Target element (typically a US GAAP reporting concept). | |
| from_element_id | Yes | Source element (typically a CoA element). | |
| association_type | No | Edge semantics. `mapping` rolls up CoA elements into reporting concepts; `presentation` orders concepts in a structure; `calculation` carries debit/credit weights; `equivalence` is a synonym link. | mapping |
| replaces_association_id | No | The account's current mapping arc in this structure, removed in the same write: a remap in one call. When the account has landed history in a closed month the move is judged as a reclassification: allowed when the new concept sits on the same primary statement as the old one (the stamped statements keep the answer as closed; live renders follow the new arc; `reclassified_periods` names the months), refused when it crosses one. |