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

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

Output 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 / $schema
      Removed value: -"https://json-schema.org/draft/2020-12/schema"
    • changedOutput schema / properties / adjustmentJournalImportProvenance / properties / sourceRows / items / properties / normalizedValues / anyOf
      Previous value: -[
      -  {
      -    "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"
      -  }
      -]New value: +[
      +  {
      +    "additionalProperties": false,
      +    "properties": {
      +      "schemaVersion": {
      +        "const": 1,
      +        "type": "number"
      +      },
      +      "values": {
      +        "additionalProperties": {
      +          "type": [
      +            "string",
      +            "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": {
      +          "type": [
      +            "string",
      +            "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"
      +  }
      +]
  2. 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
  3. 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"
      +}
  4. First observed

TDQS

B3.4/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true, idempotentHint=true, and destructiveHint=false, so the safety and repeatability profile is fully covered without the description. The description's contribution is a sketch of the returned data (debit/credit lines, cost-basis tracing, blockchain movements), which overlaps with the existing output schema, and it says nothing about error behavior, permissions, or missing-entry handling.

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?

A single front-loaded sentence that leads with the core action and scope. Slightly padded by the parenthetical gloss 'the detailed accounting record', which restates what a journal entry already is.

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 read-only single-record fetch, the definition supplies the scope, the three required identifiers are fully documented in the schema, the output schema handles return-value detail, and annotations cover the safety profile. Nothing essential to calling it correctly is missing.

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%, with all three required parameters (workspaceRef, portfolioRef, journalEntryId) documented in the schema itself. The description adds no additional parameter meaning, so the baseline of 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description uses a specific verb ('Read') with a clearly bounded resource ('every debit and credit line in one journal entry'), and clarifies the depth of the record by mentioning cost-basis records and blockchain movements. An agent can tell this fetches a single entry rather than a list. However, it never names or contrasts itself with close siblings such as get_lot_ledger or list_journal_line_assignment_options.

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

Usage Guidelines2/5

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

There is no explicit when-to-use guidance, no prerequisites, and no mention of alternatives, despite several journal/lot-adjacent siblings in the toolset. The agent must infer usage purely from the phrase 'one journal entry' plus the required journalEntryId.

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