Skip to main content
Glama

Add journal line

add_journal_line

Add ONE debit or credit line to an EXISTING journal entry; to create a whole new entry use save_journal_entry, and to change a line already there use update_journal_line.

Input Schema

NameRequiredDescriptionDefault
idNoLine id (for updating an existing line).
roleNoOptional line role: what the amount is (e.g. sars-3601), set by the producer. Lowercase letters, digits and hyphens, at most 64 characters. Send "$delete" to clear it; omit it to leave it alone.
debitNoDebit amount for this line (0 if this is a credit line).
creditNoCredit amount for this line (0 if this is a debit line).
entryidNoId of the parent journal entry this line belongs to.
clientidNoPROD-2704. Optional: the customer (clientid) or supplier (supplierid) this line books to, at most one per line. It tags the line and adds no posting; the entry then shows on that contact's statement and balance. The id must be one of this business's clients or suppliers (see list_clients, list_suppliers). Send "$delete" to clear it; omit it or send null to leave it alone. Naming one kind clears the other.
accountidNoChart-of-accounts account id for this line (see list_accounts).
supplieridNoPROD-2704. Optional: the customer (clientid) or supplier (supplierid) this line books to, at most one per line. It tags the line and adds no posting; the entry then shows on that contact's statement and balance. The id must be one of this business's clients or suppliers (see list_clients, list_suppliers). Send "$delete" to clear it; omit it or send null to leave it alone. Naming one kind clears the other.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • addedInput schema / properties / clientid
      Added value: +{
      +  "description": "PROD-2704. Optional: the customer (clientid) or supplier (supplierid) this line books to, at most one per line. It tags the line and adds no posting; the entry then shows on that contact's statement and balance. The id must be one of this business's clients or suppliers (see list_clients, list_suppliers). Send \"$delete\" to clear it; omit it or send null to leave it alone. Naming one kind clears the other.",
      +  "type": "string"
      +}
    • addedInput schema / properties / supplierid
      Added value: +{
      +  "description": "PROD-2704. Optional: the customer (clientid) or supplier (supplierid) this line books to, at most one per line. It tags the line and adds no posting; the entry then shows on that contact's statement and balance. The id must be one of this business's clients or suppliers (see list_clients, list_suppliers). Send \"$delete\" to clear it; omit it or send null to leave it alone. Naming one kind clears the other.",
      +  "type": "string"
      +}
  2. Changed1 schema field changed
    • addedInput schema / properties / role
      Added value: +{
      +  "description": "Optional line role: what the amount is (e.g. sars-3601), set by the producer. Lowercase letters, digits and hyphens, at most 64 characters. Send \"$delete\" to clear it; omit it to leave it alone.",
      +  "type": "string"
      +}
  3. First observed

TDQS

A4.1/5.0
Behavior3/5

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

Annotations already declare this is a non-read-only but non-destructive mutation, and the description usefully clarifies that it appends a single line rather than replacing anything. It says nothing about preconditions an agent would care about though — whether the parent entry must be in an open/unlocked period, what happens if the entry does not exist, or whether debit/credit must balance at line level.

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

Conciseness5/5

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

A single front-loaded clause establishes the operation and its scope, then the same sentence names both alternatives — no wasted words and no burying of the key constraint.

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

Completeness3/5

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

For an eight-parameter tool with zero required parameters, the description never indicates the minimum viable call (entryid plus accountid plus one of debit/credit), which is a real risk of a malformed invocation. It is otherwise complete given full schema coverage and the absence of an output schema.

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 coverage is 100%, so the schema already explains all eight fields in detail, including the $delete sentinel and the clientid/supplierid mutual exclusion. The description only implies that a line carries a debit or credit amount; baseline 3 applies when the schema does the heavy 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 (add ONE debit or credit line) plus a hard scope constraint (to an EXISTING journal entry), which immediately separates it from entry-creation and line-editing siblings.

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?

Explicitly routes to save_journal_entry for a whole new entry and update_journal_line for changing an existing line, so the when-to-use and when-not-to-use conditions are both spelled out.

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