Skip to main content
Glama

create_gl_journal_entry

Create a draft journal entry by hand — accountant. It carries NO source document unless you name one.

Only the pipeline paths stamp source_ref_type/source_ref_id (an ingested document is 'item'), so by default a booking made here cannot be traced back to what justified it. document_id is the retrofit: name an existing gl_document (create one with POST …/gl/documents) and it is attached as the entry's source document, so the entry is not evidence-less. The same attach is available afterwards at POST …/gl/journal-entries/{id}/documents — including on a posted entry.

Use it for bookings with genuinely no document behind them — reclassifications, provisions, accruals, year-end adjustments. Do not transcribe a document into it and then attach the file — that files the evidence beside a booking nobody derived from it. Each of these has a door that keeps the evidence attached:

  • an invoice, receipt or statement → ingest the file (POST …/uploads/ or …/intake), then accept what the coder proposes (…/autopost-decisions);

  • an already-ingested item → POST …/gl/items/{item_id}/coding;

  • a bank movement with no document → POST /bank-entries/{entry_id}/manual-coding;

  • opening balances → POST …/opening-entries and post the proposal.

auto_reverse_date arms the entry as a one-shot accrual (ZCT-527): once posted, the auto-reversal executor reverses it in full on/after that date. It must be after posting_date (422 otherwise), and it can only be set while the entry is a draft — on the create here or on the PUT replace.

Drafts do not touch the books until …/post. See doc/pipeline.md §"Accounting".

On this MCP surface a null argument means "not provided": it is dropped before the request is sent, exactly as if the field were omitted.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "company_id": "<company_id>",
      "period_id": "<period_id>",
      "posting_date": "<posting_date>",
      "lines": "<lines>"
    },
    "name": "create_gl_journal_entry"
  }
}

Input Schema

NameRequiredDescriptionDefault
linesYes
currencyNo
period_idYes
company_idYes
entry_typeNomanual
descriptionNo
document_idNo
posting_dateYes
rebooks_entry_idNo
auto_reverse_dateNo
customs_assessmentNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / rebooks_entry_id
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ]
      +}
  2. Changed3 schema fields changed
    • addedInput schema / properties / customs_assessment
      Added value: +{
      +  "anyOf": [
      +    {
      +      "properties": {
      +        "assessed_on": {
      +          "description": "Assessment date: the input VAT is deducted in its VAT period (Art. 40(4) MWSTG), on the collected basis too.",
      +          "format": "date",
      +          "type": "string"
      +        },
      +        "assessed_vat_chf": {
      +          "anyOf": [
      +            {
      +              "minimum": 0,
      +              "type": "number"
      +            },
      +            {
      +              "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
      +              "type": "string"
      +            }
      +          ],
      +          "description": "Import VAT assessed, base currency ('additional': the increment). The VAT lines must sum to it, else 422."
      +        },
      +        "assessment_no": {
      +          "description": "The BAZG assessment (Veranlagungsverfügung) number.",
      +          "maxLength": 100,
      +          "minLength": 1,
      +          "type": "string"
      +        },
      +        "kind": {
      +          "default": "assessment",
      +          "description": "'additional': an additional assessment carrying only its increment. A replacement is refused: reverse the replaced booking first.",
      +          "enum": [
      +            "assessment",
      +            "additional"
      +          ],
      +          "type": "string"
      +        }
      +      },
      +      "required": [
      +        "assessment_no",
      +        "assessed_on",
      +        "assessed_vat_chf"
      +      ],
      +      "type": "object"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ]
      +}
    • addedInput schema / properties / lines / items / properties / dimension_value_id
      Added value: +{
      +  "anyOf": [
      +    {
      +      "maxLength": 21,
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ]
      +}
    • changedInput schema / properties / lines / items / properties / line_role / enum
      Previous value: -[
      -  "bank",
      -  "ar",
      -  "ap",
      -  "revenue",
      -  "expense",
      -  "vat",
      -  "payroll_liability",
      -  "salary_expense",
      -  "fixed_asset",
      -  "depreciation",
      -  "inventory",
      -  "cogs",
      -  "clearing",
      -  "rounding",
      -  "fx_gain_loss",
      -  "suspense"
      -]New value: +[
      +  "bank",
      +  "ar",
      +  "ap",
      +  "revenue",
      +  "expense",
      +  "vat",
      +  "payroll_liability",
      +  "salary_expense",
      +  "fixed_asset",
      +  "depreciation",
      +  "inventory",
      +  "cogs",
      +  "clearing",
      +  "rounding",
      +  "fx_gain_loss",
      +  "suspense",
      +  "inventory_count",
      +  "inventory_reserve"
      +]
  3. Changed1 schema field changed
    • addedInput schema / properties / lines / items / properties / chf_only
      Added value: +{
      +  "default": false,
      +  "type": "boolean"
      +}
  4. First observed

TDQS

A4.6/5.0
Behavior5/5

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

No annotations exist, so the description carries the full burden and does: it discloses that the entry starts as a draft, carries no source_ref_type/source_ref_id, is evidence-less by default, and that document attachment can happen later (including on a posted entry). It also details auto_reverse_date constraints (must be after posting_date, 422 otherwise, only settable while draft) and the MCP null-dropping behavior.

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 purpose and scope, then structured into alternative-route bullets and a parameter note. It is long but every block is substantive; the trailing doc reference and null-argument note are useful rather than filler.

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 mutation tool with no annotations and no output schema, the description covers draft lifecycle, evidence/traceability side effects, posting requirement, auto-reversal behavior, and routing to sibling workflows. The remaining gaps (several scalar params) are documented inside the schema's nested properties.

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 reported at 0%, so the description must compensate, and it does richly for document_id (retrofit attach, alternative endpoint) and auto_reverse_date (validation, lifecycle). However, it says nothing about rebooks_entry_id, customs_assessment, entry_type, currency, company_id/period_id, or the lines array, leaving much of the 11-param surface to the schema alone.

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 a **draft** journal entry by hand — accountant') and immediately marks the scope constraint (draft, no source document unless named). It distinguishes itself from the pipeline/ingest paths and from the post/reverse siblings by pointing at their endpoints.

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 when-to-use (reclassifications, provisions, accruals, year-end adjustments) and an explicit do-not-use rule ('Do not transcribe a document into it and then attach the file') with four named alternatives (uploads/intake, items/{id}/coding, bank-entries manual-coding, opening-entries). Nothing is left to inference.

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.

Resources