Skip to main content
Glama

Create mapping association

create-mapping-association
DestructiveIdempotent

Link 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

NameRequiredDescriptionDefault
reasonNoWhy the account is reclassified. Recorded on the new arc beside the months it reaches.
weightNoCalculation weight (typically +1.0 or -1.0). Used by calculation linkbases to express signed roll-ups.
confidenceNoConfidence score (0–1). For AI-suggested mappings: ≥0.90 auto-approved, 0.70–0.89 flagged for review, <0.70 skipped.
mapping_idYesTarget mapping structure ID.
order_valueNoDisplay order within the structure (lower = earlier).
suggested_byNoSource of the suggestion (e.g., 'mapping_agent', 'user'). Captured for audit; not used by the runtime.
to_element_idYesTarget element (typically a US GAAP reporting concept).
from_element_idYesSource element (typically a CoA element).
association_typeNoEdge 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_idNoThe 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.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.7/5.0
Behavior5/5

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

Annotations only declare the safety profile (readOnly=false, destructive=true, idempotent=true, openWorld=false); the description goes well beyond it, disclosing concrete failure modes (409 on duplicate tuples, 422 on leaf/subtotal targets, 422 on closed-month arcs), what is destroyed by `replaces_association_id` (the current arc, removed in the same write), and what `reclassified_periods` reports. The 409-on-duplicate behavior is consistent with idempotentHint rather than contradicting it.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded with the core action and the bulk alternative, then the error semantics, then the remap path. Dense but nearly every clause carries decision-relevant information; the closing explanation of cross-statement restatement is slightly long relative to its likelihood of use.

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?

For a 10-parameter mutation with no output schema, the description covers the mutation's effects, its refusal cases, and the field returned on a successful reclassification. What is missing is only a short statement of the success payload shape for the ordinary (non-reclassification) case.

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%, so the baseline is 3, but the prose adds real meaning the schema does not: the closed-month reclassification rules governing `replaces_association_id` and the same-statement versus cross-statement distinction. It does not explain `weight`, `confidence`, or `order_value` in prose, relying on the already-detailed schema entries for those.

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?

The first sentence names a specific verb and both resources: "Link a chart-of-accounts element to a US GAAP reporting concept." It immediately scopes the tool to a single edge per call and names the sibling (`auto-map-elements`) that does bulk work, so an agent can distinguish it without opening the schema.

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?

Explicit routing: use this for one edge, use `auto-map-elements` for bulk AI-assisted mapping. It also states timing constraints ("Map before you close") and the correct escape hatch (`replaces_association_id`) for moving an account, plus the exact conditions under which a move is allowed versus refused.

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.