Skip to main content
Glama

Initialize chart of accounts

initialize-chart-of-accounts
Idempotent

Create the graph's chart of accounts from a shipped template — the fresh-company path to native books. Use when the graph has NO chart (a QuickBooks-synced tenant never needs this: its chart arrives with the sync and stays after a sever) and before connecting a bank feed, which needs a chart to resolve against. Templates: saas (subscription software), services (professional services), product (inventory and COGS), consolidation (a group's consolidation entity — the adjustments column, never an operating company's chart). Creates the chart, its coa_mapping structure and the template's CoA → rs-gaap mapping associations in one transaction, with the equity rows mapped by the entity's legal form (entity_type, defaulting to the entity's). Each entity of the group keeps its own chart: entity_id names a subsidiary, omitted means the group parent. One-time per entity: 409 once that entity has a chart — a chart is never replaced. Customize afterwards with update-taxonomy-block; accounts that carry activity are never deleted.

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": {
      "template": "saas"
    },
    "name": "initialize-chart-of-accounts"
  }
}

Input Schema

NameRequiredDescriptionDefault
nameNoChart display name. Defaults to 'Chart of Accounts'.
templateYesTemplate key: `saas` (subscription software — deferred revenue, cost of revenue, R&D / S&M / G&A), `services` (professional services — no inventory, no COGS), `product` (inventory and cost of goods sold, direct + wholesale + subscription revenue), `consolidation` (a group's consolidation entity: the eliminated investment, intercompany and subsidiary-equity rows, noncontrolling interest and its share of income — the adjustments column, never an operating company's chart).
entity_idNoThe entity to give a chart to, by id. Omit for the group parent. A sibling already having one is no bar.
entity_typeNoLegal form for the equity mapping: `corporation`, `llc` or `partnership` have rows of their own; any other form maps as a corporation. Defaults to the graph's primary entity, then to corporation.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.6/5.0
Behavior5/5

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

Goes well past annotations: one transaction creating chart plus coa_mapping plus rs-gaap associations, a 409 refusal once the entity has a chart, 'a chart is never replaced', and 'accounts that carry activity are never deleted'. These detail the failure mode and irreversibility that destructiveHint=false alone does not convey. The 409-on-repeat sits slightly awkwardly beside idempotentHint=true, but state is unchanged on retry, so it reads as a consistent clarification rather than a contradiction.

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-loads the action and the primary when-to-use test, then layers templates, transaction scope, entity scoping, and the 409 rule in a logical order. Mild redundancy: the four template meanings are enumerated here and again in the schema's enum description, which spends words the agent will see twice.

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

Completeness5/5

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

For a one-shot mutation with no output schema, it covers everything needed to call correctly: required template, entity scoping, equity-mapping default, atomicity of the write, the refusal condition, and the follow-up tool. Nothing material is left for the agent to infer.

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 schema already documents template keys, entity_id omission behavior, and entity_type defaulting, so the description largely mirrors structured data. What it does add is contextual: 'Each entity of the group keeps its own chart', 'entity_id names a subsidiary, omitted means the group parent', and that equity rows are mapped by legal form, defaulting to the entity's. Useful framing, but mostly restatement — baseline 3 when the schema does the lifting.

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?

States a specific verb and resource ('Create the graph's chart of accounts from a shipped template') and immediately scopes it as 'the fresh-company path to native books'. It clearly separates itself from update-taxonomy-block (customization afterwards) and from initialize-fiscal-calendar by naming the artifact it produces (chart, coa_mapping structure, mapping associations).

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?

Gives an explicit precondition ('Use when the graph has NO chart'), an explicit exclusion/alternative ('a QuickBooks-synced tenant never needs this: its chart arrives with the sync'), an ordering constraint ('before connecting a bank feed'), and a handoff ('Customize afterwards with update-taxonomy-block'). This is the when/when-not/alternatives bar at its fullest.

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.