Skip to main content
Glama

Tokenbooks - crypto and fiat accounting and payments

Get Journal Entry

get_journal_entry
Read-onlyIdempotent

Read every debit and credit line in one journal entry—the detailed accounting record—and trace each line to its cost-basis records and blockchain movements.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
portfolioRefYesPortfolio exact name or slug
workspaceRefYesWorkspace exact name or slug
journalEntryIdYesJournal entry ID

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYes
memoNo
linesYes
statusYes
subTypeNo
timestampYes
systemNotesNo
isAdjustmentYes
operationTypeNo
portfolioTransactionIdNo
adjustmentJournalImportProvenanceNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • removedOutput schema / properties / adjustmentJournalImportProvenance / properties / sourceRows / items / properties / journalLineNumber / exclusiveMinimum
      Removed value: -0
    • addedOutput schema / properties / adjustmentJournalImportProvenance / properties / sourceRows / items / properties / journalLineNumber / minimum
      Added value: +1
  2. Changed1 schema field changed
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "$schema": "https://json-schema.org/draft/2020-12/schema",
      +  "additionalProperties": false,
      +  "properties": {
      +    "adjustmentJournalImportProvenance": {
      +      "additionalProperties": false,
      +      "properties": {
      +        "importRef": {
      +          "maxLength": 128,
      +          "minLength": 1,
      +          "pattern": "^adjustment-journal-import-[a-z0-9-]+$",
      +          "type": "string"
      +        },
      +        "sourceFile": {
      +          "additionalProperties": false,
      +          "properties": {
      +            "name": {
      +              "minLength": 1,
      +              "type": "string"
      +            },
      +            "uploadedAt": {
      +              "format": "date-time",
      +              "type": "string"
      +            },
      +            "uploader": {
      +              "additionalProperties": false,
      +              "properties": {
      +                "name": {
      +                  "minLength": 1,
      +                  "type": "string"
      +                }
      +              },
      +              "required": [
      +                "name"
      +              ],
      +              "type": "object"
      +            }
      +          },
      +          "required": [
      +            "name",
      +            "uploadedAt",
      +            "uploader"
      +          ],
      +          "type": "object"
      +        },
      +        "sourceRows": {
      +          "items": {
      +            "additionalProperties": false,
      +            "properties": {
      +              "appliedResolutions": {
      +                "additionalProperties": false,
      +                "properties": {
      +                  "schemaVersion": {
      +                    "const": 1,
      +                    "type": "number"
      +                  },
      +                  "values": {
      +                    "additionalProperties": {
      +                      "minLength": 1,
      +                      "type": "string"
      +                    },
      +                    "propertyNames": {
      +                      "anyOf": [
      +                        {
      +                          "enum": [
      +                            "accountNumber",
      +                            "counterpartyExternalId",
      +                            "counterpartyName"
      +                          ],
      +                          "type": "string"
      +                        },
      +                        {
      +                          "pattern": "^responsibilityCenter:[a-z0-9]+(_[a-z0-9]+)*$",
      +                          "type": "string"
      +                        }
      +                      ]
      +                    },
      +                    "type": "object"
      +                  }
      +                },
      +                "required": [
      +                  "schemaVersion",
      +                  "values"
      +                ],
      +                "type": "object"
      +              },
      +              "entryId": {
      +                "minLength": 1,
      +                "type": "string"
      +              },
      +              "journalLineNumber": {
      +                "exclusiveMinimum": 0,
      +                "maximum": 9007199254740991,
      +                "type": "integer"
      +              },
      +              "locator": {
      +                "oneOf": [
      +                  {
      +                    "additionalProperties": false,
      +                    "properties": {
      +                      "format": {
      +                        "const": "csv",
      +                        "type": "string"
      +                      },
      +                      "lineNumber": {
      +                        "maximum": 9007199254740991,
      +                        "minimum": 1,
      +                        "type": "integer"
      +                      }
      +                    },
      +                    "required": [
      +                      "format",
      +                      "lineNumber"
      +                    ],
      +                    "type": "object"
      +                  },
      +                  {
      +                    "additionalProperties": false,
      +                    "properties": {
      +                      "format": {
      +                        "const": "xlsx",
      +                        "type": "string"
      +                      },
      +                      "rowNumber": {
      +                        "maximum": 9007199254740991,
      +                        "minimum": 1,
      +                        "type": "integer"
      +                      },
      +                      "sheetName": {
      +                        "minLength": 1,
      +                        "type": "string"
      +                      }
      +                    },
      +                    "required": [
      +                      "format",
      +                      "rowNumber",
      +                      "sheetName"
      +                    ],
      +                    "type": "object"
      +                  }
      +                ]
      +              },
      +              "normalizedValues": {
      +                "anyOf": [
      +                  {
      +                    "additionalProperties": false,
      +                    "properties": {
      +                      "schemaVersion": {
      +                        "const": 1,
      +                        "type": "number"
      +                      },
      +                      "values": {
      +                        "additionalProperties": {
      +                          "anyOf": [
      +                            {
      +                              "type": "string"
      +                            },
      +                            {
      +                              "type": "null"
      +                            }
      +                          ]
      +                        },
      +                        "propertyNames": {
      +                          "anyOf": [
      +                            {
      +                              "enum": [
      +                                "accountNumber",
      +                                "amount",
      +                                "counterpartyExternalId",
      +                                "counterpartyName",
      +                                "direction",
      +                                "effectiveDate",
      +                                "entryId",
      +                                "memo"
      +                              ],
      +                              "type": "string"
      +                            },
      +                            {
      +                              "pattern": "^responsibilityCenter:[a-z0-9]+(_[a-z0-9]+)*$",
      +                              "type": "string"
      +                            }
      +                          ]
      +                        },
      +                        "type": "object"
      +                      }
      +                    },
      +                    "required": [
      +                      "schemaVersion",
      +                      "values"
      +                    ],
      +                    "type": "object"
      +                  },
      +                  {
      +                    "additionalProperties": false,
      +                    "properties": {
      +                      "schemaVersion": {
      +                        "const": 2,
      +                        "type": "number"
      +                      },
      +                      "values": {
      +                        "additionalProperties": {
      +                          "anyOf": [
      +                            {
      +                              "type": "string"
      +                            },
      +                            {
      +                              "type": "null"
      +                            }
      +                          ]
      +                        },
      +                        "propertyNames": {
      +                          "anyOf": [
      +                            {
      +                              "enum": [
      +                                "accountNumber",
      +                                "amount",
      +                                "counterpartyExternalId",
      +                                "counterpartyName",
      +                                "direction",
      +                                "effectiveAt",
      +                                "effectiveDate",
      +                                "entryId",
      +                                "memo"
      +                              ],
      +                              "type": "string"
      +                            },
      +                            {
      +                              "pattern": "^responsibilityCenter:[a-z0-9]+(_[a-z0-9]+)*$",
      +                              "type": "string"
      +                            }
      +                          ]
      +                        },
      +                        "type": "object"
      +                      }
      +                    },
      +                    "required": [
      +                      "schemaVersion",
      +                      "values"
      +                    ],
      +                    "type": "object"
      +                  }
      +                ]
      +              },
      +              "sourceRowHash": {
      +                "minLength": 1,
      +                "type": "string"
      +              }
      +            },
      +            "required": [
      +              "appliedResolutions",
      +              "entryId",
      +              "journalLineNumber",
      +              "locator",
      +              "normalizedValues",
      +              "sourceRowHash"
      +            ],
      +            "type": "object"
      +          },
      +          "minItems": 1,
      +          "type": "array"
      +        }
      +      },
      +      "required": [
      +        "importRef",
      +        "sourceFile",
      +        "sourceRows"
      +      ],
      +      "type": "object"
      +    },
      +    "id": {
      +      "type": "string"
      +    },
      +    "isAdjustment": {
      +      "type": "boolean"
      +    },
      +    "lines": {
      +      "items": {
      +        "additionalProperties": false,
      +        "properties": {
      +          "accountName": {
      +            "type": "string"
      +          },
      +          "accountNormalBalanceType": {
      +            "type": "string"
      +          },
      +          "accountNumber": {
      +            "type": "string"
      +          },
      +          "accountSubType": {
      +            "type": "string"
      +          },
      +          "accountType": {
      +            "type": "string"
      +          },
      +          "assetAmount": {
      +            "type": "string"
      +          },
      +          "assetId": {
      +            "type": "string"
      +          },
      +          "assetSymbol": {
      +            "type": "string"
      +          },
      +          "counterpartyName": {
      +            "type": "string"
      +          },
      +          "entryType": {
      +            "type": "string"
      +          },
      +          "fiatAmount": {
      +            "type": "string"
      +          },
      +          "lineNumber": {
      +            "maximum": 9007199254740991,
      +            "minimum": -9007199254740991,
      +            "type": "integer"
      +          },
      +          "lot": {
      +            "additionalProperties": false,
      +            "properties": {
      +              "entryId": {
      +                "type": "string"
      +              },
      +              "entryKind": {
      +                "type": "string"
      +              },
      +              "id": {
      +                "type": "string"
      +              },
      +              "lotMethod": {
      +                "type": "string"
      +              }
      +            },
      +            "required": [
      +              "id",
      +              "entryId",
      +              "entryKind",
      +              "lotMethod"
      +            ],
      +            "type": "object"
      +          },
      +          "memo": {
      +            "type": "string"
      +          },
      +          "responsibilityCenterAssignments": {
      +            "items": {
      +              "additionalProperties": false,
      +              "properties": {
      +                "percentageBps": {
      +                  "maximum": 9007199254740991,
      +                  "minimum": -9007199254740991,
      +                  "type": "integer"
      +                },
      +                "responsibilityCenterCode": {
      +                  "type": "string"
      +                },
      +                "responsibilityCenterId": {
      +                  "type": "string"
      +                },
      +                "responsibilityCenterName": {
      +                  "type": "string"
      +                },
      +                "responsibilityCenterType": {
      +                  "additionalProperties": false,
      +                  "properties": {
      +                    "key": {
      +                      "type": "string"
      +                    },
      +                    "kind": {
      +                      "enum": [
      +                        "COST",
      +                        "REVENUE",
      +                        "PROFIT",
      +                        "INVESTMENT"
      +                      ],
      +                      "type": "string"
      +                    },
      +                    "name": {
      +                      "type": "string"
      +                    }
      +                  },
      +                  "required": [
      +                    "key",
      +                    "name",
      +                    "kind"
      +                  ],
      +                  "type": "object"
      +                },
      +                "responsibilityCenterTypeId": {
      +                  "type": "string"
      +                },
      +                "value": {
      +                  "type": "string"
      +                }
      +              },
      +              "required": [
      +                "responsibilityCenterTypeId",
      +                "responsibilityCenterId",
      +                "value",
      +                "responsibilityCenterType",
      +                "responsibilityCenterName",
      +                "percentageBps"
      +              ],
      +              "type": "object"
      +            },
      +            "type": "array"
      +          },
      +          "transfer": {
      +            "additionalProperties": false,
      +            "properties": {
      +              "chainId": {
      +                "type": "string"
      +              },
      +              "txHash": {
      +                "type": "string"
      +              },
      +              "txIndex": {
      +                "maximum": 9007199254740991,
      +                "minimum": -9007199254740991,
      +                "type": "integer"
      +              }
      +            },
      +            "type": "object"
      +          }
      +        },
      +        "required": [
      +          "lineNumber",
      +          "entryType",
      +          "fiatAmount",
      +          "responsibilityCenterAssignments"
      +        ],
      +        "type": "object"
      +      },
      +      "type": "array"
      +    },
      +    "memo": {
      +      "type": "string"
      +    },
      +    "operationType": {
      +      "type": "string"
      +    },
      +    "portfolioTransactionId": {
      +      "type": "string"
      +    },
      +    "status": {
      +      "type": "string"
      +    },
      +    "subType": {
      +      "type": "string"
      +    },
      +    "systemNotes": {
      +      "type": "string"
      +    },
      +    "timestamp": {
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "id",
      +    "timestamp",
      +    "status",
      +    "isAdjustment",
      +    "lines"
      +  ],
      +  "type": "object"
      +}
  3. First observed

TDQS

A4/5.0
Behavior4/5

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

Annotations already establish that this is read-only, idempotent, and non-destructive. The description adds meaningful context by disclosing that each line is traced to cost-basis records and blockchain movements, which goes beyond the annotations. No contradiction with the annotations was found.

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 core action and then adds useful tracing context. No filler, no repetition of schema information, and every clause contributes to understanding the tool.

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?

With an output schema present and annotations covering safety and idempotency, the description does not need to explain return values or side effects. It is complete for a read operation, though explicit routing guidance relative to sibling tools would make it fully self-contained.

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?

The input schema covers all three required parameters with descriptions, including exact name/slug semantics for workspace and portfolio and the journal entry ID. The description does not add parameter-level detail beyond the schema, so the baseline score of 3 is appropriate.

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 opens with 'Read every debit and credit line in one journal entry', giving a specific verb, resource, and scope. 'Detailed accounting record' clarifies what a journal entry is, and the tracing clause distinguishes this tool from broader list/lot tools.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies the tool is for retrieving a single journal entry's full detail and tracing it to related records. However, it does not state explicit when-to-use conditions, exclusions, or alternatives such as get_lot_ledger, so guidance remains implicit rather than explicit.

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