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.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "add_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.
currencyNoOptional. The currency this line's foreign amount is in. A line on a foreign-currency account takes the account's own; name one on a rand account only for an amount owed in another currency, such as a euro receivable.
accountidNoChart-of-accounts account id for this line (see list_accounts).
employeeidNoPROD-3206. Optional: the employee this line books to, such as a PAYE correction (see list_employees). A line names one contact at most: a customer, a supplier or an employee. A line on PAYE Payable with role sars-4102, tagged to an employee, counts in EMP201 and EMP501 and on that employee's IRP5. Send "$delete" to clear it; omit it or send null to leave it alone. Needs payroll access: without it the write is refused, as is any change to a journal that already names an employee.
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.
exchangerateNoOptional. Base currency per ONE unit of that currency, as booked (20.0480 rand per euro). Omitted, it is the line's rand amount over its foreign amount.
foreignamountNoOptional. The line's amount in that currency, positive, as booked: €1,250.00 of a R25,060.00 line. Kept as written and never converted again. Omitted on a foreign-currency account, stub works it out at the business's closing rate for the day, else its daily rate.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • changedInput schema / properties / exchangerate / description
      Previous value: -"Optional. Base currency per ONE unit of that currency, as booked (19.1938 rand per euro). Omitted, it is the line's rand amount over its foreign amount."New value: +"Optional. Base currency per ONE unit of that currency, as booked (20.0480 rand per euro). Omitted, it is the line's rand amount over its foreign amount."
    • changedInput schema / properties / foreignamount / description
      Previous value: -"Optional. The line's amount in that currency, positive, as booked: €881.17 of a R16,912.33 line. Kept as written and never converted again. Omitted on a foreign-currency account, stub works it out at the business's closing rate for the day, else its daily rate."New value: +"Optional. The line's amount in that currency, positive, as booked: €1,250.00 of a R25,060.00 line. Kept as written and never converted again. Omitted on a foreign-currency account, stub works it out at the business's closing rate for the day, else its daily rate."
  2. Changed3 schema fields changed
    • addedInput schema / properties / currency
      Added value: +{
      +  "description": "Optional. The currency this line's foreign amount is in. A line on a foreign-currency account takes the account's own; name one on a rand account only for an amount owed in another currency, such as a euro receivable.",
      +  "type": "string"
      +}
    • addedInput schema / properties / exchangerate
      Added value: +{
      +  "description": "Optional. Base currency per ONE unit of that currency, as booked (19.1938 rand per euro). Omitted, it is the line's rand amount over its foreign amount.",
      +  "type": "number"
      +}
    • addedInput schema / properties / foreignamount
      Added value: +{
      +  "description": "Optional. The line's amount in that currency, positive, as booked: €881.17 of a R16,912.33 line. Kept as written and never converted again. Omitted on a foreign-currency account, stub works it out at the business's closing rate for the day, else its daily rate.",
      +  "type": "number"
      +}
  3. Changed1 schema field changed
    • addedInput schema / properties / employeeid
      Added value: +{
      +  "description": "PROD-3206. Optional: the employee this line books to, such as a PAYE correction (see list_employees). A line names one contact at most: a customer, a supplier or an employee. A line on PAYE Payable with role sars-4102, tagged to an employee, counts in EMP201 and EMP501 and on that employee's IRP5. Send \"$delete\" to clear it; omit it or send null to leave it alone. Needs payroll access: without it the write is refused, as is any change to a journal that already names an employee.",
      +  "type": "string"
      +}
  4. 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"
      +}
  5. 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"
      +}
  6. First observed

TDQS

A4.4/5.0
Behavior4/5

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

Annotations only declare readOnlyHint=false and destructiveHint=false, so the write-safety profile is given; the description adds the genuinely useful constraints that only one line is added per call and that the parent entry must already exist. It does not say which fields are effectively mandatory (the schema marks none as required despite entryid/accountid being needed) nor flag the payroll-access restriction that the schema mentions.

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 sentence that front-loads the action and scope, then dispatches to the two alternatives. No filler, no repetition of the title.

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 12-parameter mutation tool with no output schema and minimal annotations, the description covers selection and routing well; the heavy lifting on field semantics is done in the schema. The remaining gap is that nothing tells the agent what a minimally valid line looks like when the schema declares zero required parameters.

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 parameter docs are unusually rich (the $delete sentinel, foreign-currency rate handling, contact tagging semantics), so the description correctly stays out of parameter territory. Baseline 3 applies because it adds no meaning beyond the schema.

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 description gives a specific verb and resource ('Add ONE debit or credit line') plus an explicit scope constraint ('to an EXISTING journal entry'), then names the two siblings it is not: save_journal_entry for new entries and update_journal_line for editing. An agent can distinguish this from every neighbouring tool without opening a 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?

It states both when to use this tool (appending a single line to an entry that already exists) and when not to, with the alternative named for each excluded case. The 'ONE line' emphasis also tells the agent to call it repeatedly rather than batch.

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