Skip to main content
Glama

Update journal line

update_journal_line

Change ONE debit or credit line of an existing journal entry in place; to rewrite the whole entry use save_journal_entry, and to add a line use add_journal_line. Changes its account, debit or credit amount; identify the line by its id.

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": "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.
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.3/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=false and destructiveHint=false, so the safety profile is known; the description usefully adds the blast radius ('in place', 'ONE ... line') and that identification is by line id. It does not disclose the auth constraint that the schema mentions (payroll access required, writes refused on entries already naming an employee), nor the '$delete' sentinel conventions, so it stops short of rich behavioral context.

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?

Two sentences, front-loaded with the scope constraint and the routing to alternatives, with no filler or restatement of the tool title.

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 a 12-parameter mutation tool with no output schema, the description is thin: it implies only account and amount can change, omitting contact tagging (client/supplier/employee), currency and foreign-amount handling, and line roles that the schema actually supports. It is adequate because the schema descriptions are exhaustive, but an agent reading only the prose would under-estimate what this tool can modify.

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%, so parameter meaning is already fully carried by the schema and the baseline of 3 applies. The description only names three of the twelve updatable dimensions (account, debit, credit) and the id, adding negligible meaning beyond the structured fields.

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 (change) and resource (one debit or credit line of an existing journal entry), scopes it to exactly ONE line, and explicitly names the two siblings it is not (save_journal_entry for full rewrite, add_journal_line for additions). An agent can distinguish this from alternatives without opening any 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?

Gives explicit when-to-use routing: edit a single existing line with this tool, rewrite the whole entry with save_journal_entry, add a new line with add_journal_line. Both alternatives carry the condition that selects them, so 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