Server definition
- Hash
- sha256:2a86beb0fc393ce6db4b756cc42ec4c135df2aa89d9dd498deb3b4d4e421ab8c
- What it is
- What a remote MCP server returned when asked what it offers: 36 tools
The blob, as servednamed by its sha256
{
"instructions": "Tokenbooks is a crypto-accounting platform. Find the workspace and portfolio before portfolio calls. Use list_workspaces and list_portfolios to browse, or pass their optional query to search by name or slug. Refer to them by public name or slug. Identify a wallet by its blockchain network and wallet address, using the exact input fields chainId and walletAddress. Source transactions are imported blockchain or provider records before accounting: start with compact list_raw_transactions results, then pass its rawTransactionId back to it for wallet movements, sanitized blockchain event logs, and decoded contract function calls. Portfolio Transactions are accounting transactions built from source activity: start with list_portfolio_transactions, then pass its transactionId back to it for classification, accounting entries, cost-basis links, contributing source transactions, and rawWithDetails evidence when needed. Read current state before writing: use get_portfolio_issue_summary for triage, detail tools for evidence, preview tools before uncertain changes, and get_accounting_reference for valid accounting values. Never run full_resync, merge_transactions, split_transactions, or edit_accounting_rules with operation: delete without explicit user confirmation; incremental_sync is the routine refresh and preserves existing history. Run incremental_sync before final reporting, queue exports with request_report_export, and poll any queued request (exports, sync, rule application, transaction changes) with get_request_status. If a write reports that a sync or recalculation is busy, check get_sync_status before retrying. Invalid arguments include issue paths and hints; follow them instead of inventing field aliases or alternate value shapes. Use get_help with query “MCP workflow” for operating instructions or an accounting topic for accounting guidance, then pass the chosen result’s slug back to get_help to open it.",
"tools": [
{
"description": "Add one or more blockchain addresses and start their first sync. Omit the blockchain connection identifier (integrationId) to add an EVM 0x address on every supported EVM network; other addresses require an integrationId. This tool does not configure exchange accounts and reports which addresses were added or skipped.",
"inputSchema": {
"additionalProperties": false,
"properties": {
"portfolioRef": {
"description": "Portfolio name or slug inside that workspace. Call list_portfolios to resolve it.",
"minLength": 1,
"type": "string"
},
"wallets": {
"items": {
"additionalProperties": false,
"properties": {
"address": {
"description": "Wallet address",
"minLength": 1,
"type": "string"
},
"integrationId": {
"description": "Integration id for chain resolution. Use 'evm' for automatic EVM chain discovery; use a specific integration id for direct chain add.",
"minLength": 1,
"type": "string"
},
"name": {
"description": "Optional wallet name",
"maxLength": 100,
"type": "string"
}
},
"required": [
"address"
],
"type": "object"
},
"maxItems": 50,
"minItems": 1,
"type": "array"
},
"workspaceRef": {
"description": "Workspace name or slug. Call list_workspaces to resolve it.",
"minLength": 1,
"type": "string"
}
},
"required": [
"workspaceRef",
"portfolioRef",
"wallets"
],
"type": "object"
},
"name": "add_wallet",
"outputSchema": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"additionalProperties": false,
"properties": {
"results": {
"items": {
"additionalProperties": false,
"properties": {
"address": {
"type": "string"
},
"chainRef": {
"type": "string"
},
"reason": {
"type": "string"
},
"status": {
"enum": [
"created",
"skipped"
],
"type": "string"
}
},
"required": [
"address",
"status"
],
"type": "object"
},
"type": "array"
},
"syncQueued": {
"type": "boolean"
}
},
"required": [
"results",
"syncQueued"
],
"type": "object"
}
},
{
"description": "Re-run the current saved rules and default assignments for vendors, people, or organizations (counterparty defaults) across eligible existing accounting transactions; this destructive bulk job ignores unsaved edits, so preview first, then track its requestId with get_request_status.",
"inputSchema": {
"additionalProperties": false,
"properties": {
"portfolioRef": {
"description": "Portfolio exact name or slug",
"type": "string"
},
"workspaceRef": {
"description": "Workspace exact name or slug",
"type": "string"
}
},
"required": [
"workspaceRef",
"portfolioRef"
],
"type": "object"
},
"name": "apply_accounting_rules",
"outputSchema": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"additionalProperties": false,
"properties": {
"requestId": {
"type": "string"
},
"status": {
"const": "queued",
"type": "string"
}
},
"required": [
"status",
"requestId"
],
"type": "object"
}
},
{
"description": "Post a proposed accounting transaction to the books; this queued action returns a requestId.",
"inputSchema": {
"additionalProperties": false,
"properties": {
"portfolioRef": {
"description": "Portfolio exact name or slug",
"type": "string"
},
"transactionId": {
"description": "Portfolio transaction ID",
"type": "string"
},
"workspaceRef": {
"description": "Workspace exact name or slug",
"type": "string"
}
},
"required": [
"workspaceRef",
"portfolioRef",
"transactionId"
],
"type": "object"
},
"name": "confirm_transaction",
"outputSchema": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"additionalProperties": false,
"oneOf": [
{
"additionalProperties": false,
"properties": {
"requestId": {
"type": "string"
},
"status": {
"const": "queued",
"type": "string"
},
"transactionId": {
"type": "string"
}
},
"required": [
"status",
"requestId",
"transactionId"
],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"error": {
"additionalProperties": false,
"properties": {
"message": {
"type": "string"
},
"name": {
"type": "string"
}
},
"required": [
"name",
"message"
],
"type": "object"
},
"status": {
"const": "completed",
"type": "string"
},
"success": {
"type": "boolean"
},
"transactionId": {
"type": "string"
}
},
"required": [
"status",
"success",
"transactionId"
],
"type": "object"
}
],
"properties": {
"error": {
"additionalProperties": false,
"properties": {
"message": {
"type": "string"
},
"name": {
"type": "string"
}
},
"required": [
"name",
"message"
],
"type": "object"
},
"requestId": {
"type": "string"
},
"status": {
"enum": [
"queued",
"completed"
],
"type": "string"
},
"success": {
"type": "boolean"
},
"transactionId": {
"type": "string"
}
},
"required": [
"status",
"transactionId"
],
"type": "object"
}
},
{
"description": "Create an accounting portfolio in an existing workspace, optionally choosing jurisdiction and policies; Canada and US profiles require matching currency, entity type, and timezone. If no jurisdiction is selected, Tokenbooks uses generic accounting defaults. Search help for policy choices; workspace creation remains in the Tokenbooks UI.",
"inputSchema": {
"additionalProperties": false,
"properties": {
"costBasisLotMethod": {
"description": "Lot-matching method for disposals",
"enum": [
"FIFO",
"LIFO",
"HIFO",
"ACB"
],
"type": "string"
},
"costBasisPerWallet": {
"description": "Whether acquisition lots stay scoped to each wallet",
"type": "boolean"
},
"currency": {
"description": "Functional currency (default USD)",
"pattern": "^[A-Z]{3}$",
"type": "string"
},
"financialReportingFramework": {
"description": "Financial reporting framework (default TAX_ONLY)",
"enum": [
"TAX_ONLY",
"US_GAAP_PRE_2025",
"US_GAAP_ASC350_60",
"IFRS_IAS38",
"IFRS_IAS38_REVAL",
"IFRS_IAS2_LCNRV",
"IFRS_IAS2_BROKER_TRADER_FVLCTS",
"ASPE",
"FRS_102",
"AASB_138",
"OTHER"
],
"type": "string"
},
"gasFeeAccountingTreatment": {
"description": "Accounting treatment for gas spend",
"enum": [
"DISPOSAL_AND_COST_BASIS",
"EXPENSE_ONLY"
],
"type": "string"
},
"jurisdictionCode": {
"description": "Exact assigned ISO country code, or custom. If omitted, resolves Custom regardless of currency",
"type": "string"
},
"legalEntityType": {
"description": "Legal entity classification for an explicit country profile",
"enum": [
"CORPORATION",
"INDIVIDUAL",
"TRUST",
"PARTNERSHIP"
],
"nullable": true,
"type": "string"
},
"name": {
"description": "Portfolio name",
"minLength": 1,
"type": "string"
},
"reportingTimezone": {
"description": "Canonical IANA reporting timezone (default UTC)",
"type": "string"
},
"stablecoinTreatment": {
"description": "Stablecoin valuation treatment; this does not change lot tracking",
"enum": [
"BASE",
"ASSET"
],
"type": "string"
},
"workspaceRef": {
"description": "Workspace name or slug. Call list_workspaces to resolve it.",
"minLength": 1,
"type": "string"
}
},
"required": [
"workspaceRef",
"name"
],
"type": "object"
},
"name": "create_portfolio",
"outputSchema": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"additionalProperties": false,
"properties": {
"accountingConfiguration": {
"additionalProperties": false,
"properties": {
"baseCurrency": {
"type": "string"
},
"costBasisLotMethod": {
"enum": [
"FIFO",
"LIFO",
"HIFO",
"ACB"
],
"type": "string"
},
"costBasisPerWallet": {
"type": "boolean"
},
"defiDepositTreatment": {
"enum": [
"TAXABLE_EXCHANGE",
"NON_TAXABLE_RESERVATION"
],
"type": "string"
},
"financialReportingFramework": {
"default": "TAX_ONLY",
"enum": [
"TAX_ONLY",
"US_GAAP_PRE_2025",
"US_GAAP_ASC350_60",
"IFRS_IAS38",
"IFRS_IAS38_REVAL",
"IFRS_IAS2_LCNRV",
"IFRS_IAS2_BROKER_TRADER_FVLCTS",
"ASPE",
"FRS_102",
"AASB_138",
"OTHER"
],
"type": "string"
},
"gasFeeAccountingTreatment": {
"enum": [
"DISPOSAL_AND_COST_BASIS",
"EXPENSE_ONLY"
],
"type": "string"
},
"isPurchaseTaxable": {
"type": "boolean"
},
"jurisdictionCode": {
"type": "string"
},
"separateIncomeExpenseLines": {
"type": "boolean"
},
"stablecoinTreatment": {
"enum": [
"BASE",
"ASSET"
],
"type": "string"
}
},
"required": [
"gasFeeAccountingTreatment",
"isPurchaseTaxable",
"costBasisLotMethod",
"baseCurrency",
"jurisdictionCode",
"stablecoinTreatment",
"costBasisPerWallet",
"defiDepositTreatment",
"separateIncomeExpenseLines",
"financialReportingFramework"
],
"type": "object"
},
"createdAt": {
"format": "date-time",
"type": "string"
},
"currency": {
"type": "string"
},
"hasPostedActivity": {
"type": "boolean"
},
"legalEntityType": {
"enum": [
"BUSINESS",
"CORPORATION",
"INDIVIDUAL",
"TRUST",
"PARTNERSHIP"
],
"type": "string"
},
"name": {
"type": "string"
},
"reportingTimezone": {
"type": "string"
},
"slug": {
"type": "string"
},
"updatedAt": {
"format": "date-time",
"type": "string"
}
},
"required": [
"slug",
"name",
"createdAt",
"updatedAt",
"currency",
"accountingConfiguration",
"reportingTimezone",
"hasPostedActivity"
],
"type": "object"
}
},
{
"description": "Create, update, enable/disable, reorder, or delete saved accounting rules -- the rule's whole authoring lifecycle. Pass preview: true on any of those to see the impact without saving; use operation: current to preview the saved ruleset as it stands. Results report when a scan is truncated.",
"inputSchema": {
"additionalProperties": false,
"properties": {
"action": {
"additionalProperties": false,
"description": "Only for operation create, update; required for operation create.",
"properties": {
"actions": {
"description": "What the rule changes when it matches. At most one action of each type.",
"items": {
"oneOf": [
{
"additionalProperties": false,
"properties": {
"counterpartyName": {
"description": "Counterparty name, from list_journal_line_assignment_options (type: counterparty).",
"minLength": 1,
"type": "string"
},
"target": {
"description": "What the change applies to: a journal line or the transaction.",
"enum": [
"LINE"
],
"type": "string"
},
"type": {
"description": "Which change this action makes.",
"enum": [
"SET_COUNTERPARTY"
],
"type": "string"
}
},
"required": [
"type",
"target",
"counterpartyName"
],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"accountNumber": {
"description": "Chart-of-accounts number, from list_journal_line_assignment_options (type: ledger_account).",
"maxLength": 8,
"minLength": 1,
"type": "string"
},
"target": {
"description": "What the change applies to: a journal line or the transaction.",
"enum": [
"LINE"
],
"type": "string"
},
"type": {
"description": "Which change this action makes.",
"enum": [
"SET_LEDGER_ACCOUNT"
],
"type": "string"
}
},
"required": [
"type",
"target",
"accountNumber"
],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"responsibilityCenterAssignments": {
"items": {
"additionalProperties": false,
"properties": {
"responsibilityCenterName": {
"description": "Responsibility center name, from list_journal_line_assignment_options (type: responsibility_center).",
"minLength": 1,
"type": "string"
},
"responsibilityCenterTypeKey": {
"description": "Stable responsibility-center type key. It uses lowercase alphanumeric snake_case segments.",
"pattern": "^[a-z0-9]+(_[a-z0-9]+)*$",
"type": "string"
}
},
"required": [
"responsibilityCenterTypeKey",
"responsibilityCenterName"
],
"type": "object"
},
"minItems": 1,
"type": "array"
},
"target": {
"description": "What the change applies to: a journal line or the transaction.",
"enum": [
"LINE"
],
"type": "string"
},
"type": {
"description": "Which change this action makes.",
"enum": [
"SET_RESPONSIBILITY_CENTERS"
],
"type": "string"
}
},
"required": [
"type",
"target",
"responsibilityCenterAssignments"
],
"type": "object"
}
]
},
"minItems": 1,
"type": "array"
},
"formatVersion": {
"description": "Structure version of this envelope. Always 1.",
"enum": [
1
],
"type": "number"
}
},
"required": [
"formatVersion",
"actions"
],
"type": "object"
},
"conditions": {
"additionalProperties": false,
"description": "Only for operation create, update; required for operation create.",
"properties": {
"all": {
"description": "Conditions that must all match for the rule to fire. At least one is required.",
"items": {
"oneOf": [
{
"additionalProperties": false,
"properties": {
"field": {
"description": "Which part of the transaction this condition tests.",
"enum": [
"fromAddressLabel"
],
"type": "string"
},
"operator": {
"description": "How the field is compared with value.",
"enum": [
"equals",
"contains",
"notEquals",
"notContains"
],
"type": "string"
},
"value": {
"description": "The value the field is compared against.",
"minLength": 1,
"type": "string"
}
},
"required": [
"field",
"operator",
"value"
],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"field": {
"description": "Which part of the transaction this condition tests.",
"enum": [
"toAddressLabel"
],
"type": "string"
},
"operator": {
"description": "How the field is compared with value.",
"enum": [
"equals",
"contains",
"notEquals",
"notContains"
],
"type": "string"
},
"value": {
"description": "The value the field is compared against.",
"minLength": 1,
"type": "string"
}
},
"required": [
"field",
"operator",
"value"
],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"field": {
"description": "Which part of the transaction this condition tests.",
"enum": [
"fromAddress"
],
"type": "string"
},
"operator": {
"description": "How the field is compared with value.",
"enum": [
"equals",
"contains"
],
"type": "string"
},
"value": {
"description": "The value the field is compared against.",
"minLength": 1,
"type": "string"
}
},
"required": [
"field",
"operator",
"value"
],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"field": {
"description": "Which part of the transaction this condition tests.",
"enum": [
"toAddress"
],
"type": "string"
},
"operator": {
"description": "How the field is compared with value.",
"enum": [
"equals",
"contains"
],
"type": "string"
},
"value": {
"description": "The value the field is compared against.",
"minLength": 1,
"type": "string"
}
},
"required": [
"field",
"operator",
"value"
],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"field": {
"description": "Which part of the transaction this condition tests.",
"enum": [
"direction"
],
"type": "string"
},
"operator": {
"description": "How the field is compared with value.",
"enum": [
"equals",
"notEquals"
],
"type": "string"
},
"value": {
"description": "The value the field is compared against.",
"enum": [
"IN",
"OUT",
"GAS"
],
"type": "string"
}
},
"required": [
"field",
"operator",
"value"
],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"field": {
"description": "Which part of the transaction this condition tests.",
"enum": [
"asset"
],
"type": "string"
},
"operator": {
"description": "How the field is compared with value.",
"enum": [
"in",
"notIn"
],
"type": "string"
},
"value": {
"description": "The value the field is compared against.",
"items": {
"minLength": 1,
"type": "string"
},
"minItems": 1,
"type": "array"
}
},
"required": [
"field",
"operator",
"value"
],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"field": {
"description": "Which part of the transaction this condition tests.",
"enum": [
"assetClass"
],
"type": "string"
},
"operator": {
"description": "How the field is compared with value.",
"enum": [
"in",
"notIn"
],
"type": "string"
},
"value": {
"description": "The value the field is compared against.",
"items": {
"enum": [
"ERC20",
"FIAT",
"NATIVE",
"REBASE_LST",
"INTEREST_BEARING",
"VALUE_ACCRUING",
"LP_SHARE",
"DEBT",
"REFLECT",
"VOTE_ESCROWED",
"NFT"
],
"type": "string"
},
"minItems": 1,
"type": "array"
}
},
"required": [
"field",
"operator",
"value"
],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"field": {
"description": "Which part of the transaction this condition tests.",
"enum": [
"stablecoin"
],
"type": "string"
},
"operator": {
"description": "How the field is compared with value.",
"enum": [
"equals"
],
"type": "string"
},
"value": {
"description": "The value the field is compared against.",
"type": "boolean"
}
},
"required": [
"field",
"operator",
"value"
],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"field": {
"description": "Which part of the transaction this condition tests.",
"enum": [
"chain"
],
"type": "string"
},
"operator": {
"description": "How the field is compared with value.",
"enum": [
"in",
"notIn"
],
"type": "string"
},
"value": {
"description": "The value the field is compared against.",
"items": {
"minLength": 1,
"type": "string"
},
"minItems": 1,
"type": "array"
}
},
"required": [
"field",
"operator",
"value"
],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"field": {
"description": "Which part of the transaction this condition tests.",
"enum": [
"operationType"
],
"type": "string"
},
"operator": {
"description": "How the field is compared with value.",
"enum": [
"in",
"notIn"
],
"type": "string"
},
"value": {
"description": "The value the field is compared against.",
"items": {
"enum": [
"DEPOSIT_FIAT",
"INCOME",
"REFUND",
"WITHDRAWAL_FIAT",
"EXPENSE",
"BUY",
"SELL",
"EXCHANGE",
"SWAP",
"MOVE",
"INTERCOMPANY_SEND",
"INTERCOMPANY_RECEIVE",
"STAKE",
"UNSTAKE",
"PROTOCOL_DEPOSIT",
"PROTOCOL_WITHDRAW",
"VAULT_DEPOSIT",
"VAULT_WITHDRAW",
"LP_IN",
"LP_OUT",
"LOAN_BORROW",
"LOAN_REPAY",
"LOAN_LIQUIDATION",
"LEND_GIVE",
"LEND_WITHDRAW",
"ADJUSTMENT",
"UNCATEGORIZED",
"SPAM"
],
"type": "string"
},
"minItems": 1,
"type": "array"
}
},
"required": [
"field",
"operator",
"value"
],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"field": {
"description": "Which part of the transaction this condition tests.",
"enum": [
"accountSubType"
],
"type": "string"
},
"operator": {
"description": "How the field is compared with value.",
"enum": [
"in",
"notIn"
],
"type": "string"
},
"value": {
"description": "The value the field is compared against.",
"items": {
"enum": [
"EXT",
"BNK",
"INC",
"EXP",
"LINT",
"LLIQ",
"LQLOSS",
"CLOSS",
"CBNK",
"CBAS",
"CRE",
"CGL",
"CEXP",
"CINC",
"TRADING_REVENUE",
"COGS",
"INVENTORY_VALUATION_ADJUSTMENT",
"INVENTORY_COGS_ADJUSTMENT",
"INVENTORY_WRITE_DOWN",
"INVENTORY_REMEASUREMENT_GAIN",
"INVENTORY_REMEASUREMENT_LOSS",
"CNP",
"UINC",
"UEXP",
"OFEXP",
"OFINC",
"ICINV",
"CAP",
"UNREALISED_FV_GAIN",
"UNREALISED_FV_LOSS",
"CFVA"
],
"type": "string"
},
"minItems": 1,
"type": "array"
}
},
"required": [
"field",
"operator",
"value"
],
"type": "object"
},
{
"oneOf": [
{
"additionalProperties": false,
"properties": {
"field": {
"description": "Condition field.",
"enum": [
"fiatValue"
],
"type": "string"
},
"operator": {
"description": "Comparison operator.",
"enum": [
"gt"
],
"type": "string"
},
"value": {
"description": "Decimal fiat amount to compare against.",
"pattern": "^-?\\d+(\\.\\d+)?$",
"type": "string"
}
},
"required": [
"field",
"operator",
"value"
],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"field": {
"description": "Condition field.",
"enum": [
"fiatValue"
],
"type": "string"
},
"operator": {
"description": "Comparison operator.",
"enum": [
"lt"
],
"type": "string"
},
"value": {
"description": "Decimal fiat amount to compare against.",
"pattern": "^-?\\d+(\\.\\d+)?$",
"type": "string"
}
},
"required": [
"field",
"operator",
"value"
],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"field": {
"description": "Condition field.",
"enum": [
"fiatValue"
],
"type": "string"
},
"operator": {
"description": "Comparison operator.",
"enum": [
"gte"
],
"type": "string"
},
"value": {
"description": "Decimal fiat amount to compare against.",
"pattern": "^-?\\d+(\\.\\d+)?$",
"type": "string"
}
},
"required": [
"field",
"operator",
"value"
],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"field": {
"description": "Condition field.",
"enum": [
"fiatValue"
],
"type": "string"
},
"operator": {
"description": "Comparison operator.",
"enum": [
"lte"
],
"type": "string"
},
"value": {
"description": "Decimal fiat amount to compare against.",
"pattern": "^-?\\d+(\\.\\d+)?$",
"type": "string"
}
},
"required": [
"field",
"operator",
"value"
],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"field": {
"description": "Condition field.",
"enum": [
"fiatValue"
],
"type": "string"
},
"operator": {
"description": "Comparison operator.",
"enum": [
"between"
],
"type": "string"
},
"value": {
"description": "Inclusive [low, high] decimal-string range.",
"items": {
"anyOf": [
{
"pattern": "^-?\\d+(\\.\\d+)?$",
"type": "string"
},
{
"pattern": "^-?\\d+(\\.\\d+)?$",
"type": "string"
}
]
},
"maxItems": 2,
"minItems": 2,
"type": "array"
}
},
"required": [
"field",
"operator",
"value"
],
"type": "object"
}
]
},
{
"additionalProperties": false,
"properties": {
"field": {
"description": "Which part of the transaction this condition tests.",
"enum": [
"entryType"
],
"type": "string"
},
"operator": {
"description": "How the field is compared with value.",
"enum": [
"equals"
],
"type": "string"
},
"value": {
"description": "The value the field is compared against.",
"enum": [
"DR",
"CR"
],
"type": "string"
}
},
"required": [
"field",
"operator",
"value"
],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"field": {
"description": "Which part of the transaction this condition tests.",
"enum": [
"accountType"
],
"type": "string"
},
"operator": {
"description": "How the field is compared with value.",
"enum": [
"in",
"notIn"
],
"type": "string"
},
"value": {
"description": "The value the field is compared against.",
"items": {
"enum": [
"ASSET",
"LIABILITY",
"EQUITY",
"INCOME",
"EXPENSE"
],
"type": "string"
},
"minItems": 1,
"type": "array"
}
},
"required": [
"field",
"operator",
"value"
],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"field": {
"description": "Which part of the transaction this condition tests.",
"enum": [
"wallet"
],
"type": "string"
},
"operator": {
"description": "How the field is compared with value.",
"enum": [
"in",
"notIn"
],
"type": "string"
},
"value": {
"description": "The value the field is compared against.",
"items": {
"additionalProperties": false,
"properties": {
"address": {
"description": "Wallet address",
"minLength": 1,
"type": "string"
},
"chainId": {
"description": "Chain ID",
"minLength": 1,
"type": "string"
}
},
"required": [
"chainId",
"address"
],
"type": "object"
},
"minItems": 1,
"type": "array"
}
},
"required": [
"field",
"operator",
"value"
],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"field": {
"description": "Which part of the transaction this condition tests.",
"enum": [
"accountNumber"
],
"type": "string"
},
"operator": {
"description": "How the field is compared with value.",
"enum": [
"in",
"notIn"
],
"type": "string"
},
"value": {
"description": "The value the field is compared against.",
"items": {
"description": "Chart-of-accounts number, from list_journal_line_assignment_options (type: ledger_account).",
"maxLength": 8,
"minLength": 1,
"type": "string"
},
"minItems": 1,
"type": "array"
}
},
"required": [
"operator",
"field",
"value"
],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"field": {
"description": "Which part of the transaction this condition tests.",
"enum": [
"counterparty"
],
"type": "string"
},
"operator": {
"description": "How the field is compared with value.",
"enum": [
"in",
"notIn"
],
"type": "string"
},
"value": {
"description": "The value the field is compared against.",
"items": {
"description": "Counterparty name, from list_journal_line_assignment_options (type: counterparty).",
"minLength": 1,
"type": "string"
},
"minItems": 1,
"type": "array"
}
},
"required": [
"field",
"operator",
"value"
],
"type": "object"
}
]
},
"minItems": 1,
"type": "array"
},
"formatVersion": {
"description": "Structure version of this envelope. Always 1.",
"enum": [
1
],
"type": "number"
}
},
"required": [
"formatVersion",
"all"
],
"type": "object"
},
"enabled": {
"anyOf": [
{
"default": true,
"description": "Whether the rule evaluates. A disabled rule is kept but never fires.",
"type": "boolean"
},
{
"description": "Whether the rule evaluates. A disabled rule is kept but never fires.",
"type": "boolean"
}
],
"description": "Whether the rule evaluates. A disabled rule is kept but never fires. Only for operation create, set_enabled; required for operation set_enabled."
},
"maxAffected": {
"default": 10,
"description": "Preview only: how many affected transactions to sample, at most 25. affectedCount in the result equals this sample size; check candidateCount for the true total match count.",
"maximum": 25,
"minimum": 1,
"type": "integer"
},
"name": {
"description": "Human-readable rule name, shown in the rules list. Only for operation create, update; required for operation create.",
"minLength": 1,
"type": "string"
},
"operation": {
"description": "create: Create a new rule, or preview creating one (preview: true). update: Change the name, conditions, or actions of an existing rule, or preview the change (preview: true). Provide at least one of name, conditions, action. set_enabled: Turn an existing rule on or off without changing it, or preview the change (preview: true). reorder: Set the evaluation order of every rule in the portfolio, or preview it (preview: true). delete: Remove one saved rule from active use, or preview removing it (preview: true). current: Preview the saved rules as they stand, changing nothing.",
"enum": [
"create",
"update",
"set_enabled",
"reorder",
"delete",
"current"
],
"type": "string"
},
"orderedRuleRefs": {
"description": "Every rule handle in the portfolio, in the order they should evaluate. Rules apply in order, so earlier rules win. Only for operation reorder; required for each.",
"items": {
"description": "Saved rule handle, from list_accounting_rules.",
"minLength": 1,
"type": "string"
},
"minItems": 1,
"type": "array"
},
"portfolioRef": {
"description": "Portfolio name or slug inside that workspace. Call list_portfolios to resolve it.",
"minLength": 1,
"type": "string"
},
"preview": {
"description": "When true, evaluate the change and return its impact without saving it. Not for operation current.",
"type": "boolean"
},
"ruleRef": {
"description": "Saved rule handle, from list_accounting_rules. Only for operation update, set_enabled, delete; required for each.",
"minLength": 1,
"type": "string"
},
"workspaceRef": {
"description": "Workspace name or slug. Call list_workspaces to resolve it.",
"minLength": 1,
"type": "string"
}
},
"required": [
"workspaceRef",
"portfolioRef",
"operation"
],
"type": "object"
},
"name": "edit_accounting_rules",
"outputSchema": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"additionalProperties": false,
"anyOf": [
{
"additionalProperties": false,
"properties": {
"jobId": {
"$ref": "#/properties/jobId"
},
"mode": {
"$ref": "#/properties/mode"
},
"result": {
"$ref": "#/properties/result"
},
"status": {
"$ref": "#/properties/status"
}
},
"required": [
"mode"
],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"affectedCount": {
"$ref": "#/properties/affectedCount"
},
"candidateCount": {
"$ref": "#/properties/candidateCount"
},
"changes": {
"$ref": "#/properties/changes"
},
"detail": {
"const": "compact",
"type": "string"
},
"firstAffectedAt": {
"$ref": "#/properties/firstAffectedAt"
},
"lastAffectedAt": {
"$ref": "#/properties/lastAffectedAt"
},
"scannedCount": {
"$ref": "#/properties/scannedCount"
},
"skippedRuleEvidence": {
"$ref": "#/properties/skippedRuleEvidence"
},
"truncatedBy": {
"$ref": "#/properties/truncatedBy"
}
},
"required": [
"detail",
"scannedCount",
"candidateCount",
"affectedCount",
"changes"
],
"type": "object"
}
],
"properties": {
"affectedCount": {
"maximum": 100,
"minimum": -9007199254740991,
"type": "integer"
},
"candidateCount": {
"maximum": 9007199254740991,
"minimum": -9007199254740991,
"type": "integer"
},
"changes": {
"items": {
"additionalProperties": false,
"properties": {
"lines": {
"items": {
"additionalProperties": false,
"properties": {
"account": {
"additionalProperties": false,
"properties": {
"byRule": {
"oneOf": [
{
"additionalProperties": false,
"properties": {
"kind": {
"const": "saved",
"type": "string"
},
"ruleRef": {
"minLength": 1,
"type": "string"
},
"version": {
"maximum": 9007199254740991,
"minimum": 1,
"type": "integer"
}
},
"required": [
"kind",
"ruleRef",
"version"
],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"kind": {
"const": "draft",
"type": "string"
},
"label": {
"const": "draft",
"type": "string"
},
"version": {
"const": 1,
"type": "number"
}
},
"required": [
"kind",
"label",
"version"
],
"type": "object"
}
]
},
"from": {
"maxLength": 8,
"minLength": 1,
"type": "string"
},
"lockedBy": {
"enum": [
"MANUAL",
"MANUAL_CLEARED",
"PAYMENT_LINK",
"SYSTEM_RULE"
],
"type": "string"
},
"to": {
"maxLength": 8,
"minLength": 1,
"type": "string"
}
},
"required": [
"from",
"to"
],
"type": "object"
},
"assignmentChanged": {
"type": "boolean"
},
"counterparty": {
"additionalProperties": false,
"properties": {
"byRule": {
"oneOf": [
{
"additionalProperties": false,
"properties": {
"kind": {
"const": "saved",
"type": "string"
},
"ruleRef": {
"minLength": 1,
"type": "string"
},
"version": {
"maximum": 9007199254740991,
"minimum": 1,
"type": "integer"
}
},
"required": [
"kind",
"ruleRef",
"version"
],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"kind": {
"const": "draft",
"type": "string"
},
"label": {
"const": "draft",
"type": "string"
},
"version": {
"const": 1,
"type": "number"
}
},
"required": [
"kind",
"label",
"version"
],
"type": "object"
}
]
},
"from": {
"minLength": 1,
"type": "string"
},
"lockedBy": {
"enum": [
"MANUAL",
"MANUAL_CLEARED",
"PAYMENT_LINK",
"SYSTEM_RULE"
],
"type": "string"
},
"to": {
"minLength": 1,
"type": "string"
}
},
"type": "object"
},
"lineNumber": {
"maximum": 9007199254740991,
"minimum": 1,
"type": "integer"
},
"matchedButLost": {
"items": {
"oneOf": [
{
"additionalProperties": false,
"properties": {
"kind": {
"const": "saved",
"type": "string"
},
"output": {
"oneOf": [
{
"additionalProperties": false,
"properties": {
"kind": {
"enum": [
"account",
"counterparty"
],
"type": "string"
}
},
"required": [
"kind"
],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"kind": {
"const": "responsibilityCenter",
"type": "string"
},
"responsibilityCenterTypeKey": {
"pattern": "^[a-z0-9]+(_[a-z0-9]+)*$",
"type": "string"
}
},
"required": [
"kind",
"responsibilityCenterTypeKey"
],
"type": "object"
}
]
},
"ruleRef": {
"minLength": 1,
"type": "string"
},
"version": {
"maximum": 9007199254740991,
"minimum": 1,
"type": "integer"
}
},
"required": [
"kind",
"ruleRef",
"version",
"output"
],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"kind": {
"const": "draft",
"type": "string"
},
"label": {
"const": "draft",
"type": "string"
},
"output": {
"oneOf": [
{
"additionalProperties": false,
"properties": {
"kind": {
"enum": [
"account",
"counterparty"
],
"type": "string"
}
},
"required": [
"kind"
],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"kind": {
"const": "responsibilityCenter",
"type": "string"
},
"responsibilityCenterTypeKey": {
"pattern": "^[a-z0-9]+(_[a-z0-9]+)*$",
"type": "string"
}
},
"required": [
"kind",
"responsibilityCenterTypeKey"
],
"type": "object"
}
]
},
"version": {
"const": 1,
"type": "number"
}
},
"required": [
"kind",
"label",
"version",
"output"
],
"type": "object"
}
]
},
"type": "array"
},
"responsibilityCenters": {
"items": {
"additionalProperties": false,
"properties": {
"byRule": {
"oneOf": [
{
"additionalProperties": false,
"properties": {
"kind": {
"const": "saved",
"type": "string"
},
"ruleRef": {
"minLength": 1,
"type": "string"
},
"version": {
"maximum": 9007199254740991,
"minimum": 1,
"type": "integer"
}
},
"required": [
"kind",
"ruleRef",
"version"
],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"kind": {
"const": "draft",
"type": "string"
},
"label": {
"const": "draft",
"type": "string"
},
"version": {
"const": 1,
"type": "number"
}
},
"required": [
"kind",
"label",
"version"
],
"type": "object"
}
]
},
"from": {
"additionalProperties": false,
"properties": {
"percentageBps": {
"maximum": 9007199254740991,
"minimum": 1,
"type": "integer"
},
"responsibilityCenterName": {
"minLength": 1,
"type": "string"
}
},
"required": [
"responsibilityCenterName",
"percentageBps"
],
"type": "object"
},
"lockedBy": {
"enum": [
"MANUAL",
"MANUAL_CLEARED",
"PAYMENT_LINK",
"SYSTEM_RULE"
],
"type": "string"
},
"responsibilityCenterTypeKey": {
"pattern": "^[a-z0-9]+(_[a-z0-9]+)*$",
"type": "string"
},
"to": {
"additionalProperties": false,
"properties": {
"percentageBps": {
"maximum": 9007199254740991,
"minimum": 1,
"type": "integer"
},
"responsibilityCenterName": {
"minLength": 1,
"type": "string"
}
},
"required": [
"responsibilityCenterName",
"percentageBps"
],
"type": "object"
}
},
"required": [
"responsibilityCenterTypeKey"
],
"type": "object"
},
"type": "array"
}
},
"required": [
"lineNumber",
"responsibilityCenters",
"matchedButLost"
],
"type": "object"
},
"minItems": 1,
"type": "array"
},
"portfolioTransactionId": {
"minLength": 1,
"type": "string"
},
"ruleEvaluationFailures": {
"items": {
"additionalProperties": false,
"properties": {
"rejection": {
"additionalProperties": false,
"properties": {
"code": {
"enum": [
"ACCOUNT_FACTS_INCOMPLETE",
"ASSET_EVIDENCE_INCOMPLETE",
"CURRENCY_MISMATCH",
"WALLET_SCOPE_CONFLICT",
"WALLET_PROVENANCE_AMBIGUOUS",
"ASSET_EVIDENCE_CONFLICT",
"ASSET_EVIDENCE_MISSING",
"LOT_EVIDENCE_INCONSISTENT",
"INVALID_REPORT_CLASSIFICATION",
"CAPITAL_GAINS_LOT_EVIDENCE_REQUIRED",
"CAPITAL_LOSS_DISPOSAL_LOT_EVIDENCE_REQUIRED",
"COUNTERPARTY_NOT_SUPPORTED"
],
"type": "string"
},
"message": {
"minLength": 1,
"type": "string"
}
},
"required": [
"code",
"message"
],
"type": "object"
},
"rule": {
"oneOf": [
{
"additionalProperties": false,
"properties": {
"kind": {
"const": "saved",
"type": "string"
},
"ruleRef": {
"minLength": 1,
"type": "string"
},
"version": {
"maximum": 9007199254740991,
"minimum": 1,
"type": "integer"
}
},
"required": [
"kind",
"ruleRef",
"version"
],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"kind": {
"const": "draft",
"type": "string"
},
"label": {
"const": "draft",
"type": "string"
},
"version": {
"const": 1,
"type": "number"
}
},
"required": [
"kind",
"label",
"version"
],
"type": "object"
}
]
}
},
"required": [
"rule"
],
"type": "object"
},
"type": "array"
},
"timestamp": {
"format": "date-time",
"type": "string"
}
},
"required": [
"portfolioTransactionId",
"timestamp",
"lines"
],
"type": "object"
},
"maxItems": 100,
"type": "array"
},
"detail": {
"const": "compact",
"type": "string"
},
"firstAffectedAt": {
"format": "date-time",
"type": "string"
},
"jobId": {
"type": "string"
},
"lastAffectedAt": {
"format": "date-time",
"type": "string"
},
"mode": {
"enum": [
"sync",
"async"
],
"type": "string"
},
"result": {
"oneOf": [
{
"additionalProperties": false,
"properties": {
"data": {},
"success": {
"const": true,
"type": "boolean"
}
},
"required": [
"success"
],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"error": {
"additionalProperties": false,
"properties": {
"body": {
"anyOf": [
{
"additionalProperties": false,
"properties": {
"currentUsage": {
"type": "number"
},
"limit": {
"type": "number"
},
"usageType": {
"type": "string"
}
},
"required": [
"usageType",
"currentUsage",
"limit"
],
"type": "object"
},
{}
]
},
"message": {
"type": "string"
},
"name": {
"type": "string"
}
},
"required": [
"name",
"message",
"body"
],
"type": "object"
},
"success": {
"const": false,
"type": "boolean"
}
},
"required": [
"success",
"error"
],
"type": "object"
}
]
},
"scannedCount": {
"maximum": 9007199254740991,
"minimum": -9007199254740991,
"type": "integer"
},
"skippedRuleEvidence": {
"items": {
"$ref": "#/properties/changes/items"
},
"maxItems": 2000,
"type": "array"
},
"status": {
"const": "queued",
"type": "string"
},
"truncatedBy": {
"enum": [
"affected",
"budget",
"details",
"scanned"
],
"type": "string"
}
},
"type": "object"
}
},
{
"description": "Change one accounting transaction (a Portfolio Transaction): update_fields for memo, the full tag set, or operation type; update_journal_line for the ledger account, counterparty, or reporting-group assignments on one debit or credit line (read the line number first, look up selectable values with list_journal_line_assignment_options); or set_fmv_override to correct a fair market value and recompute dependent cost-basis records. Track returned requestIds, or pass waitForCompletion (update_fields, set_fmv_override) to wait for a terminal state.",
"inputSchema": {
"additionalProperties": false,
"properties": {
"accountNumber": {
"description": "Chart-of-accounts number to assign (from list_journal_line_assignment_options, type: ledger_account) Only for operation update_journal_line.",
"minLength": 1,
"type": "string"
},
"assetId": {
"description": "Asset ID to override (e.g. eth_1, as returned by the read tools) Only for operation set_fmv_override; required for each.",
"minLength": 1,
"type": "string"
},
"counterpartyName": {
"description": "Counterparty name to assign; pass null to unset Only for operation update_journal_line.",
"minLength": 1,
"nullable": true,
"type": "string"
},
"lineNumber": {
"description": "Journal entry line number (1-based) Only for operation update_journal_line; required for each.",
"maximum": 9007199254740991,
"minimum": 1,
"type": "integer"
},
"memo": {
"description": "New memo; pass null to clear it Only for operation update_fields.",
"nullable": true,
"type": "string"
},
"newValueQuote": {
"description": "Exact per-unit decimal string in base currency, e.g. \"0\". Do not use price. Only for operation set_fmv_override; required for each.",
"pattern": "^-?\\d+(\\.\\d+)?$",
"type": "string"
},
"operation": {
"description": "update_fields: Change memo, the full tag set, or the accounting operation type. update_journal_line: Change the ledger account, counterparty, or reporting-group assignments on one transaction's debit or credit line. set_fmv_override: Set a corrected fair market value per unit for one asset on the transaction and recompute dependent cost-basis records.",
"enum": [
"update_fields",
"update_journal_line",
"set_fmv_override"
],
"type": "string"
},
"operationType": {
"description": "New accounting operation type Only for operation update_fields.",
"enum": [
"DEPOSIT_FIAT",
"INCOME",
"REFUND",
"WITHDRAWAL_FIAT",
"EXPENSE",
"BUY",
"SELL",
"EXCHANGE",
"SWAP",
"MOVE",
"INTERCOMPANY_SEND",
"INTERCOMPANY_RECEIVE",
"STAKE",
"UNSTAKE",
"PROTOCOL_DEPOSIT",
"PROTOCOL_WITHDRAW",
"VAULT_DEPOSIT",
"VAULT_WITHDRAW",
"LP_IN",
"LP_OUT",
"LOAN_BORROW",
"LOAN_REPAY",
"LOAN_LIQUIDATION",
"LEND_GIVE",
"LEND_WITHDRAW",
"ADJUSTMENT",
"UNCATEGORIZED",
"SPAM"
],
"type": "string"
},
"pollIntervalMs": {
"description": "Polling interval in milliseconds, 100 to 5000 (default 500) Not for operation update_journal_line.",
"maximum": 5000,
"minimum": 100,
"type": "integer"
},
"portfolioRef": {
"description": "Portfolio name or slug inside that workspace. Call list_portfolios to resolve it.",
"minLength": 1,
"type": "string"
},
"quoteCurrency": {
"description": "Optional quote currency (defaults to base currency) Only for operation set_fmv_override.",
"minLength": 1,
"type": "string"
},
"quoteSource": {
"description": "Optional source/justification for the price Only for operation set_fmv_override.",
"minLength": 1,
"type": "string"
},
"reason": {
"description": "Immutable root reason whose nonempty bytes are preserved exactly; use ptx:<uuid> for transaction references Only for operation set_fmv_override.",
"minLength": 1,
"type": "string"
},
"responsibilityCenterAssignments": {
"description": "Typed responsibility-center assignment set, one per dimension. Replaces the line assignments; pass [] to clear every dimension. Type keys and center names come from list_journal_line_assignment_options, type: responsibility_center. Only for operation update_journal_line.",
"items": {
"additionalProperties": false,
"properties": {
"responsibilityCenterName": {
"description": "Responsibility-center name within that type",
"minLength": 1,
"type": "string"
},
"responsibilityCenterTypeKey": {
"description": "Responsibility-center type key / dimension slug, e.g. primary, goal",
"minLength": 1,
"type": "string"
}
},
"required": [
"responsibilityCenterTypeKey",
"responsibilityCenterName"
],
"type": "object"
},
"type": "array"
},
"subType": {
"description": "New operation sub-type (requires operationType) Only for operation update_fields.",
"minLength": 1,
"type": "string"
},
"tags": {
"description": "Replace the full set of transaction tags Only for operation update_fields.",
"items": {
"minLength": 1,
"type": "string"
},
"type": "array"
},
"timeoutMs": {
"description": "Maximum wait time in milliseconds, 1000 to 60000 (default 30000) Not for operation update_journal_line.",
"maximum": 60000,
"minimum": 1000,
"type": "integer"
},
"transactionId": {
"description": "Portfolio transaction ID",
"minLength": 1,
"type": "string"
},
"waitForCompletion": {
"anyOf": [
{
"description": "When true, poll queued request IDs and include terminal status/final state before returning",
"type": "boolean"
},
{
"description": "When true, poll the queued request and include terminal status/final state before returning",
"type": "boolean"
}
],
"description": "When true, poll queued request IDs and include terminal status/final state before returning Not for operation update_journal_line."
},
"workspaceRef": {
"description": "Workspace name or slug. Call list_workspaces to resolve it.",
"minLength": 1,
"type": "string"
}
},
"required": [
"workspaceRef",
"portfolioRef",
"operation",
"transactionId"
],
"type": "object"
},
"name": "edit_transaction",
"outputSchema": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"additionalProperties": false,
"anyOf": [
{
"additionalProperties": false,
"properties": {
"completed": {
"$ref": "#/properties/completed"
},
"finalState": {
"$ref": "#/properties/finalState"
},
"operation": {
"const": "update_fields",
"type": "string"
},
"primaryRequestId": {
"$ref": "#/properties/primaryRequestId"
},
"requests": {
"$ref": "#/properties/requests"
},
"results": {
"$ref": "#/properties/results"
},
"statuses": {
"$ref": "#/properties/statuses"
},
"transactionId": {
"$ref": "#/properties/transactionId"
}
},
"required": [
"operation",
"transactionId",
"results"
],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"lineNumber": {
"$ref": "#/properties/lineNumber"
},
"operation": {
"const": "update_journal_line",
"type": "string"
},
"results": {
"$ref": "#/properties/results"
},
"transactionId": {
"$ref": "#/properties/transactionId"
}
},
"required": [
"operation",
"transactionId",
"lineNumber",
"results"
],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"completed": {
"$ref": "#/properties/completed"
},
"finalState": {
"$ref": "#/properties/finalState"
},
"operation": {
"const": "set_fmv_override",
"type": "string"
},
"requestId": {
"$ref": "#/properties/requestId"
},
"requests": {
"$ref": "#/properties/requests"
},
"status": {
"$ref": "#/properties/status"
},
"statuses": {
"$ref": "#/properties/statuses"
},
"transactionId": {
"$ref": "#/properties/transactionId"
}
},
"required": [
"status",
"requestId",
"transactionId",
"operation"
],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"error": {
"$ref": "#/properties/error"
},
"operation": {
"const": "set_fmv_override",
"type": "string"
},
"status": {
"$ref": "#/properties/status"
},
"success": {
"$ref": "#/properties/success"
},
"transactionId": {
"$ref": "#/properties/transactionId"
}
},
"required": [
"status",
"success",
"transactionId",
"operation"
],
"type": "object"
}
],
"properties": {
"completed": {
"type": "boolean"
},
"error": {
"additionalProperties": false,
"properties": {
"message": {
"type": "string"
},
"name": {
"type": "string"
}
},
"required": [
"name",
"message"
],
"type": "object"
},
"finalState": {
"additionalProperties": false,
"properties": {
"classificationState": {
"type": "string"
},
"errorTypes": {
"items": {
"type": "string"
},
"type": "array"
},
"hasError": {
"type": "boolean"
},
"operationType": {
"type": "string"
},
"suggestedAction": {}
},
"required": [
"hasError",
"errorTypes",
"suggestedAction"
],
"type": "object"
},
"lineNumber": {
"type": "number"
},
"operation": {
"enum": [
"update_fields",
"update_journal_line",
"set_fmv_override"
],
"type": "string"
},
"primaryRequestId": {
"type": "string"
},
"requestId": {
"type": "string"
},
"requests": {
"anyOf": [
{
"additionalProperties": false,
"properties": {
"all": {
"items": {
"anyOf": [
{
"additionalProperties": false,
"properties": {
"field": {
"type": "string"
},
"requestId": {
"type": "string"
},
"status": {
"const": "queued",
"type": "string"
}
},
"required": [
"field",
"requestId",
"status"
],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"appProgress": {
"additionalProperties": false,
"properties": {
"completed": {
"type": "number"
},
"total": {
"type": "number"
},
"transactionsSynced": {
"type": "number"
}
},
"required": [
"completed",
"total",
"transactionsSynced"
],
"type": "object"
},
"completedAt": {
"format": "date-time",
"type": "string"
},
"createdAt": {
"format": "date-time",
"type": "string"
},
"error": {
"additionalProperties": false,
"properties": {
"error": {
"additionalProperties": false,
"properties": {
"code": {
"type": "string"
},
"details": {
"additionalProperties": {},
"propertyNames": {
"type": "string"
},
"type": "object"
},
"message": {
"type": "string"
},
"requestId": {
"type": "string"
}
},
"required": [
"code",
"message",
"requestId"
],
"type": "object"
}
},
"required": [
"error"
],
"type": "object"
},
"field": {
"type": "string"
},
"finishedOn": {
"type": "number"
},
"progress": {
"type": "number"
},
"requestId": {
"type": "string"
},
"result": {
"additionalProperties": false,
"properties": {
"downloadUrl": {
"type": "string"
},
"fileSize": {
"type": "number"
},
"format": {
"enum": [
"xlsx",
"pdf",
"json"
],
"type": "string"
}
},
"required": [
"downloadUrl",
"fileSize",
"format"
],
"type": "object"
},
"returnValue": {},
"status": {
"enum": [
"pending",
"active",
"delayed",
"completed",
"failed"
],
"type": "string"
},
"type": {
"enum": [
"sync",
"export",
"recompute",
"reclassify"
],
"type": "string"
},
"updatedAt": {
"format": "date-time",
"type": "string"
}
},
"required": [
"requestId",
"type",
"status",
"progress",
"createdAt",
"updatedAt",
"field"
],
"type": "object"
}
]
},
"type": "array"
},
"primary": {
"type": "string"
}
},
"required": [
"primary",
"all"
],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"all": {
"items": {
"additionalProperties": false,
"properties": {
"appProgress": {
"additionalProperties": false,
"properties": {
"completed": {
"type": "number"
},
"total": {
"type": "number"
},
"transactionsSynced": {
"type": "number"
}
},
"required": [
"completed",
"total",
"transactionsSynced"
],
"type": "object"
},
"completedAt": {
"format": "date-time",
"type": "string"
},
"createdAt": {
"format": "date-time",
"type": "string"
},
"error": {
"additionalProperties": false,
"properties": {
"error": {
"additionalProperties": false,
"properties": {
"code": {
"type": "string"
},
"details": {
"additionalProperties": {},
"propertyNames": {
"type": "string"
},
"type": "object"
},
"message": {
"type": "string"
},
"requestId": {
"type": "string"
}
},
"required": [
"code",
"message",
"requestId"
],
"type": "object"
}
},
"required": [
"error"
],
"type": "object"
},
"finishedOn": {
"type": "number"
},
"progress": {
"type": "number"
},
"requestId": {
"type": "string"
},
"result": {
"additionalProperties": false,
"properties": {
"downloadUrl": {
"type": "string"
},
"fileSize": {
"type": "number"
},
"format": {
"enum": [
"xlsx",
"pdf",
"json"
],
"type": "string"
}
},
"required": [
"downloadUrl",
"fileSize",
"format"
],
"type": "object"
},
"returnValue": {},
"status": {
"enum": [
"pending",
"active",
"delayed",
"completed",
"failed"
],
"type": "string"
},
"type": {
"enum": [
"sync",
"export",
"recompute",
"reclassify"
],
"type": "string"
},
"updatedAt": {
"format": "date-time",
"type": "string"
}
},
"required": [
"requestId",
"type",
"status",
"progress",
"createdAt",
"updatedAt"
],
"type": "object"
},
"type": "array"
},
"primary": {
"type": "string"
}
},
"required": [
"primary",
"all"
],
"type": "object"
}
]
},
"results": {
"items": {
"oneOf": [
{
"additionalProperties": false,
"properties": {
"field": {
"type": "string"
},
"requestId": {
"type": "string"
},
"status": {
"const": "queued",
"type": "string"
}
},
"required": [
"status",
"requestId",
"field"
],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"error": {
"additionalProperties": false,
"properties": {
"message": {
"type": "string"
},
"name": {
"type": "string"
}
},
"required": [
"name",
"message"
],
"type": "object"
},
"field": {
"type": "string"
},
"status": {
"const": "completed",
"type": "string"
},
"success": {
"type": "boolean"
}
},
"required": [
"status",
"success",
"field"
],
"type": "object"
}
]
},
"type": "array"
},
"status": {
"enum": [
"queued",
"completed"
],
"type": "string"
},
"statuses": {
"items": {
"additionalProperties": false,
"properties": {
"appProgress": {
"additionalProperties": false,
"properties": {
"completed": {
"type": "number"
},
"total": {
"type": "number"
},
"transactionsSynced": {
"type": "number"
}
},
"required": [
"completed",
"total",
"transactionsSynced"
],
"type": "object"
},
"completedAt": {
"format": "date-time",
"type": "string"
},
"createdAt": {
"format": "date-time",
"type": "string"
},
"error": {
"additionalProperties": false,
"properties": {
"error": {
"additionalProperties": false,
"properties": {
"code": {
"type": "string"
},
"details": {
"additionalProperties": {},
"propertyNames": {
"type": "string"
},
"type": "object"
},
"message": {
"type": "string"
},
"requestId": {
"type": "string"
}
},
"required": [
"code",
"message",
"requestId"
],
"type": "object"
}
},
"required": [
"error"
],
"type": "object"
},
"finishedOn": {
"type": "number"
},
"progress": {
"type": "number"
},
"requestId": {
"type": "string"
},
"result": {
"additionalProperties": false,
"properties": {
"downloadUrl": {
"type": "string"
},
"fileSize": {
"type": "number"
},
"format": {
"enum": [
"xlsx",
"pdf",
"json"
],
"type": "string"
}
},
"required": [
"downloadUrl",
"fileSize",
"format"
],
"type": "object"
},
"returnValue": {},
"status": {
"enum": [
"pending",
"active",
"delayed",
"completed",
"failed"
],
"type": "string"
},
"type": {
"enum": [
"sync",
"export",
"recompute",
"reclassify"
],
"type": "string"
},
"updatedAt": {
"format": "date-time",
"type": "string"
}
},
"required": [
"requestId",
"type",
"status",
"progress",
"createdAt",
"updatedAt"
],
"type": "object"
},
"type": "array"
},
"success": {
"type": "boolean"
},
"transactionId": {
"type": "string"
}
},
"required": [
"operation",
"transactionId"
],
"type": "object"
}
},
{
"description": "DANGER: delete and rebuild the selected wallet transaction, journal, and cost-basis history from source data. Use only after the user explicitly requests this destructive reset and accepts the consequences; use incremental_sync for routine new activity.",
"inputSchema": {
"additionalProperties": false,
"properties": {
"portfolioRef": {
"description": "Portfolio exact name or slug",
"type": "string"
},
"wallets": {
"description": "Optional exact wallet pairs; omit to wipe and rebuild every wallet in the portfolio",
"items": {
"additionalProperties": false,
"properties": {
"chainId": {
"description": "Exact chain ID for the wallet",
"type": "string"
},
"walletAddress": {
"description": "Exact case-sensitive wallet address",
"type": "string"
}
},
"required": [
"chainId",
"walletAddress"
],
"type": "object"
},
"type": "array"
},
"workspaceRef": {
"description": "Workspace exact name or slug",
"type": "string"
}
},
"required": [
"workspaceRef",
"portfolioRef"
],
"type": "object"
},
"name": "full_resync",
"outputSchema": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"additionalProperties": false,
"properties": {
"portfolioSlug": {
"type": "string"
},
"requestId": {
"type": "string"
}
},
"required": [
"portfolioSlug",
"requestId"
],
"type": "object"
}
},
{
"description": "Look up valid accounting values—including operation types, transaction statuses, cost-basis methods, and lot event kinds—before classifying or filtering; use the returned exact values instead of guessing.",
"inputSchema": {
"additionalProperties": false,
"properties": {},
"type": "object"
},
"name": "get_accounting_reference",
"outputSchema": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"additionalProperties": false,
"properties": {
"costBasisLotEntryKinds": {
"items": {
"additionalProperties": false,
"properties": {
"description": {
"type": "string"
},
"value": {
"type": "string"
}
},
"required": [
"value",
"description"
],
"type": "object"
},
"type": "array"
},
"costBasisLotMethods": {
"items": {
"additionalProperties": false,
"properties": {
"description": {
"type": "string"
},
"value": {
"type": "string"
}
},
"required": [
"value",
"description"
],
"type": "object"
},
"type": "array"
},
"operationTypes": {
"items": {
"additionalProperties": false,
"properties": {
"description": {
"type": "string"
},
"value": {
"type": "string"
}
},
"required": [
"value",
"description"
],
"type": "object"
},
"type": "array"
},
"transactionStatuses": {
"items": {
"additionalProperties": false,
"properties": {
"description": {
"type": "string"
},
"value": {
"type": "string"
}
},
"required": [
"value",
"description"
],
"type": "object"
},
"type": "array"
}
},
"required": [
"operationTypes",
"transactionStatuses",
"costBasisLotMethods",
"costBasisLotEntryKinds"
],
"type": "object"
}
},
{
"description": "Summarize one cryptocurrency or token across every wallet with quantity, cost basis, market value, unrealized gain or loss, and portfolio totals. This covers wallet holdings rather than all ledger accounts; request a balance-sheet report for a complete accounting statement.",
"inputSchema": {
"additionalProperties": false,
"properties": {
"assetRef": {
"description": "Asset symbol or canonical asset id",
"type": "string"
},
"includeSpam": {
"description": "Also match assets marked as spam",
"type": "boolean"
},
"portfolioRef": {
"description": "Portfolio exact name or slug",
"type": "string"
},
"workspaceRef": {
"description": "Workspace exact name or slug",
"type": "string"
}
},
"required": [
"workspaceRef",
"portfolioRef",
"assetRef"
],
"type": "object"
},
"name": "get_asset_position",
"outputSchema": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"additionalProperties": false,
"properties": {
"asset": {
"additionalProperties": false,
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"symbol": {
"type": "string"
}
},
"required": [
"id",
"symbol",
"name"
],
"type": "object"
},
"currency": {
"type": "string"
},
"perWallet": {
"items": {
"additionalProperties": false,
"properties": {
"chainRef": {
"type": "string"
},
"costBasis": {
"type": "string"
},
"marketValue": {
"type": "string"
},
"quantity": {
"type": "string"
},
"unrealizedGainLoss": {
"type": "string"
},
"walletAddress": {
"type": "string"
},
"walletName": {
"type": "string"
}
},
"required": [
"chainRef",
"quantity"
],
"type": "object"
},
"type": "array"
},
"pricedAt": {
"type": "string"
},
"totals": {
"additionalProperties": false,
"properties": {
"costBasis": {
"type": "string"
},
"marketValue": {
"type": "string"
},
"quantity": {
"type": "string"
},
"unrealizedGainLoss": {
"type": "string"
},
"walletCount": {
"type": "number"
}
},
"required": [
"quantity",
"walletCount"
],
"type": "object"
},
"unitPrice": {
"type": "string"
},
"valuation": {
"additionalProperties": false,
"properties": {
"reason": {
"type": "string"
},
"source": {
"enum": [
"PORTFOLIO_CURRENCY",
"STABLECOIN_PEG",
"LIVE",
"LAST_CLOSE",
"HISTORICAL_CLOSE"
],
"type": "string"
},
"status": {
"enum": [
"PRICED",
"UNAVAILABLE"
],
"type": "string"
}
},
"required": [
"status"
],
"type": "object"
}
},
"required": [
"asset",
"currency",
"valuation",
"perWallet",
"totals"
],
"type": "object"
}
},
{
"description": "List the available values for one portfolio filter—such as accounts, wallets, assets, transaction status, or warnings—before building a filtered query.",
"inputSchema": {
"additionalProperties": false,
"description": "Flattened filter options request schema for all registered filter providers.",
"properties": {
"filter": {
"description": "Human-readable Portfolio Transactions filter expression. Only for filterName portfolio-transaction-status-counts.",
"maxLength": 4000,
"type": "string"
},
"filterName": {
"description": "Public filter option provider name.",
"enum": [
"portfolio-transaction-addresses",
"portfolio-transaction-account-name",
"portfolio-transaction-assets",
"portfolio-transaction-counterparties",
"portfolio-transaction-wallets",
"portfolio-transaction-responsibility-centers",
"portfolio-transaction-lot-presence",
"portfolio-transaction-journal-entry-presence",
"portfolio-transaction-status-counts",
"portfolio-transaction-warnings",
"accounts",
"portfolio-transaction-period"
],
"type": "string"
},
"mode": {
"description": "Address side to inspect for portfolio-transaction-addresses. Required for address filters. Use from for source addresses and to for destination addresses. Only for filterName portfolio-transaction-addresses; required for each.",
"enum": [
"from",
"to"
],
"type": "string"
},
"pageSize": {
"default": 50,
"description": "Requested number of resources to return. Oversized values are clamped to the route limit. Not for filterName accounts, portfolio-transaction-period.",
"maximum": 9007199254740991,
"minimum": 1,
"type": "integer"
},
"pageToken": {
"description": "Opaque token returned by the previous list response. Not for filterName accounts, portfolio-transaction-period.",
"minLength": 1,
"type": "string"
},
"portfolioRef": {
"description": "Portfolio name or slug inside that workspace. Call list_portfolios to resolve it.",
"minLength": 1,
"type": "string"
},
"search": {
"description": "Optional case-insensitive text search applied by the provider to labels, addresses, names, or other provider-owned searchable fields. Not for filterName accounts, portfolio-transaction-period.",
"type": "string"
},
"selected": {
"anyOf": [
{
"description": "Stable option value that is already selected in the FilterBar. Example: from:eth-mainnet:0xabc.",
"minLength": 1,
"type": "string"
},
{
"items": {
"description": "Stable option value that is already selected in the FilterBar. Example: from:eth-mainnet:0xabc.",
"minLength": 1,
"type": "string"
},
"type": "array"
}
],
"description": "Already-selected option values for selected-value hydration from URL filter state. A single HTTP query value is accepted as a one-element array. Not for filterName accounts, portfolio-transaction-period."
},
"workspaceRef": {
"description": "Workspace name or slug. Call list_workspaces to resolve it.",
"minLength": 1,
"type": "string"
}
},
"required": [
"workspaceRef",
"portfolioRef",
"filterName"
],
"type": "object"
},
"name": "get_filter_options",
"outputSchema": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"additionalProperties": false,
"anyOf": [
{
"additionalProperties": false,
"properties": {
"cacheStatus": {
"enum": [
"hit",
"miss",
"stale",
"bypass"
],
"type": "string"
},
"data": {
"items": {
"oneOf": [
{
"additionalProperties": false,
"properties": {
"identity": {
"oneOf": [
{
"additionalProperties": false,
"properties": {
"address": {
"minLength": 1,
"type": "string"
},
"category": {
"const": "counterparty",
"type": "string"
},
"chainId": {
"minLength": 1,
"type": "string"
},
"chainName": {
"minLength": 1,
"type": "string"
}
},
"required": [
"category",
"address"
],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"address": {
"minLength": 1,
"type": "string"
},
"addressBookItemType": {
"enum": [
"CUSTOMER",
"VENDOR",
"EMPLOYEE",
"OTHER"
],
"type": "string"
},
"category": {
"const": "addressBook",
"type": "string"
}
},
"required": [
"category",
"address",
"addressBookItemType"
],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"address": {
"minLength": 1,
"type": "string"
},
"category": {
"const": "wallet",
"type": "string"
},
"chainId": {
"minLength": 1,
"type": "string"
},
"chainName": {
"minLength": 1,
"type": "string"
},
"childAddresses": {
"items": {
"additionalProperties": false,
"properties": {
"address": {
"minLength": 1,
"type": "string"
},
"chainId": {
"minLength": 1,
"type": "string"
}
},
"required": [
"address",
"chainId"
],
"type": "object"
},
"type": "array"
},
"walletName": {
"type": "string"
},
"walletOwnerPortfolio": {
"additionalProperties": false,
"properties": {
"name": {
"minLength": 1,
"type": "string"
},
"slug": {
"minLength": 1,
"pattern": "^[a-z0-9-]+$",
"type": "string"
}
},
"required": [
"slug",
"name"
],
"type": "object"
},
"walletType": {
"enum": [
"BLOCKCHAIN",
"EXCHANGE",
"BANK"
],
"type": "string"
}
},
"required": [
"category",
"address",
"walletName",
"walletType",
"childAddresses"
],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"address": {
"minLength": 1,
"type": "string"
},
"category": {
"const": "raw",
"type": "string"
},
"chainId": {
"minLength": 1,
"type": "string"
},
"chainName": {
"minLength": 1,
"type": "string"
}
},
"required": [
"category",
"address"
],
"type": "object"
}
]
},
"label": {
"minLength": 1,
"type": "string"
},
"metrics": {
"items": {
"oneOf": [
{
"additionalProperties": false,
"properties": {
"metricKind": {
"const": "count",
"type": "string"
},
"unit": {
"type": "string"
},
"value": {
"type": "string"
}
},
"required": [
"metricKind",
"value",
"unit"
],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"currency": {
"type": "string"
},
"metricKind": {
"const": "money",
"type": "string"
},
"value": {
"type": "string"
}
},
"required": [
"metricKind",
"value",
"currency"
],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"metricKind": {
"const": "percentage",
"type": "string"
},
"unit": {
"const": "%",
"type": "string"
},
"value": {
"type": "string"
}
},
"required": [
"metricKind",
"value",
"unit"
],
"type": "object"
}
]
},
"type": "array"
},
"optionKind": {
"const": "portfolioTransactionAddress",
"type": "string"
},
"transfersCount": {
"maximum": 9007199254740991,
"minimum": 0,
"type": "integer"
},
"value": {
"minLength": 1,
"type": "string"
}
},
"required": [
"optionKind",
"value",
"label",
"transfersCount",
"identity"
],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"accountNumber": {
"minLength": 1,
"type": "string"
},
"accountType": {
"enum": [
"ASSET",
"LIABILITY",
"EQUITY",
"INCOME",
"EXPENSE"
],
"type": "string"
},
"assetId": {
"minLength": 1,
"type": "string"
},
"currency": {
"minLength": 1,
"type": "string"
},
"label": {
"minLength": 1,
"type": "string"
},
"metrics": {
"items": {
"oneOf": [
{
"additionalProperties": false,
"properties": {
"metricKind": {
"const": "count",
"type": "string"
},
"unit": {
"type": "string"
},
"value": {
"type": "string"
}
},
"required": [
"metricKind",
"value",
"unit"
],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"currency": {
"type": "string"
},
"metricKind": {
"const": "money",
"type": "string"
},
"value": {
"type": "string"
}
},
"required": [
"metricKind",
"value",
"currency"
],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"metricKind": {
"const": "percentage",
"type": "string"
},
"unit": {
"const": "%",
"type": "string"
},
"value": {
"type": "string"
}
},
"required": [
"metricKind",
"value",
"unit"
],
"type": "object"
}
]
},
"minItems": 1,
"type": "array"
},
"name": {
"minLength": 1,
"type": "string"
},
"optionKind": {
"const": "portfolioTransactionAccountName",
"type": "string"
},
"subType": {
"minLength": 1,
"type": "string"
},
"transactionCount": {
"maximum": 9007199254740991,
"minimum": 0,
"type": "integer"
},
"value": {
"minLength": 1,
"type": "string"
}
},
"required": [
"optionKind",
"value",
"label",
"accountNumber",
"name",
"accountType",
"subType",
"currency",
"transactionCount",
"metrics"
],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"assetId": {
"minLength": 1,
"type": "string"
},
"isSpam": {
"type": "boolean"
},
"metrics": {
"items": {
"oneOf": [
{
"additionalProperties": false,
"properties": {
"metricKind": {
"const": "count",
"type": "string"
},
"unit": {
"type": "string"
},
"value": {
"type": "string"
}
},
"required": [
"metricKind",
"value",
"unit"
],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"currency": {
"type": "string"
},
"metricKind": {
"const": "money",
"type": "string"
},
"value": {
"type": "string"
}
},
"required": [
"metricKind",
"value",
"currency"
],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"metricKind": {
"const": "percentage",
"type": "string"
},
"unit": {
"const": "%",
"type": "string"
},
"value": {
"type": "string"
}
},
"required": [
"metricKind",
"value",
"unit"
],
"type": "object"
}
]
},
"type": "array"
},
"name": {
"minLength": 1,
"type": "string"
},
"optionKind": {
"const": "portfolioTransactionAsset",
"type": "string"
},
"quoteCurrency": {
"minLength": 1,
"type": "string"
},
"symbol": {
"minLength": 1,
"type": "string"
},
"totalValue": {
"pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
"type": "string"
},
"value": {
"minLength": 1,
"type": "string"
}
},
"required": [
"optionKind",
"value",
"assetId",
"symbol",
"name",
"totalValue",
"quoteCurrency",
"isSpam",
"metrics"
],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"counterpartyId": {
"minLength": 1,
"type": "string"
},
"label": {
"minLength": 1,
"type": "string"
},
"lineCount": {
"maximum": 9007199254740991,
"minimum": 0,
"type": "integer"
},
"metrics": {
"items": {
"oneOf": [
{
"additionalProperties": false,
"properties": {
"metricKind": {
"const": "count",
"type": "string"
},
"unit": {
"type": "string"
},
"value": {
"type": "string"
}
},
"required": [
"metricKind",
"value",
"unit"
],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"currency": {
"type": "string"
},
"metricKind": {
"const": "money",
"type": "string"
},
"value": {
"type": "string"
}
},
"required": [
"metricKind",
"value",
"currency"
],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"metricKind": {
"const": "percentage",
"type": "string"
},
"unit": {
"const": "%",
"type": "string"
},
"value": {
"type": "string"
}
},
"required": [
"metricKind",
"value",
"unit"
],
"type": "object"
}
]
},
"minItems": 1,
"type": "array"
},
"name": {
"minLength": 1,
"type": "string"
},
"optionKind": {
"const": "portfolioTransactionCounterparty",
"type": "string"
},
"value": {
"minLength": 1,
"type": "string"
}
},
"required": [
"optionKind",
"value",
"label",
"name",
"counterpartyId",
"lineCount",
"metrics"
],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"address": {
"minLength": 1,
"type": "string"
},
"chainId": {
"minLength": 1,
"type": "string"
},
"chainName": {
"minLength": 1,
"type": "string"
},
"displayName": {
"minLength": 1,
"type": "string"
},
"isBalanceMatch": {
"type": "boolean"
},
"lastTransactionTimestamp": {
"format": "date-time",
"type": "string"
},
"metrics": {
"items": {
"oneOf": [
{
"additionalProperties": false,
"properties": {
"metricKind": {
"const": "count",
"type": "string"
},
"unit": {
"type": "string"
},
"value": {
"type": "string"
}
},
"required": [
"metricKind",
"value",
"unit"
],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"currency": {
"type": "string"
},
"metricKind": {
"const": "money",
"type": "string"
},
"value": {
"type": "string"
}
},
"required": [
"metricKind",
"value",
"currency"
],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"metricKind": {
"const": "percentage",
"type": "string"
},
"unit": {
"const": "%",
"type": "string"
},
"value": {
"type": "string"
}
},
"required": [
"metricKind",
"value",
"unit"
],
"type": "object"
}
]
},
"type": "array"
},
"operationsCount": {
"maximum": 9007199254740991,
"minimum": 0,
"type": "integer"
},
"optionKind": {
"const": "portfolioTransactionWallet",
"type": "string"
},
"tokenCount": {
"maximum": 9007199254740991,
"minimum": 0,
"type": "integer"
},
"value": {
"minLength": 1,
"type": "string"
},
"valueQuote": {
"minLength": 1,
"type": "string"
},
"walletType": {
"enum": [
"BLOCKCHAIN",
"EXCHANGE",
"BANK"
],
"type": "string"
}
},
"required": [
"optionKind",
"value",
"chainId",
"address",
"displayName",
"chainName",
"walletType",
"operationsCount",
"tokenCount",
"isBalanceMatch"
],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"label": {
"minLength": 1,
"type": "string"
},
"metrics": {
"items": {
"oneOf": [
{
"additionalProperties": false,
"properties": {
"metricKind": {
"const": "count",
"type": "string"
},
"unit": {
"type": "string"
},
"value": {
"type": "string"
}
},
"required": [
"metricKind",
"value",
"unit"
],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"currency": {
"type": "string"
},
"metricKind": {
"const": "money",
"type": "string"
},
"value": {
"type": "string"
}
},
"required": [
"metricKind",
"value",
"currency"
],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"metricKind": {
"const": "percentage",
"type": "string"
},
"unit": {
"const": "%",
"type": "string"
},
"value": {
"type": "string"
}
},
"required": [
"metricKind",
"value",
"unit"
],
"type": "object"
}
]
},
"minItems": 1,
"type": "array"
},
"optionKind": {
"const": "portfolioTransactionResponsibilityCenter",
"type": "string"
},
"responsibilityCenterCode": {
"minLength": 1,
"type": "string"
},
"responsibilityCenterKind": {
"enum": [
"COST",
"REVENUE",
"PROFIT",
"INVESTMENT"
],
"type": "string"
},
"responsibilityCenterName": {
"minLength": 1,
"type": "string"
},
"responsibilityCenterTypeKey": {
"pattern": "^[a-z0-9]+(_[a-z0-9]+)*$",
"type": "string"
},
"responsibilityCenterTypeName": {
"minLength": 1,
"type": "string"
},
"transactionCount": {
"maximum": 9007199254740991,
"minimum": 0,
"type": "integer"
},
"value": {
"minLength": 1,
"type": "string"
}
},
"required": [
"optionKind",
"value",
"label",
"responsibilityCenterName",
"responsibilityCenterTypeKey",
"responsibilityCenterTypeName",
"responsibilityCenterKind",
"transactionCount",
"metrics"
],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"label": {
"minLength": 1,
"type": "string"
},
"metrics": {
"items": {
"oneOf": [
{
"additionalProperties": false,
"properties": {
"metricKind": {
"const": "count",
"type": "string"
},
"unit": {
"type": "string"
},
"value": {
"type": "string"
}
},
"required": [
"metricKind",
"value",
"unit"
],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"currency": {
"type": "string"
},
"metricKind": {
"const": "money",
"type": "string"
},
"value": {
"type": "string"
}
},
"required": [
"metricKind",
"value",
"currency"
],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"metricKind": {
"const": "percentage",
"type": "string"
},
"unit": {
"const": "%",
"type": "string"
},
"value": {
"type": "string"
}
},
"required": [
"metricKind",
"value",
"unit"
],
"type": "object"
}
]
},
"type": "array"
},
"optionKind": {
"const": "portfolioTransactionLotPresence",
"type": "string"
},
"transactionCount": {
"maximum": 9007199254740991,
"minimum": 0,
"type": "integer"
},
"value": {
"enum": [
"withLots",
"withoutLots"
],
"type": "string"
}
},
"required": [
"optionKind",
"value",
"label",
"transactionCount",
"metrics"
],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"label": {
"minLength": 1,
"type": "string"
},
"metrics": {
"items": {
"oneOf": [
{
"additionalProperties": false,
"properties": {
"metricKind": {
"const": "count",
"type": "string"
},
"unit": {
"type": "string"
},
"value": {
"type": "string"
}
},
"required": [
"metricKind",
"value",
"unit"
],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"currency": {
"type": "string"
},
"metricKind": {
"const": "money",
"type": "string"
},
"value": {
"type": "string"
}
},
"required": [
"metricKind",
"value",
"currency"
],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"metricKind": {
"const": "percentage",
"type": "string"
},
"unit": {
"const": "%",
"type": "string"
},
"value": {
"type": "string"
}
},
"required": [
"metricKind",
"value",
"unit"
],
"type": "object"
}
]
},
"type": "array"
},
"optionKind": {
"const": "portfolioTransactionJournalEntryPresence",
"type": "string"
},
"transactionCount": {
"maximum": 9007199254740991,
"minimum": 0,
"type": "integer"
},
"value": {
"enum": [
"withJournalEntries",
"withoutJournalEntries"
],
"type": "string"
}
},
"required": [
"optionKind",
"value",
"label",
"transactionCount",
"metrics"
],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"label": {
"minLength": 1,
"type": "string"
},
"metrics": {
"items": {
"oneOf": [
{
"additionalProperties": false,
"properties": {
"metricKind": {
"const": "count",
"type": "string"
},
"unit": {
"type": "string"
},
"value": {
"type": "string"
}
},
"required": [
"metricKind",
"value",
"unit"
],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"currency": {
"type": "string"
},
"metricKind": {
"const": "money",
"type": "string"
},
"value": {
"type": "string"
}
},
"required": [
"metricKind",
"value",
"currency"
],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"metricKind": {
"const": "percentage",
"type": "string"
},
"unit": {
"const": "%",
"type": "string"
},
"value": {
"type": "string"
}
},
"required": [
"metricKind",
"value",
"unit"
],
"type": "object"
}
]
},
"type": "array"
},
"optionKind": {
"const": "portfolioTransactionStatusCount",
"type": "string"
},
"transactionCount": {
"maximum": 9007199254740991,
"minimum": 0,
"type": "integer"
},
"value": {
"enum": [
"PROPOSED",
"ERROR",
"POSTED",
"CLOSED"
],
"type": "string"
}
},
"required": [
"optionKind",
"value",
"label",
"transactionCount",
"metrics"
],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"label": {
"minLength": 1,
"type": "string"
},
"metrics": {
"items": {
"oneOf": [
{
"additionalProperties": false,
"properties": {
"metricKind": {
"const": "count",
"type": "string"
},
"unit": {
"type": "string"
},
"value": {
"type": "string"
}
},
"required": [
"metricKind",
"value",
"unit"
],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"currency": {
"type": "string"
},
"metricKind": {
"const": "money",
"type": "string"
},
"value": {
"type": "string"
}
},
"required": [
"metricKind",
"value",
"currency"
],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"metricKind": {
"const": "percentage",
"type": "string"
},
"unit": {
"const": "%",
"type": "string"
},
"value": {
"type": "string"
}
},
"required": [
"metricKind",
"value",
"unit"
],
"type": "object"
}
]
},
"minItems": 1,
"type": "array"
},
"optionKind": {
"const": "portfolioTransactionWarning",
"type": "string"
},
"transactionCount": {
"maximum": 9007199254740991,
"minimum": 0,
"type": "integer"
},
"value": {
"minLength": 1,
"type": "string"
}
},
"required": [
"optionKind",
"value",
"label",
"transactionCount",
"metrics"
],
"type": "object"
}
]
},
"type": "array"
},
"pagination": {
"additionalProperties": false,
"properties": {
"nextPageToken": {
"minLength": 1,
"type": "string"
},
"pageSize": {
"maximum": 9007199254740991,
"minimum": 1,
"type": "integer"
}
},
"required": [
"pageSize"
],
"type": "object"
},
"revisionHash": {
"type": "string"
}
},
"required": [
"data",
"pagination",
"cacheStatus",
"revisionHash"
],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"cacheStatus": {
"const": "hit",
"type": "string"
},
"data": {
"items": {},
"maxItems": 0,
"minItems": 0,
"type": "array"
},
"pagination": {
"additionalProperties": false,
"properties": {
"pageSize": {
"type": "number"
}
},
"required": [
"pageSize"
],
"type": "object"
},
"revisionHash": {
"type": "string"
}
},
"required": [
"data",
"pagination",
"cacheStatus",
"revisionHash"
],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"accountNumbers": {
"items": {
"additionalProperties": false,
"properties": {
"accountNumber": {
"minLength": 1,
"type": "string"
},
"label": {
"minLength": 1,
"type": "string"
},
"name": {
"minLength": 1,
"type": "string"
},
"value": {
"minLength": 1,
"type": "string"
}
},
"required": [
"value",
"label",
"accountNumber",
"name"
],
"type": "object"
},
"type": "array"
},
"accountTypes": {
"items": {
"additionalProperties": false,
"properties": {
"label": {
"minLength": 1,
"type": "string"
},
"value": {
"enum": [
"ASSET",
"LIABILITY",
"EQUITY",
"INCOME",
"EXPENSE"
],
"type": "string"
}
},
"required": [
"value",
"label"
],
"type": "object"
},
"type": "array"
},
"assets": {
"items": {
"additionalProperties": false,
"properties": {
"assetId": {
"minLength": 1,
"type": "string"
},
"label": {
"minLength": 1,
"type": "string"
},
"symbol": {
"minLength": 1,
"type": "string"
},
"value": {
"minLength": 1,
"type": "string"
}
},
"required": [
"value",
"label",
"assetId",
"symbol"
],
"type": "object"
},
"type": "array"
},
"cacheStatus": {
"enum": [
"hit",
"miss",
"stale",
"bypass"
],
"type": "string"
},
"currencies": {
"items": {
"additionalProperties": false,
"properties": {
"assetId": {
"minLength": 1,
"type": "string"
},
"label": {
"minLength": 1,
"type": "string"
},
"symbol": {
"minLength": 1,
"type": "string"
},
"value": {
"minLength": 1,
"type": "string"
}
},
"required": [
"value",
"label",
"assetId",
"symbol"
],
"type": "object"
},
"type": "array"
},
"hierarchy": {
"items": {
"additionalProperties": false,
"properties": {
"label": {
"minLength": 1,
"type": "string"
},
"value": {
"enum": [
"parent",
"leaf"
],
"type": "string"
}
},
"required": [
"value",
"label"
],
"type": "object"
},
"type": "array"
},
"includeNoWallet": {
"additionalProperties": false,
"properties": {
"label": {
"const": "No wallet",
"type": "string"
},
"value": {
"const": "noWallet",
"type": "string"
}
},
"required": [
"value",
"label"
],
"type": "object"
},
"normalBalanceTypes": {
"items": {
"additionalProperties": false,
"properties": {
"label": {
"minLength": 1,
"type": "string"
},
"value": {
"enum": [
"DR",
"CR"
],
"type": "string"
}
},
"required": [
"value",
"label"
],
"type": "object"
},
"type": "array"
},
"origins": {
"items": {
"additionalProperties": false,
"properties": {
"label": {
"minLength": 1,
"type": "string"
},
"value": {
"enum": [
"SYSTEM_MANAGED",
"SYSTEM_DEFAULT",
"USER_MANAGED"
],
"type": "string"
}
},
"required": [
"value",
"label"
],
"type": "object"
},
"type": "array"
},
"paymentLabelStates": {
"items": {
"additionalProperties": false,
"properties": {
"label": {
"minLength": 1,
"type": "string"
},
"value": {
"enum": [
"withLabel",
"withoutLabel"
],
"type": "string"
}
},
"required": [
"value",
"label"
],
"type": "object"
},
"type": "array"
},
"revisionHash": {
"type": "string"
},
"statuses": {
"items": {
"additionalProperties": false,
"properties": {
"label": {
"minLength": 1,
"type": "string"
},
"value": {
"enum": [
"active",
"archived"
],
"type": "string"
}
},
"required": [
"value",
"label"
],
"type": "object"
},
"type": "array"
},
"subTypes": {
"items": {
"additionalProperties": false,
"properties": {
"label": {
"minLength": 1,
"type": "string"
},
"value": {
"minLength": 1,
"type": "string"
}
},
"required": [
"value",
"label"
],
"type": "object"
},
"type": "array"
},
"wallets": {
"items": {
"additionalProperties": false,
"properties": {
"address": {
"minLength": 1,
"type": "string"
},
"chainId": {
"minLength": 1,
"type": "string"
},
"label": {
"minLength": 1,
"type": "string"
},
"name": {
"type": "string"
},
"value": {
"minLength": 1,
"type": "string"
}
},
"required": [
"value",
"label",
"chainId",
"address",
"name"
],
"type": "object"
},
"type": "array"
}
},
"required": [
"accountNumbers",
"accountTypes",
"subTypes",
"normalBalanceTypes",
"wallets",
"includeNoWallet",
"assets",
"currencies",
"statuses",
"paymentLabelStates",
"hierarchy",
"origins",
"cacheStatus",
"revisionHash"
],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"cacheStatus": {
"enum": [
"hit",
"miss",
"stale",
"bypass"
],
"type": "string"
},
"period": {
"additionalProperties": false,
"properties": {
"maxTimestamp": {
"format": "date-time",
"type": "string"
},
"minTimestamp": {
"format": "date-time",
"type": "string"
}
},
"required": [
"minTimestamp",
"maxTimestamp"
],
"type": "object"
},
"revisionHash": {
"type": "string"
}
},
"required": [
"cacheStatus",
"revisionHash"
],
"type": "object"
}
],
"properties": {
"accountNumbers": {
"items": {
"additionalProperties": false,
"properties": {
"accountNumber": {
"minLength": 1,
"type": "string"
},
"label": {
"minLength": 1,
"type": "string"
},
"name": {
"minLength": 1,
"type": "string"
},
"value": {
"minLength": 1,
"type": "string"
}
},
"required": [
"value",
"label",
"accountNumber",
"name"
],
"type": "object"
},
"type": "array"
},
"accountTypes": {
"items": {
"additionalProperties": false,
"properties": {
"label": {
"minLength": 1,
"type": "string"
},
"value": {
"enum": [
"ASSET",
"LIABILITY",
"EQUITY",
"INCOME",
"EXPENSE"
],
"type": "string"
}
},
"required": [
"value",
"label"
],
"type": "object"
},
"type": "array"
},
"assets": {
"items": {
"additionalProperties": false,
"properties": {
"assetId": {
"minLength": 1,
"type": "string"
},
"label": {
"minLength": 1,
"type": "string"
},
"symbol": {
"minLength": 1,
"type": "string"
},
"value": {
"minLength": 1,
"type": "string"
}
},
"required": [
"value",
"label",
"assetId",
"symbol"
],
"type": "object"
},
"type": "array"
},
"cacheStatus": {
"enum": [
"hit",
"miss",
"stale",
"bypass"
],
"type": "string"
},
"currencies": {
"items": {
"additionalProperties": false,
"properties": {
"assetId": {
"minLength": 1,
"type": "string"
},
"label": {
"minLength": 1,
"type": "string"
},
"symbol": {
"minLength": 1,
"type": "string"
},
"value": {
"minLength": 1,
"type": "string"
}
},
"required": [
"value",
"label",
"assetId",
"symbol"
],
"type": "object"
},
"type": "array"
},
"data": {
"anyOf": [
{
"items": {
"oneOf": [
{
"additionalProperties": false,
"properties": {
"identity": {
"oneOf": [
{
"additionalProperties": false,
"properties": {
"address": {
"minLength": 1,
"type": "string"
},
"category": {
"const": "counterparty",
"type": "string"
},
"chainId": {
"minLength": 1,
"type": "string"
},
"chainName": {
"minLength": 1,
"type": "string"
}
},
"required": [
"category",
"address"
],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"address": {
"minLength": 1,
"type": "string"
},
"addressBookItemType": {
"enum": [
"CUSTOMER",
"VENDOR",
"EMPLOYEE",
"OTHER"
],
"type": "string"
},
"category": {
"const": "addressBook",
"type": "string"
}
},
"required": [
"category",
"address",
"addressBookItemType"
],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"address": {
"minLength": 1,
"type": "string"
},
"category": {
"const": "wallet",
"type": "string"
},
"chainId": {
"minLength": 1,
"type": "string"
},
"chainName": {
"minLength": 1,
"type": "string"
},
"childAddresses": {
"items": {
"additionalProperties": false,
"properties": {
"address": {
"minLength": 1,
"type": "string"
},
"chainId": {
"minLength": 1,
"type": "string"
}
},
"required": [
"address",
"chainId"
],
"type": "object"
},
"type": "array"
},
"walletName": {
"type": "string"
},
"walletOwnerPortfolio": {
"additionalProperties": false,
"properties": {
"name": {
"minLength": 1,
"type": "string"
},
"slug": {
"minLength": 1,
"pattern": "^[a-z0-9-]+$",
"type": "string"
}
},
"required": [
"slug",
"name"
],
"type": "object"
},
"walletType": {
"enum": [
"BLOCKCHAIN",
"EXCHANGE",
"BANK"
],
"type": "string"
}
},
"required": [
"category",
"address",
"walletName",
"walletType",
"childAddresses"
],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"address": {
"minLength": 1,
"type": "string"
},
"category": {
"const": "raw",
"type": "string"
},
"chainId": {
"minLength": 1,
"type": "string"
},
"chainName": {
"minLength": 1,
"type": "string"
}
},
"required": [
"category",
"address"
],
"type": "object"
}
]
},
"label": {
"minLength": 1,
"type": "string"
},
"metrics": {
"items": {
"oneOf": [
{
"additionalProperties": false,
"properties": {
"metricKind": {
"const": "count",
"type": "string"
},
"unit": {
"type": "string"
},
"value": {
"type": "string"
}
},
"required": [
"metricKind",
"value",
"unit"
],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"currency": {
"type": "string"
},
"metricKind": {
"const": "money",
"type": "string"
},
"value": {
"type": "string"
}
},
"required": [
"metricKind",
"value",
"currency"
],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"metricKind": {
"const": "percentage",
"type": "string"
},
"unit": {
"const": "%",
"type": "string"
},
"value": {
"type": "string"
}
},
"required": [
"metricKind",
"value",
"unit"
],
"type": "object"
}
]
},
"type": "array"
},
"optionKind": {
"const": "portfolioTransactionAddress",
"type": "string"
},
"transfersCount": {
"maximum": 9007199254740991,
"minimum": 0,
"type": "integer"
},
"value": {
"minLength": 1,
"type": "string"
}
},
"required": [
"optionKind",
"value",
"label",
"transfersCount",
"identity"
],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"accountNumber": {
"minLength": 1,
"type": "string"
},
"accountType": {
"enum": [
"ASSET",
"LIABILITY",
"EQUITY",
"INCOME",
"EXPENSE"
],
"type": "string"
},
"assetId": {
"minLength": 1,
"type": "string"
},
"currency": {
"minLength": 1,
"type": "string"
},
"label": {
"minLength": 1,
"type": "string"
},
"metrics": {
"items": {
"oneOf": [
{
"additionalProperties": false,
"properties": {
"metricKind": {
"const": "count",
"type": "string"
},
"unit": {
"type": "string"
},
"value": {
"type": "string"
}
},
"required": [
"metricKind",
"value",
"unit"
],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"currency": {
"type": "string"
},
"metricKind": {
"const": "money",
"type": "string"
},
"value": {
"type": "string"
}
},
"required": [
"metricKind",
"value",
"currency"
],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"metricKind": {
"const": "percentage",
"type": "string"
},
"unit": {
"const": "%",
"type": "string"
},
"value": {
"type": "string"
}
},
"required": [
"metricKind",
"value",
"unit"
],
"type": "object"
}
]
},
"minItems": 1,
"type": "array"
},
"name": {
"minLength": 1,
"type": "string"
},
"optionKind": {
"const": "portfolioTransactionAccountName",
"type": "string"
},
"subType": {
"minLength": 1,
"type": "string"
},
"transactionCount": {
"maximum": 9007199254740991,
"minimum": 0,
"type": "integer"
},
"value": {
"minLength": 1,
"type": "string"
}
},
"required": [
"optionKind",
"value",
"label",
"accountNumber",
"name",
"accountType",
"subType",
"currency",
"transactionCount",
"metrics"
],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"assetId": {
"minLength": 1,
"type": "string"
},
"isSpam": {
"type": "boolean"
},
"metrics": {
"items": {
"oneOf": [
{
"additionalProperties": false,
"properties": {
"metricKind": {
"const": "count",
"type": "string"
},
"unit": {
"type": "string"
},
"value": {
"type": "string"
}
},
"required": [
"metricKind",
"value",
"unit"
],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"currency": {
"type": "string"
},
"metricKind": {
"const": "money",
"type": "string"
},
"value": {
"type": "string"
}
},
"required": [
"metricKind",
"value",
"currency"
],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"metricKind": {
"const": "percentage",
"type": "string"
},
"unit": {
"const": "%",
"type": "string"
},
"value": {
"type": "string"
}
},
"required": [
"metricKind",
"value",
"unit"
],
"type": "object"
}
]
},
"type": "array"
},
"name": {
"minLength": 1,
"type": "string"
},
"optionKind": {
"const": "portfolioTransactionAsset",
"type": "string"
},
"quoteCurrency": {
"minLength": 1,
"type": "string"
},
"symbol": {
"minLength": 1,
"type": "string"
},
"totalValue": {
"pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
"type": "string"
},
"value": {
"minLength": 1,
"type": "string"
}
},
"required": [
"optionKind",
"value",
"assetId",
"symbol",
"name",
"totalValue",
"quoteCurrency",
"isSpam",
"metrics"
],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"counterpartyId": {
"minLength": 1,
"type": "string"
},
"label": {
"minLength": 1,
"type": "string"
},
"lineCount": {
"maximum": 9007199254740991,
"minimum": 0,
"type": "integer"
},
"metrics": {
"items": {
"oneOf": [
{
"additionalProperties": false,
"properties": {
"metricKind": {
"const": "count",
"type": "string"
},
"unit": {
"type": "string"
},
"value": {
"type": "string"
}
},
"required": [
"metricKind",
"value",
"unit"
],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"currency": {
"type": "string"
},
"metricKind": {
"const": "money",
"type": "string"
},
"value": {
"type": "string"
}
},
"required": [
"metricKind",
"value",
"currency"
],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"metricKind": {
"const": "percentage",
"type": "string"
},
"unit": {
"const": "%",
"type": "string"
},
"value": {
"type": "string"
}
},
"required": [
"metricKind",
"value",
"unit"
],
"type": "object"
}
]
},
"minItems": 1,
"type": "array"
},
"name": {
"minLength": 1,
"type": "string"
},
"optionKind": {
"const": "portfolioTransactionCounterparty",
"type": "string"
},
"value": {
"minLength": 1,
"type": "string"
}
},
"required": [
"optionKind",
"value",
"label",
"name",
"counterpartyId",
"lineCount",
"metrics"
],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"address": {
"minLength": 1,
"type": "string"
},
"chainId": {
"minLength": 1,
"type": "string"
},
"chainName": {
"minLength": 1,
"type": "string"
},
"displayName": {
"minLength": 1,
"type": "string"
},
"isBalanceMatch": {
"type": "boolean"
},
"lastTransactionTimestamp": {
"format": "date-time",
"type": "string"
},
"metrics": {
"items": {
"oneOf": [
{
"additionalProperties": false,
"properties": {
"metricKind": {
"const": "count",
"type": "string"
},
"unit": {
"type": "string"
},
"value": {
"type": "string"
}
},
"required": [
"metricKind",
"value",
"unit"
],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"currency": {
"type": "string"
},
"metricKind": {
"const": "money",
"type": "string"
},
"value": {
"type": "string"
}
},
"required": [
"metricKind",
"value",
"currency"
],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"metricKind": {
"const": "percentage",
"type": "string"
},
"unit": {
"const": "%",
"type": "string"
},
"value": {
"type": "string"
}
},
"required": [
"metricKind",
"value",
"unit"
],
"type": "object"
}
]
},
"type": "array"
},
"operationsCount": {
"maximum": 9007199254740991,
"minimum": 0,
"type": "integer"
},
"optionKind": {
"const": "portfolioTransactionWallet",
"type": "string"
},
"tokenCount": {
"maximum": 9007199254740991,
"minimum": 0,
"type": "integer"
},
"value": {
"minLength": 1,
"type": "string"
},
"valueQuote": {
"minLength": 1,
"type": "string"
},
"walletType": {
"enum": [
"BLOCKCHAIN",
"EXCHANGE",
"BANK"
],
"type": "string"
}
},
"required": [
"optionKind",
"value",
"chainId",
"address",
"displayName",
"chainName",
"walletType",
"operationsCount",
"tokenCount",
"isBalanceMatch"
],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"label": {
"minLength": 1,
"type": "string"
},
"metrics": {
"items": {
"oneOf": [
{
"additionalProperties": false,
"properties": {
"metricKind": {
"const": "count",
"type": "string"
},
"unit": {
"type": "string"
},
"value": {
"type": "string"
}
},
"required": [
"metricKind",
"value",
"unit"
],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"currency": {
"type": "string"
},
"metricKind": {
"const": "money",
"type": "string"
},
"value": {
"type": "string"
}
},
"required": [
"metricKind",
"value",
"currency"
],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"metricKind": {
"const": "percentage",
"type": "string"
},
"unit": {
"const": "%",
"type": "string"
},
"value": {
"type": "string"
}
},
"required": [
"metricKind",
"value",
"unit"
],
"type": "object"
}
]
},
"minItems": 1,
"type": "array"
},
"optionKind": {
"const": "portfolioTransactionResponsibilityCenter",
"type": "string"
},
"responsibilityCenterCode": {
"minLength": 1,
"type": "string"
},
"responsibilityCenterKind": {
"enum": [
"COST",
"REVENUE",
"PROFIT",
"INVESTMENT"
],
"type": "string"
},
"responsibilityCenterName": {
"minLength": 1,
"type": "string"
},
"responsibilityCenterTypeKey": {
"pattern": "^[a-z0-9]+(_[a-z0-9]+)*$",
"type": "string"
},
"responsibilityCenterTypeName": {
"minLength": 1,
"type": "string"
},
"transactionCount": {
"maximum": 9007199254740991,
"minimum": 0,
"type": "integer"
},
"value": {
"minLength": 1,
"type": "string"
}
},
"required": [
"optionKind",
"value",
"label",
"responsibilityCenterName",
"responsibilityCenterTypeKey",
"responsibilityCenterTypeName",
"responsibilityCenterKind",
"transactionCount",
"metrics"
],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"label": {
"minLength": 1,
"type": "string"
},
"metrics": {
"items": {
"oneOf": [
{
"additionalProperties": false,
"properties": {
"metricKind": {
"const": "count",
"type": "string"
},
"unit": {
"type": "string"
},
"value": {
"type": "string"
}
},
"required": [
"metricKind",
"value",
"unit"
],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"currency": {
"type": "string"
},
"metricKind": {
"const": "money",
"type": "string"
},
"value": {
"type": "string"
}
},
"required": [
"metricKind",
"value",
"currency"
],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"metricKind": {
"const": "percentage",
"type": "string"
},
"unit": {
"const": "%",
"type": "string"
},
"value": {
"type": "string"
}
},
"required": [
"metricKind",
"value",
"unit"
],
"type": "object"
}
]
},
"type": "array"
},
"optionKind": {
"const": "portfolioTransactionLotPresence",
"type": "string"
},
"transactionCount": {
"maximum": 9007199254740991,
"minimum": 0,
"type": "integer"
},
"value": {
"enum": [
"withLots",
"withoutLots"
],
"type": "string"
}
},
"required": [
"optionKind",
"value",
"label",
"transactionCount",
"metrics"
],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"label": {
"minLength": 1,
"type": "string"
},
"metrics": {
"items": {
"oneOf": [
{
"additionalProperties": false,
"properties": {
"metricKind": {
"const": "count",
"type": "string"
},
"unit": {
"type": "string"
},
"value": {
"type": "string"
}
},
"required": [
"metricKind",
"value",
"unit"
],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"currency": {
"type": "string"
},
"metricKind": {
"const": "money",
"type": "string"
},
"value": {
"type": "string"
}
},
"required": [
"metricKind",
"value",
"currency"
],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"metricKind": {
"const": "percentage",
"type": "string"
},
"unit": {
"const": "%",
"type": "string"
},
"value": {
"type": "string"
}
},
"required": [
"metricKind",
"value",
"unit"
],
"type": "object"
}
]
},
"type": "array"
},
"optionKind": {
"const": "portfolioTransactionJournalEntryPresence",
"type": "string"
},
"transactionCount": {
"maximum": 9007199254740991,
"minimum": 0,
"type": "integer"
},
"value": {
"enum": [
"withJournalEntries",
"withoutJournalEntries"
],
"type": "string"
}
},
"required": [
"optionKind",
"value",
"label",
"transactionCount",
"metrics"
],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"label": {
"minLength": 1,
"type": "string"
},
"metrics": {
"items": {
"oneOf": [
{
"additionalProperties": false,
"properties": {
"metricKind": {
"const": "count",
"type": "string"
},
"unit": {
"type": "string"
},
"value": {
"type": "string"
}
},
"required": [
"metricKind",
"value",
"unit"
],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"currency": {
"type": "string"
},
"metricKind": {
"const": "money",
"type": "string"
},
"value": {
"type": "string"
}
},
"required": [
"metricKind",
"value",
"currency"
],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"metricKind": {
"const": "percentage",
"type": "string"
},
"unit": {
"const": "%",
"type": "string"
},
"value": {
"type": "string"
}
},
"required": [
"metricKind",
"value",
"unit"
],
"type": "object"
}
]
},
"type": "array"
},
"optionKind": {
"const": "portfolioTransactionStatusCount",
"type": "string"
},
"transactionCount": {
"maximum": 9007199254740991,
"minimum": 0,
"type": "integer"
},
"value": {
"enum": [
"PROPOSED",
"ERROR",
"POSTED",
"CLOSED"
],
"type": "string"
}
},
"required": [
"optionKind",
"value",
"label",
"transactionCount",
"metrics"
],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"label": {
"minLength": 1,
"type": "string"
},
"metrics": {
"items": {
"oneOf": [
{
"additionalProperties": false,
"properties": {
"metricKind": {
"const": "count",
"type": "string"
},
"unit": {
"type": "string"
},
"value": {
"type": "string"
}
},
"required": [
"metricKind",
"value",
"unit"
],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"currency": {
"type": "string"
},
"metricKind": {
"const": "money",
"type": "string"
},
"value": {
"type": "string"
}
},
"required": [
"metricKind",
"value",
"currency"
],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"metricKind": {
"const": "percentage",
"type": "string"
},
"unit": {
"const": "%",
"type": "string"
},
"value": {
"type": "string"
}
},
"required": [
"metricKind",
"value",
"unit"
],
"type": "object"
}
]
},
"minItems": 1,
"type": "array"
},
"optionKind": {
"const": "portfolioTransactionWarning",
"type": "string"
},
"transactionCount": {
"maximum": 9007199254740991,
"minimum": 0,
"type": "integer"
},
"value": {
"minLength": 1,
"type": "string"
}
},
"required": [
"optionKind",
"value",
"label",
"transactionCount",
"metrics"
],
"type": "object"
}
]
},
"type": "array"
},
{
"items": {},
"maxItems": 0,
"minItems": 0,
"type": "array"
}
]
},
"hierarchy": {
"items": {
"additionalProperties": false,
"properties": {
"label": {
"minLength": 1,
"type": "string"
},
"value": {
"enum": [
"parent",
"leaf"
],
"type": "string"
}
},
"required": [
"value",
"label"
],
"type": "object"
},
"type": "array"
},
"includeNoWallet": {
"additionalProperties": false,
"properties": {
"label": {
"const": "No wallet",
"type": "string"
},
"value": {
"const": "noWallet",
"type": "string"
}
},
"required": [
"value",
"label"
],
"type": "object"
},
"normalBalanceTypes": {
"items": {
"additionalProperties": false,
"properties": {
"label": {
"minLength": 1,
"type": "string"
},
"value": {
"enum": [
"DR",
"CR"
],
"type": "string"
}
},
"required": [
"value",
"label"
],
"type": "object"
},
"type": "array"
},
"origins": {
"items": {
"additionalProperties": false,
"properties": {
"label": {
"minLength": 1,
"type": "string"
},
"value": {
"enum": [
"SYSTEM_MANAGED",
"SYSTEM_DEFAULT",
"USER_MANAGED"
],
"type": "string"
}
},
"required": [
"value",
"label"
],
"type": "object"
},
"type": "array"
},
"pagination": {
"anyOf": [
{
"additionalProperties": false,
"properties": {
"nextPageToken": {
"minLength": 1,
"type": "string"
},
"pageSize": {
"maximum": 9007199254740991,
"minimum": 1,
"type": "integer"
}
},
"required": [
"pageSize"
],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"pageSize": {
"type": "number"
}
},
"required": [
"pageSize"
],
"type": "object"
}
]
},
"paymentLabelStates": {
"items": {
"additionalProperties": false,
"properties": {
"label": {
"minLength": 1,
"type": "string"
},
"value": {
"enum": [
"withLabel",
"withoutLabel"
],
"type": "string"
}
},
"required": [
"value",
"label"
],
"type": "object"
},
"type": "array"
},
"period": {
"additionalProperties": false,
"properties": {
"maxTimestamp": {
"format": "date-time",
"type": "string"
},
"minTimestamp": {
"format": "date-time",
"type": "string"
}
},
"required": [
"minTimestamp",
"maxTimestamp"
],
"type": "object"
},
"revisionHash": {
"type": "string"
},
"statuses": {
"items": {
"additionalProperties": false,
"properties": {
"label": {
"minLength": 1,
"type": "string"
},
"value": {
"enum": [
"active",
"archived"
],
"type": "string"
}
},
"required": [
"value",
"label"
],
"type": "object"
},
"type": "array"
},
"subTypes": {
"items": {
"additionalProperties": false,
"properties": {
"label": {
"minLength": 1,
"type": "string"
},
"value": {
"minLength": 1,
"type": "string"
}
},
"required": [
"value",
"label"
],
"type": "object"
},
"type": "array"
},
"wallets": {
"items": {
"additionalProperties": false,
"properties": {
"address": {
"minLength": 1,
"type": "string"
},
"chainId": {
"minLength": 1,
"type": "string"
},
"label": {
"minLength": 1,
"type": "string"
},
"name": {
"type": "string"
},
"value": {
"minLength": 1,
"type": "string"
}
},
"required": [
"value",
"label",
"chainId",
"address",
"name"
],
"type": "object"
},
"type": "array"
}
},
"required": [
"cacheStatus",
"revisionHash"
],
"type": "object"
}
},
{
"description": "Find practical Tokenbooks instructions or accounting guidance. Pass query to search by topic (MCP workflow, cost basis, fair market value, gas fees, stablecoins, ...), or pass slug to open one article directly using a slug from a previous get_help search result.",
"inputSchema": {
"additionalProperties": false,
"properties": {
"limit": {
"anyOf": [
{
"description": "Maximum number of search results, only used with query",
"maximum": 10,
"minimum": 1,
"type": "integer"
},
{
"description": "Maximum number of search results, only used with query Numeric strings are accepted for MCP client compatibility.",
"pattern": "^(?:1|2|3|4|5|6|7|8|9|10)$",
"type": "string"
}
],
"description": "Maximum number of search results, only used with query"
},
"query": {
"description": "Search query for Tokenbooks instructions or accounting guidance. Omit when using slug.",
"type": "string"
},
"slug": {
"description": "Help article slug to open directly, from a previous get_help search result. Omit when using query.",
"type": "string"
}
},
"type": "object"
},
"name": "get_help",
"outputSchema": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"additionalProperties": false,
"anyOf": [
{
"additionalProperties": false,
"properties": {
"query": {
"type": "string"
},
"results": {
"items": {
"additionalProperties": false,
"properties": {
"audience": {
"enum": [
"user",
"agent",
"both"
],
"type": "string"
},
"excerpt": {
"type": "string"
},
"relatedTools": {
"items": {
"type": "string"
},
"type": "array"
},
"score": {
"type": "number"
},
"slug": {
"type": "string"
},
"tags": {
"items": {
"type": "string"
},
"type": "array"
},
"title": {
"type": "string"
}
},
"required": [
"slug",
"title",
"excerpt",
"audience",
"relatedTools",
"tags",
"score"
],
"type": "object"
},
"type": "array"
}
},
"required": [
"query",
"results"
],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"audience": {
"enum": [
"user",
"agent",
"both"
],
"type": "string"
},
"body": {
"type": "string"
},
"relatedConcepts": {
"items": {
"type": "string"
},
"type": "array"
},
"relatedTools": {
"items": {
"type": "string"
},
"type": "array"
},
"slug": {
"type": "string"
},
"summary": {
"type": "string"
},
"tags": {
"items": {
"type": "string"
},
"type": "array"
},
"title": {
"type": "string"
}
},
"required": [
"slug",
"title",
"summary",
"body",
"audience",
"tags",
"relatedTools",
"relatedConcepts"
],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"error": {
"const": "not_found",
"type": "string"
},
"message": {
"type": "string"
},
"slug": {
"type": "string"
}
},
"required": [
"slug",
"error",
"message"
],
"type": "object"
}
],
"properties": {
"audience": {
"enum": [
"user",
"agent",
"both"
],
"type": "string"
},
"body": {
"type": "string"
},
"error": {
"const": "not_found",
"type": "string"
},
"message": {
"type": "string"
},
"query": {
"type": "string"
},
"relatedConcepts": {
"items": {
"type": "string"
},
"type": "array"
},
"relatedTools": {
"items": {
"type": "string"
},
"type": "array"
},
"results": {
"items": {
"additionalProperties": false,
"properties": {
"audience": {
"enum": [
"user",
"agent",
"both"
],
"type": "string"
},
"excerpt": {
"type": "string"
},
"relatedTools": {
"items": {
"type": "string"
},
"type": "array"
},
"score": {
"type": "number"
},
"slug": {
"type": "string"
},
"tags": {
"items": {
"type": "string"
},
"type": "array"
},
"title": {
"type": "string"
}
},
"required": [
"slug",
"title",
"excerpt",
"audience",
"relatedTools",
"tags",
"score"
],
"type": "object"
},
"type": "array"
},
"slug": {
"type": "string"
},
"summary": {
"type": "string"
},
"tags": {
"items": {
"type": "string"
},
"type": "array"
},
"title": {
"type": "string"
}
},
"type": "object"
}
},
{
"description": "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.",
"inputSchema": {
"additionalProperties": false,
"properties": {
"journalEntryId": {
"description": "Journal entry ID",
"type": "string"
},
"portfolioRef": {
"description": "Portfolio exact name or slug",
"type": "string"
},
"workspaceRef": {
"description": "Workspace exact name or slug",
"type": "string"
}
},
"required": [
"workspaceRef",
"portfolioRef",
"journalEntryId"
],
"type": "object"
},
"name": "get_journal_entry",
"outputSchema": {
"$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": {
"maximum": 9007199254740991,
"minimum": 1,
"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"
}
},
{
"description": "Trace paginated cost-basis acquisition, disposal, transfer, and adjustment history across a portfolio, optionally narrowed by asset, wallet, event kind, accounting transaction, or date.",
"inputSchema": {
"additionalProperties": false,
"properties": {
"assetRef": {
"description": "Deprecated compatibility selector for asset symbol or asset id. Prefer filter=asset_id.",
"type": "string"
},
"chainId": {
"description": "Exact chain ID when filtering to one wallet; requires walletAddress",
"type": "string"
},
"entryKind": {
"description": "Filter by lot entry kind (any of)",
"items": {
"enum": [
"ADD",
"DSP",
"CUT",
"MVE",
"RES",
"REL"
],
"type": "string"
},
"type": "array"
},
"filter": {
"description": "Public AIP-160 filter string. Supported fields: id lot identifier (=, !=, in, not in), entry_id ledger-row identifier (=, !=, in, not in), asset_id (=, !=, in, not in), asset_spam (= true or false), entry_kind (=, !=, in, not in), wallet (=, !=, in, not in using chainId:address), portfolio_transaction_id (=, !=, in, not in), timestamp (=, !=, >, >=, <, <= with ISO datetimes). The asset display name is not filterable.",
"type": "string"
},
"fromDate": {
"description": "Optional ISO timestamp lower bound",
"type": "string"
},
"limit": {
"anyOf": [
{
"description": "Maximum items to return, maximum 100. Preferred MCP pagination field.",
"maximum": 100,
"minimum": 1,
"type": "integer"
},
{
"description": "Maximum items to return, maximum 100. Preferred MCP pagination field. Numeric strings are accepted for MCP client compatibility.",
"pattern": "^(?:1|2|3|4|5|6|7|8|9|10|11|12|13|14|15|16|17|18|19|20|21|22|23|24|25|26|27|28|29|30|31|32|33|34|35|36|37|38|39|40|41|42|43|44|45|46|47|48|49|50|51|52|53|54|55|56|57|58|59|60|61|62|63|64|65|66|67|68|69|70|71|72|73|74|75|76|77|78|79|80|81|82|83|84|85|86|87|88|89|90|91|92|93|94|95|96|97|98|99|100)$",
"type": "string"
}
],
"description": "Maximum items to return, maximum 100. Preferred MCP pagination field."
},
"page": {
"description": "Page number, starting at 1",
"type": "integer"
},
"pageSize": {
"anyOf": [
{
"description": "Deprecated alias for limit, maximum 100. Prefer limit for new MCP calls.",
"maximum": 100,
"minimum": 1,
"type": "integer"
},
{
"description": "Deprecated alias for limit, maximum 100. Prefer limit for new MCP calls. Numeric strings are accepted for MCP client compatibility.",
"pattern": "^(?:1|2|3|4|5|6|7|8|9|10|11|12|13|14|15|16|17|18|19|20|21|22|23|24|25|26|27|28|29|30|31|32|33|34|35|36|37|38|39|40|41|42|43|44|45|46|47|48|49|50|51|52|53|54|55|56|57|58|59|60|61|62|63|64|65|66|67|68|69|70|71|72|73|74|75|76|77|78|79|80|81|82|83|84|85|86|87|88|89|90|91|92|93|94|95|96|97|98|99|100)$",
"type": "string"
}
],
"description": "Deprecated alias for limit, maximum 100. Prefer limit for new MCP calls."
},
"portfolioRef": {
"description": "Portfolio exact name or slug",
"type": "string"
},
"sort": {
"description": "Single public sort field. Prefix with - for descending. Supported fields: timestamp, diff, value, price",
"type": "string"
},
"toDate": {
"description": "Optional ISO timestamp upper bound",
"type": "string"
},
"walletAddress": {
"description": "Exact case-sensitive wallet address when filtering to one wallet; requires chainId",
"type": "string"
},
"workspaceRef": {
"description": "Workspace exact name or slug",
"type": "string"
}
},
"required": [
"workspaceRef",
"portfolioRef"
],
"type": "object"
},
"name": "get_lot_ledger",
"outputSchema": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"additionalProperties": false,
"properties": {
"data": {
"items": {
"additionalProperties": false,
"properties": {
"acquisitionTimestamp": {
"type": "string"
},
"assetId": {
"type": "string"
},
"assetIsSpam": {
"type": "boolean"
},
"assetName": {
"type": "string"
},
"assetSymbol": {
"type": "string"
},
"diff": {
"type": "string"
},
"entryId": {
"type": "string"
},
"entryKind": {
"enum": [
"ADD",
"DSP",
"CUT",
"MVE",
"RES",
"REL"
],
"type": "string"
},
"id": {
"type": "string"
},
"lotMethod": {
"type": "string"
},
"operationType": {
"enum": [
"DEPOSIT_FIAT",
"INCOME",
"REFUND",
"WITHDRAWAL_FIAT",
"EXPENSE",
"BUY",
"SELL",
"EXCHANGE",
"SWAP",
"MOVE",
"INTERCOMPANY_SEND",
"INTERCOMPANY_RECEIVE",
"STAKE",
"UNSTAKE",
"PROTOCOL_DEPOSIT",
"PROTOCOL_WITHDRAW",
"VAULT_DEPOSIT",
"VAULT_WITHDRAW",
"LP_IN",
"LP_OUT",
"LOAN_BORROW",
"LOAN_REPAY",
"LOAN_LIQUIDATION",
"LEND_GIVE",
"LEND_WITHDRAW",
"ADJUSTMENT",
"UNCATEGORIZED",
"SPAM"
],
"type": "string"
},
"portfolioTransactionId": {
"type": "string"
},
"positionId": {
"type": "string"
},
"price": {
"type": "string"
},
"timestamp": {
"type": "string"
},
"txHash": {
"minLength": 1,
"type": "string"
},
"value": {
"type": "string"
},
"walletAddress": {
"type": "string"
},
"walletChainId": {
"type": "string"
},
"walletName": {
"type": "string"
},
"walletTransactionTransfers": {
"items": {
"additionalProperties": false,
"properties": {
"chainId": {
"type": "string"
},
"txHash": {
"minLength": 1,
"type": "string"
}
},
"required": [
"chainId",
"txHash"
],
"type": "object"
},
"type": "array"
}
},
"required": [
"id",
"entryId",
"timestamp",
"acquisitionTimestamp",
"entryKind",
"lotMethod",
"diff",
"value",
"assetId",
"assetIsSpam",
"portfolioTransactionId",
"walletTransactionTransfers"
],
"type": "object"
},
"type": "array"
},
"pagination": {
"additionalProperties": false,
"properties": {
"page": {
"maximum": 9007199254740991,
"minimum": -9007199254740991,
"type": "integer"
},
"pageSize": {
"maximum": 9007199254740991,
"minimum": -9007199254740991,
"type": "integer"
},
"totalCount": {
"maximum": 9007199254740991,
"minimum": -9007199254740991,
"type": "integer"
},
"totalPages": {
"maximum": 9007199254740991,
"minimum": -9007199254740991,
"type": "integer"
}
},
"required": [
"page",
"pageSize",
"totalCount",
"totalPages"
],
"type": "object"
}
},
"required": [
"data",
"pagination"
],
"type": "object"
}
},
{
"description": "Read one portfolio's settings and accounting policy by exact name or slug, including its financial reporting framework and legal entity type. If legalEntityType is omitted, it is unset.",
"inputSchema": {
"additionalProperties": false,
"properties": {
"portfolioRef": {
"description": "Portfolio exact name or slug",
"type": "string"
},
"workspaceRef": {
"description": "Workspace exact name or slug",
"type": "string"
}
},
"required": [
"workspaceRef",
"portfolioRef"
],
"type": "object"
},
"name": "get_portfolio",
"outputSchema": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"additionalProperties": false,
"properties": {
"accountingConfiguration": {
"additionalProperties": false,
"properties": {
"baseCurrency": {
"type": "string"
},
"costBasisLotMethod": {
"enum": [
"FIFO",
"LIFO",
"HIFO",
"ACB"
],
"type": "string"
},
"costBasisPerWallet": {
"type": "boolean"
},
"defiDepositTreatment": {
"enum": [
"TAXABLE_EXCHANGE",
"NON_TAXABLE_RESERVATION"
],
"type": "string"
},
"financialReportingFramework": {
"default": "TAX_ONLY",
"enum": [
"TAX_ONLY",
"US_GAAP_PRE_2025",
"US_GAAP_ASC350_60",
"IFRS_IAS38",
"IFRS_IAS38_REVAL",
"IFRS_IAS2_LCNRV",
"IFRS_IAS2_BROKER_TRADER_FVLCTS",
"ASPE",
"FRS_102",
"AASB_138",
"OTHER"
],
"type": "string"
},
"gasFeeAccountingTreatment": {
"enum": [
"DISPOSAL_AND_COST_BASIS",
"EXPENSE_ONLY"
],
"type": "string"
},
"isPurchaseTaxable": {
"type": "boolean"
},
"jurisdictionCode": {
"type": "string"
},
"separateIncomeExpenseLines": {
"type": "boolean"
},
"stablecoinTreatment": {
"enum": [
"BASE",
"ASSET"
],
"type": "string"
}
},
"required": [
"gasFeeAccountingTreatment",
"isPurchaseTaxable",
"costBasisLotMethod",
"baseCurrency",
"jurisdictionCode",
"stablecoinTreatment",
"costBasisPerWallet",
"defiDepositTreatment",
"separateIncomeExpenseLines",
"financialReportingFramework"
],
"type": "object"
},
"createdAt": {
"format": "date-time",
"type": "string"
},
"currency": {
"type": "string"
},
"hasPostedActivity": {
"type": "boolean"
},
"legalEntityType": {
"enum": [
"BUSINESS",
"CORPORATION",
"INDIVIDUAL",
"TRUST",
"PARTNERSHIP"
],
"type": "string"
},
"name": {
"type": "string"
},
"reportingTimezone": {
"type": "string"
},
"slug": {
"type": "string"
},
"updatedAt": {
"format": "date-time",
"type": "string"
}
},
"required": [
"slug",
"name",
"createdAt",
"updatedAt",
"currency",
"accountingConfiguration",
"reportingTimezone",
"hasPostedActivity"
],
"type": "object"
}
},
{
"description": "Check whether each wallet's computed token balances match its latest synchronized snapshot; returns per-wallet match status, token count, last transaction time, and an overall match flag.",
"inputSchema": {
"additionalProperties": false,
"properties": {
"portfolioRef": {
"description": "Portfolio exact name or slug",
"type": "string"
},
"workspaceRef": {
"description": "Workspace exact name or slug",
"type": "string"
}
},
"required": [
"workspaceRef",
"portfolioRef"
],
"type": "object"
},
"name": "get_portfolio_balances",
"outputSchema": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"additionalProperties": false,
"properties": {
"allBalancesMatch": {
"type": "boolean"
},
"data": {
"items": {
"additionalProperties": false,
"properties": {
"address": {
"type": "string"
},
"chainId": {
"type": "string"
},
"isBalanceMatch": {
"type": "boolean"
},
"lastTransactionTimestamp": {
"format": "date-time",
"type": "string"
},
"tokenCount": {
"maximum": 9007199254740991,
"minimum": -9007199254740991,
"type": "integer"
}
},
"required": [
"chainId",
"address",
"isBalanceMatch",
"tokenCount"
],
"type": "object"
},
"type": "array"
}
},
"required": [
"data",
"allBalancesMatch"
],
"type": "object"
}
},
{
"description": "Summarize accounting problems that need review with exact counts for uncategorized, errored, and spam-related transactions, plus examples of uncategorized and errored transactions.",
"inputSchema": {
"additionalProperties": false,
"properties": {
"portfolioRef": {
"description": "Portfolio exact name or slug",
"type": "string"
},
"workspaceRef": {
"description": "Workspace exact name or slug",
"type": "string"
}
},
"required": [
"workspaceRef",
"portfolioRef"
],
"type": "object"
},
"name": "get_portfolio_issue_summary",
"outputSchema": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"additionalProperties": false,
"properties": {
"counts": {
"additionalProperties": false,
"properties": {
"spamInvolved": {
"maximum": 9007199254740991,
"minimum": 0,
"type": "integer"
},
"total": {
"maximum": 9007199254740991,
"minimum": 0,
"type": "integer"
},
"uncategorized": {
"maximum": 9007199254740991,
"minimum": 0,
"type": "integer"
},
"withErrors": {
"maximum": 9007199254740991,
"minimum": 0,
"type": "integer"
}
},
"required": [
"total",
"uncategorized",
"withErrors",
"spamInvolved"
],
"type": "object"
},
"errorsByType": {
"items": {
"additionalProperties": false,
"properties": {
"count": {
"maximum": 9007199254740991,
"minimum": 0,
"type": "integer"
},
"errorType": {
"type": "string"
}
},
"required": [
"errorType",
"count"
],
"type": "object"
},
"type": "array"
},
"isClean": {
"type": "boolean"
},
"samples": {
"additionalProperties": false,
"properties": {
"errors": {
"items": {
"additionalProperties": false,
"properties": {
"classification": {
"additionalProperties": false,
"properties": {
"detail": {
"type": "string"
},
"reason": {
"type": "string"
},
"state": {
"enum": [
"categorized",
"uncategorized",
"error"
],
"type": "string"
},
"suggestedAction": {
"additionalProperties": false,
"properties": {
"description": {
"type": "string"
},
"tool": {
"type": "string"
}
},
"required": [
"description"
],
"type": "object"
}
},
"required": [
"state"
],
"type": "object"
},
"errorDetails": {
"items": {},
"type": "array"
},
"errorMessage": {
"type": "string"
},
"id": {
"type": "string"
},
"memo": {
"type": "string"
},
"operationType": {
"type": "string"
},
"status": {
"type": "string"
},
"subType": {
"type": "string"
},
"tags": {
"items": {
"type": "string"
},
"type": "array"
},
"timestamp": {
"type": "string"
}
},
"required": [
"id",
"operationType",
"classification",
"timestamp",
"status",
"tags"
],
"type": "object"
},
"type": "array"
},
"uncategorized": {
"items": {
"additionalProperties": false,
"properties": {
"classification": {
"additionalProperties": false,
"properties": {
"detail": {
"type": "string"
},
"reason": {
"type": "string"
},
"state": {
"enum": [
"categorized",
"uncategorized",
"error"
],
"type": "string"
},
"suggestedAction": {
"additionalProperties": false,
"properties": {
"description": {
"type": "string"
},
"tool": {
"type": "string"
}
},
"required": [
"description"
],
"type": "object"
}
},
"required": [
"state"
],
"type": "object"
},
"errorDetails": {
"items": {},
"type": "array"
},
"errorMessage": {
"type": "string"
},
"id": {
"type": "string"
},
"memo": {
"type": "string"
},
"operationType": {
"type": "string"
},
"status": {
"type": "string"
},
"subType": {
"type": "string"
},
"tags": {
"items": {
"type": "string"
},
"type": "array"
},
"timestamp": {
"type": "string"
}
},
"required": [
"id",
"operationType",
"classification",
"timestamp",
"status",
"tags"
],
"type": "object"
},
"type": "array"
}
},
"required": [
"uncategorized",
"errors"
],
"type": "object"
}
},
"required": [
"isClean",
"counts",
"errorsByType",
"samples"
],
"type": "object"
}
},
{
"description": "Check the status of any queued background work — report generation, wallet sync, rule application, or a transaction change — using the requestId returned when it was queued. Works for every request kind; there is no separate report-status tool.",
"inputSchema": {
"additionalProperties": false,
"properties": {
"portfolioRef": {
"description": "Portfolio exact name or slug",
"type": "string"
},
"requestId": {
"description": "Request ID returned by the call that queued the work (e.g. incremental_sync, full_resync, request_report_export)",
"type": "string"
},
"transactionId": {
"description": "Optional transaction ID that caused the async request, for agent context",
"type": "string"
},
"workspaceRef": {
"description": "Workspace exact name or slug",
"type": "string"
}
},
"required": [
"workspaceRef",
"requestId"
],
"type": "object"
},
"name": "get_request_status",
"outputSchema": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"additionalProperties": false,
"oneOf": [
{
"additionalProperties": false,
"properties": {
"appProgress": {
"additionalProperties": false,
"properties": {
"completed": {
"type": "number"
},
"total": {
"type": "number"
},
"transactionsSynced": {
"type": "number"
}
},
"required": [
"completed",
"total",
"transactionsSynced"
],
"type": "object"
},
"completedAt": {
"format": "date-time",
"type": "string"
},
"createdAt": {
"format": "date-time",
"type": "string"
},
"error": {
"additionalProperties": false,
"properties": {
"error": {
"additionalProperties": false,
"properties": {
"code": {
"type": "string"
},
"details": {
"additionalProperties": {},
"propertyNames": {
"type": "string"
},
"type": "object"
},
"message": {
"type": "string"
},
"requestId": {
"type": "string"
}
},
"required": [
"code",
"message",
"requestId"
],
"type": "object"
}
},
"required": [
"error"
],
"type": "object"
},
"finishedOn": {
"type": "number"
},
"kind": {
"const": "job",
"type": "string"
},
"outcome": {
"additionalProperties": false,
"properties": {
"classificationState": {
"type": "string"
},
"errorTypes": {
"items": {
"type": "string"
},
"type": "array"
},
"hasError": {
"type": "boolean"
},
"operationType": {
"type": "string"
},
"suggestedAction": {},
"transactionId": {
"type": "string"
},
"type": {
"const": "portfolio_transaction",
"type": "string"
}
},
"required": [
"type",
"transactionId",
"hasError",
"errorTypes",
"suggestedAction"
],
"type": "object"
},
"progress": {
"type": "number"
},
"requestId": {
"type": "string"
},
"result": {
"additionalProperties": false,
"properties": {
"downloadUrl": {
"type": "string"
},
"fileSize": {
"type": "number"
},
"format": {
"enum": [
"xlsx",
"pdf",
"json"
],
"type": "string"
}
},
"required": [
"downloadUrl",
"fileSize",
"format"
],
"type": "object"
},
"returnValue": {},
"status": {
"enum": [
"pending",
"active",
"delayed",
"completed",
"failed"
],
"type": "string"
},
"subject": {
"additionalProperties": false,
"properties": {
"commandType": {
"type": "string"
},
"kind": {
"const": "portfolio_transaction",
"type": "string"
},
"transactionId": {
"type": "string"
}
},
"required": [
"kind",
"transactionId"
],
"type": "object"
},
"type": {
"enum": [
"sync",
"export",
"recompute",
"reclassify"
],
"type": "string"
},
"updatedAt": {
"format": "date-time",
"type": "string"
}
},
"required": [
"requestId",
"type",
"status",
"progress",
"createdAt",
"updatedAt",
"kind"
],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"completedAt": {
"format": "date-time",
"type": "string"
},
"createdAt": {
"format": "date-time",
"type": "string"
},
"error": {
"additionalProperties": false,
"properties": {
"error": {
"additionalProperties": false,
"properties": {
"code": {
"type": "string"
},
"details": {
"additionalProperties": {},
"propertyNames": {
"type": "string"
},
"type": "object"
},
"message": {
"type": "string"
},
"requestId": {
"type": "string"
}
},
"required": [
"code",
"message",
"requestId"
],
"type": "object"
}
},
"required": [
"error"
],
"type": "object"
},
"kind": {
"const": "report",
"type": "string"
},
"progressPercent": {
"maximum": 100,
"minimum": 0,
"type": "number"
},
"requestId": {
"type": "string"
},
"result": {
"oneOf": [
{
"additionalProperties": false,
"properties": {
"totals": {},
"type": {
"const": "totals",
"type": "string"
}
},
"required": [
"type",
"totals"
],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"downloadUrl": {
"type": "string"
},
"totals": {},
"type": {
"const": "full",
"type": "string"
}
},
"required": [
"type",
"totals"
],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"rows": {},
"totals": {},
"totalsOnly": {
"type": "boolean"
},
"type": {
"const": "json",
"type": "string"
}
},
"required": [
"type",
"rows",
"totals"
],
"type": "object"
}
]
},
"status": {
"enum": [
"pending",
"processing",
"completed",
"failed"
],
"type": "string"
}
},
"required": [
"status",
"progressPercent",
"createdAt",
"kind",
"requestId"
],
"type": "object"
}
],
"properties": {
"appProgress": {
"additionalProperties": false,
"properties": {
"completed": {
"type": "number"
},
"total": {
"type": "number"
},
"transactionsSynced": {
"type": "number"
}
},
"required": [
"completed",
"total",
"transactionsSynced"
],
"type": "object"
},
"completedAt": {
"anyOf": [
{
"format": "date-time",
"type": "string"
},
{
"format": "date-time",
"type": "string"
}
]
},
"createdAt": {
"anyOf": [
{
"format": "date-time",
"type": "string"
},
{
"format": "date-time",
"type": "string"
}
]
},
"error": {
"anyOf": [
{
"additionalProperties": false,
"properties": {
"error": {
"additionalProperties": false,
"properties": {
"code": {
"type": "string"
},
"details": {
"additionalProperties": {},
"propertyNames": {
"type": "string"
},
"type": "object"
},
"message": {
"type": "string"
},
"requestId": {
"type": "string"
}
},
"required": [
"code",
"message",
"requestId"
],
"type": "object"
}
},
"required": [
"error"
],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"error": {
"additionalProperties": false,
"properties": {
"code": {
"type": "string"
},
"details": {
"additionalProperties": {},
"propertyNames": {
"type": "string"
},
"type": "object"
},
"message": {
"type": "string"
},
"requestId": {
"type": "string"
}
},
"required": [
"code",
"message",
"requestId"
],
"type": "object"
}
},
"required": [
"error"
],
"type": "object"
}
]
},
"finishedOn": {
"type": "number"
},
"kind": {
"enum": [
"job",
"report"
],
"type": "string"
},
"outcome": {
"additionalProperties": false,
"properties": {
"classificationState": {
"type": "string"
},
"errorTypes": {
"items": {
"type": "string"
},
"type": "array"
},
"hasError": {
"type": "boolean"
},
"operationType": {
"type": "string"
},
"suggestedAction": {},
"transactionId": {
"type": "string"
},
"type": {
"const": "portfolio_transaction",
"type": "string"
}
},
"required": [
"type",
"transactionId",
"hasError",
"errorTypes",
"suggestedAction"
],
"type": "object"
},
"progress": {
"type": "number"
},
"progressPercent": {
"maximum": 100,
"minimum": 0,
"type": "number"
},
"requestId": {
"anyOf": [
{
"type": "string"
},
{
"type": "string"
}
]
},
"result": {
"anyOf": [
{
"additionalProperties": false,
"properties": {
"downloadUrl": {
"type": "string"
},
"fileSize": {
"type": "number"
},
"format": {
"enum": [
"xlsx",
"pdf",
"json"
],
"type": "string"
}
},
"required": [
"downloadUrl",
"fileSize",
"format"
],
"type": "object"
},
{
"oneOf": [
{
"additionalProperties": false,
"properties": {
"totals": {},
"type": {
"const": "totals",
"type": "string"
}
},
"required": [
"type",
"totals"
],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"downloadUrl": {
"type": "string"
},
"totals": {},
"type": {
"const": "full",
"type": "string"
}
},
"required": [
"type",
"totals"
],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"rows": {},
"totals": {},
"totalsOnly": {
"type": "boolean"
},
"type": {
"const": "json",
"type": "string"
}
},
"required": [
"type",
"rows",
"totals"
],
"type": "object"
}
]
}
]
},
"returnValue": {},
"status": {
"enum": [
"pending",
"active",
"delayed",
"completed",
"failed",
"processing"
],
"type": "string"
},
"subject": {
"additionalProperties": false,
"properties": {
"commandType": {
"type": "string"
},
"kind": {
"const": "portfolio_transaction",
"type": "string"
},
"transactionId": {
"type": "string"
}
},
"required": [
"kind",
"transactionId"
],
"type": "object"
},
"type": {
"enum": [
"sync",
"export",
"recompute",
"reclassify"
],
"type": "string"
},
"updatedAt": {
"format": "date-time",
"type": "string"
}
},
"required": [
"requestId",
"status",
"createdAt",
"kind"
],
"type": "object"
}
},
{
"description": "Learn what this accounting server covers before connecting: supported blockchains and fiat sources, accounting standards, plans with their capacity limits and what each tier adds, how to sign up, connection endpoint and authentication methods, and what it deliberately leaves out. Needs no credentials, so call it first when evaluating a connection, answering what Tokenbooks costs or includes, or debugging a connection.",
"inputSchema": {
"additionalProperties": false,
"properties": {},
"type": "object"
},
"name": "get_server_info",
"outputSchema": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"additionalProperties": false,
"properties": {
"authentication": {
"items": {
"type": "string"
},
"type": "array"
},
"coverage": {
"additionalProperties": false,
"properties": {
"accountingFrameworks": {
"type": "string"
},
"blockchains": {
"type": "string"
},
"fiat": {
"type": "string"
}
},
"required": [
"blockchains",
"fiat",
"accountingFrameworks"
],
"type": "object"
},
"documentationUrl": {
"type": "string"
},
"endpoint": {
"type": "string"
},
"gettingStarted": {
"additionalProperties": false,
"properties": {
"accessRequirement": {
"type": "string"
},
"signUpUrl": {
"type": "string"
},
"steps": {
"items": {
"type": "string"
},
"type": "array"
}
},
"required": [
"accessRequirement",
"signUpUrl",
"steps"
],
"type": "object"
},
"limitations": {
"items": {
"type": "string"
},
"type": "array"
},
"name": {
"type": "string"
},
"notes": {
"items": {
"type": "string"
},
"type": "array"
},
"pricing": {
"additionalProperties": false,
"properties": {
"note": {
"type": "string"
},
"plans": {
"items": {
"oneOf": [
{
"additionalProperties": false,
"properties": {
"capacity": {
"const": "negotiated",
"type": "string"
},
"name": {
"type": "string"
},
"unlocks": {
"items": {
"type": "string"
},
"type": "array"
}
},
"required": [
"name",
"capacity",
"unlocks"
],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"capacity": {
"const": "published",
"type": "string"
},
"limits": {
"additionalProperties": false,
"properties": {
"portfolios": {
"type": "number"
},
"transactions": {
"type": "number"
},
"wallets": {
"type": "number"
}
},
"required": [
"portfolios",
"wallets",
"transactions"
],
"type": "object"
},
"name": {
"type": "string"
},
"unlocks": {
"items": {
"type": "string"
},
"type": "array"
}
},
"required": [
"name",
"capacity",
"limits",
"unlocks"
],
"type": "object"
}
]
},
"type": "array"
},
"url": {
"type": "string"
}
},
"required": [
"url",
"note",
"plans"
],
"type": "object"
},
"summary": {
"type": "string"
},
"title": {
"type": "string"
}
},
"required": [
"name",
"title",
"summary",
"endpoint",
"documentationUrl",
"authentication",
"notes",
"gettingStarted",
"coverage",
"pricing",
"limitations"
],
"type": "object"
}
},
{
"description": "Check sync health across every wallet in a portfolio. Current activity takes priority over each latest finished result; safe codes and messages tell you whether to retry or reconnect credentials.",
"inputSchema": {
"additionalProperties": false,
"properties": {
"portfolioRef": {
"description": "Portfolio exact name or slug",
"type": "string"
},
"workspaceRef": {
"description": "Workspace exact name or slug",
"type": "string"
}
},
"required": [
"workspaceRef",
"portfolioRef"
],
"type": "object"
},
"name": "get_sync_status",
"outputSchema": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"additionalProperties": false,
"properties": {
"completedAt": {
"format": "date-time",
"type": "string"
},
"startedAt": {
"format": "date-time",
"type": "string"
},
"status": {
"enum": [
"pending",
"processing",
"completed",
"failed"
],
"type": "string"
},
"updatedAt": {
"format": "date-time",
"type": "string"
},
"wallets": {
"items": {
"additionalProperties": false,
"properties": {
"address": {
"type": "string"
},
"chainId": {
"type": "string"
},
"errorMessage": {
"type": "string"
},
"lastSyncAt": {
"format": "date-time",
"type": "string"
},
"progressPercent": {
"maximum": 100,
"minimum": 0,
"type": "number"
},
"status": {
"enum": [
"pending",
"processing",
"completed",
"failed"
],
"type": "string"
},
"syncMessages": {
"items": {
"oneOf": [
{
"additionalProperties": false,
"properties": {
"code": {
"const": "EXCHANGE_RECONNECT_REQUIRED",
"type": "string"
},
"details": {
"additionalProperties": false,
"properties": {
"errorType": {
"const": "ExternalServiceAuthenticationError",
"type": "string"
},
"provider": {
"minLength": 1,
"type": "string"
},
"reconnectRequired": {
"const": true,
"type": "boolean"
}
},
"required": [
"provider",
"reconnectRequired",
"errorType"
],
"type": "object"
},
"message": {
"minLength": 1,
"type": "string"
},
"severity": {
"default": "ERROR",
"enum": [
"ERROR",
"WARN"
],
"type": "string"
}
},
"required": [
"code",
"message",
"severity",
"details"
],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"code": {
"const": "SYNC_PROCESSING_FAILED",
"type": "string"
},
"details": {
"additionalProperties": false,
"properties": {
"errorType": {
"const": "SyncProcessingError",
"type": "string"
},
"retryable": {
"const": true,
"type": "boolean"
}
},
"required": [
"retryable",
"errorType"
],
"type": "object"
},
"message": {
"minLength": 1,
"type": "string"
},
"severity": {
"default": "ERROR",
"enum": [
"ERROR",
"WARN"
],
"type": "string"
}
},
"required": [
"code",
"message",
"severity",
"details"
],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"code": {
"const": "SYNC_WARNING",
"type": "string"
},
"details": {
"additionalProperties": false,
"properties": {
"errorType": {
"const": "SyncWarning",
"type": "string"
}
},
"required": [
"errorType"
],
"type": "object"
},
"message": {
"minLength": 1,
"type": "string"
},
"severity": {
"default": "ERROR",
"enum": [
"ERROR",
"WARN"
],
"type": "string"
}
},
"required": [
"code",
"message",
"severity",
"details"
],
"type": "object"
}
]
},
"type": "array"
},
"totalTransactions": {
"maximum": 9007199254740991,
"minimum": -9007199254740991,
"type": "integer"
},
"transactionsSynced": {
"maximum": 9007199254740991,
"minimum": -9007199254740991,
"type": "integer"
}
},
"required": [
"syncMessages",
"chainId",
"address",
"status",
"progressPercent"
],
"type": "object"
},
"type": "array"
}
},
"required": [
"status",
"wallets",
"updatedAt"
],
"type": "object"
}
},
{
"description": "Preview or post a complete CSV or XLSX file of balanced manual adjustment journals for one portfolio. Preview first; post only after reviewing every blocking issue, then resend the unchanged source with its preview token and any resolutions.",
"inputSchema": {
"additionalProperties": false,
"properties": {
"action": {
"description": "preview: Parse the file and report what it would import, writing nothing. Always preview before posting. post: Commit the import that a preview of the same file produced.",
"enum": [
"preview",
"post"
],
"type": "string"
},
"contentBase64": {
"description": "CSV or XLSX source file content as base64-encoded bytes (max 5 MiB).",
"minLength": 1,
"type": "string"
},
"fileName": {
"description": "Original CSV or XLSX source filename.",
"maxLength": 255,
"minLength": 1,
"pattern": "^[^/\\\\]+\\.(?:csv|xlsx)$",
"type": "string"
},
"portfolioRef": {
"description": "Portfolio name or slug inside that workspace. Call list_portfolios to resolve it.",
"minLength": 1,
"type": "string"
},
"previewToken": {
"description": "Token returned by the matching preview, proving the file has not changed since. Only for action post; required for each.",
"pattern": "^[0-9a-f]{64}$",
"type": "string"
},
"resolutions": {
"description": "Only for action post; required for each.",
"items": {
"anyOf": [
{
"additionalProperties": false,
"properties": {
"accountNumber": {
"description": "Ledger account to use for that row, from list_journal_line_assignment_options (type: ledger_account).",
"minLength": 1,
"type": "string"
},
"kind": {
"description": "Kind of reference this row fixes.",
"enum": [
"account"
],
"type": "string"
},
"locator": {
"oneOf": [
{
"additionalProperties": false,
"properties": {
"format": {
"description": "Source file format.",
"enum": [
"csv"
],
"type": "string"
},
"lineNumber": {
"description": "1-based line number in the CSV file.",
"maximum": 9007199254740991,
"minimum": 1,
"type": "integer"
}
},
"required": [
"format",
"lineNumber"
],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"format": {
"description": "Source file format.",
"enum": [
"xlsx"
],
"type": "string"
},
"rowNumber": {
"description": "1-based row number within the sheet.",
"maximum": 9007199254740991,
"minimum": 1,
"type": "integer"
},
"sheetName": {
"description": "Worksheet the row belongs to.",
"minLength": 1,
"type": "string"
}
},
"required": [
"format",
"rowNumber",
"sheetName"
],
"type": "object"
}
]
}
},
"required": [
"accountNumber",
"kind",
"locator"
],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"externalId": {
"description": "Counterparty's external identifier, as recorded on the counterparty.",
"minLength": 1,
"type": "string"
},
"kind": {
"description": "Kind of reference this row fixes.",
"enum": [
"counterparty"
],
"type": "string"
},
"locator": {
"oneOf": [
{
"additionalProperties": false,
"properties": {
"format": {
"description": "Source file format.",
"enum": [
"csv"
],
"type": "string"
},
"lineNumber": {
"description": "1-based line number in the CSV file.",
"maximum": 9007199254740991,
"minimum": 1,
"type": "integer"
}
},
"required": [
"format",
"lineNumber"
],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"format": {
"description": "Source file format.",
"enum": [
"xlsx"
],
"type": "string"
},
"rowNumber": {
"description": "1-based row number within the sheet.",
"maximum": 9007199254740991,
"minimum": 1,
"type": "integer"
},
"sheetName": {
"description": "Worksheet the row belongs to.",
"minLength": 1,
"type": "string"
}
},
"required": [
"format",
"rowNumber",
"sheetName"
],
"type": "object"
}
]
}
},
"required": [
"externalId",
"kind",
"locator"
],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"kind": {
"description": "Kind of reference this row fixes.",
"enum": [
"counterparty"
],
"type": "string"
},
"locator": {
"oneOf": [
{
"additionalProperties": false,
"properties": {
"format": {
"description": "Source file format.",
"enum": [
"csv"
],
"type": "string"
},
"lineNumber": {
"description": "1-based line number in the CSV file.",
"maximum": 9007199254740991,
"minimum": 1,
"type": "integer"
}
},
"required": [
"format",
"lineNumber"
],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"format": {
"description": "Source file format.",
"enum": [
"xlsx"
],
"type": "string"
},
"rowNumber": {
"description": "1-based row number within the sheet.",
"maximum": 9007199254740991,
"minimum": 1,
"type": "integer"
},
"sheetName": {
"description": "Worksheet the row belongs to.",
"minLength": 1,
"type": "string"
}
},
"required": [
"format",
"rowNumber",
"sheetName"
],
"type": "object"
}
]
},
"name": {
"description": "Counterparty name to use for that row, from list_journal_line_assignment_options (type: counterparty).",
"minLength": 1,
"type": "string"
}
},
"required": [
"kind",
"locator",
"name"
],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"centerName": {
"description": "Responsibility center to use for that row, from list_journal_line_assignment_options (type: responsibility_center).",
"minLength": 1,
"type": "string"
},
"kind": {
"description": "Kind of reference this row fixes.",
"enum": [
"responsibilityCenter"
],
"type": "string"
},
"locator": {
"oneOf": [
{
"additionalProperties": false,
"properties": {
"format": {
"description": "Source file format.",
"enum": [
"csv"
],
"type": "string"
},
"lineNumber": {
"description": "1-based line number in the CSV file.",
"maximum": 9007199254740991,
"minimum": 1,
"type": "integer"
}
},
"required": [
"format",
"lineNumber"
],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"format": {
"description": "Source file format.",
"enum": [
"xlsx"
],
"type": "string"
},
"rowNumber": {
"description": "1-based row number within the sheet.",
"maximum": 9007199254740991,
"minimum": 1,
"type": "integer"
},
"sheetName": {
"description": "Worksheet the row belongs to.",
"minLength": 1,
"type": "string"
}
},
"required": [
"format",
"rowNumber",
"sheetName"
],
"type": "object"
}
]
},
"typeKey": {
"description": "Responsibility center type the name belongs to, such as costCenter.",
"minLength": 1,
"type": "string"
}
},
"required": [
"centerName",
"kind",
"locator",
"typeKey"
],
"type": "object"
}
]
},
"type": "array"
},
"workspaceRef": {
"description": "Workspace name or slug. Call list_workspaces to resolve it.",
"minLength": 1,
"type": "string"
}
},
"required": [
"workspaceRef",
"portfolioRef",
"action",
"contentBase64",
"fileName"
],
"type": "object"
},
"name": "import_adjustment_journals",
"outputSchema": {
"$defs": {
"AjFullIssues": {
"additionalProperties": false,
"properties": {
"candidates": {
"items": {
"oneOf": [
{
"additionalProperties": false,
"properties": {
"accountNumber": {
"minLength": 1,
"type": "string"
},
"kind": {
"const": "account",
"type": "string"
},
"name": {
"minLength": 1,
"type": "string"
}
},
"required": [
"accountNumber",
"kind",
"name"
],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"externalId": {
"minLength": 1,
"type": "string"
},
"kind": {
"const": "counterparty",
"type": "string"
},
"name": {
"minLength": 1,
"type": "string"
}
},
"required": [
"kind",
"name"
],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"kind": {
"const": "responsibilityCenter",
"type": "string"
},
"name": {
"minLength": 1,
"type": "string"
},
"typeKey": {
"minLength": 1,
"type": "string"
},
"typeName": {
"minLength": 1,
"type": "string"
}
},
"required": [
"kind",
"name",
"typeKey",
"typeName"
],
"type": "object"
}
]
},
"type": "array"
},
"items": {
"items": {
"$ref": "#/$defs/AjIssue"
},
"type": "array"
},
"mode": {
"const": "full",
"type": "string"
}
},
"required": [
"mode",
"items",
"candidates"
],
"type": "object"
},
"AjIssue": {
"anyOf": [
{
"anyOf": [
{
"additionalProperties": false,
"properties": {
"code": {
"enum": [
"ADJUSTMENT_JOURNAL_SOURCE_LAYOUT_INVALID",
"ADJUSTMENT_JOURNAL_SOURCE_UNREADABLE"
],
"type": "string"
}
},
"required": [
"code"
],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"code": {
"enum": [
"ADJUSTMENT_JOURNAL_SOURCE_VALUE_INVALID",
"ADJUSTMENT_JOURNAL_REQUIRED_VALUE_MISSING",
"ADJUSTMENT_JOURNAL_EFFECTIVE_DATE_INVALID",
"ADJUSTMENT_JOURNAL_AMOUNT_INVALID",
"ADJUSTMENT_JOURNAL_DEBIT_CREDIT_INVALID",
"ADJUSTMENT_JOURNAL_EFFECTIVE_TIMESTAMP_CONFLICT",
"ADJUSTMENT_JOURNAL_MEMO_CONFLICT",
"ADJUSTMENT_JOURNAL_DEBIT_MISSING",
"ADJUSTMENT_JOURNAL_CREDIT_MISSING",
"ADJUSTMENT_JOURNAL_UNBALANCED"
],
"type": "string"
},
"column": {
"minLength": 1,
"type": "string"
},
"entryId": {
"minLength": 1,
"type": "string"
},
"locator": {
"$ref": "#/$defs/AjLocator"
}
},
"required": [
"code",
"locator"
],
"type": "object"
}
]
},
{
"additionalProperties": false,
"properties": {
"accountNumber": {
"minLength": 1,
"type": "string"
},
"code": {
"enum": [
"ADJUSTMENT_JOURNAL_ACCOUNT_NOT_FOUND_OR_INELIGIBLE",
"ADJUSTMENT_JOURNAL_ACCOUNT_AMBIGUOUS",
"ADJUSTMENT_JOURNAL_ACCOUNT_BASE_CURRENCY_REQUIRED"
],
"type": "string"
},
"kind": {
"const": "account",
"type": "string"
},
"locator": {
"$ref": "#/$defs/AjLocator"
}
},
"required": [
"accountNumber",
"code",
"kind",
"locator"
],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"code": {
"enum": [
"ADJUSTMENT_JOURNAL_COUNTERPARTY_NOT_FOUND_OR_INELIGIBLE",
"ADJUSTMENT_JOURNAL_COUNTERPARTY_AMBIGUOUS"
],
"type": "string"
},
"kind": {
"const": "counterparty",
"type": "string"
},
"locator": {
"$ref": "#/$defs/AjLocator"
},
"reference": {
"oneOf": [
{
"additionalProperties": false,
"properties": {
"externalId": {
"minLength": 1,
"type": "string"
},
"kind": {
"const": "external-id",
"type": "string"
},
"name": {
"minLength": 1,
"type": "string"
}
},
"required": [
"externalId",
"kind"
],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"kind": {
"const": "name",
"type": "string"
},
"name": {
"minLength": 1,
"type": "string"
}
},
"required": [
"kind",
"name"
],
"type": "object"
}
]
}
},
"required": [
"code",
"kind",
"locator",
"reference"
],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"code": {
"enum": [
"ADJUSTMENT_JOURNAL_RESPONSIBILITY_CENTER_NOT_FOUND_OR_INELIGIBLE",
"ADJUSTMENT_JOURNAL_RESPONSIBILITY_CENTER_AMBIGUOUS"
],
"type": "string"
},
"kind": {
"const": "responsibilityCenter",
"type": "string"
},
"locator": {
"$ref": "#/$defs/AjLocator"
},
"name": {
"minLength": 1,
"type": "string"
},
"typeKey": {
"minLength": 1,
"type": "string"
}
},
"required": [
"code",
"kind",
"locator",
"name",
"typeKey"
],
"type": "object"
}
]
},
"AjIssueSummary": {
"additionalProperties": false,
"properties": {
"counts": {
"items": {
"additionalProperties": false,
"properties": {
"code": {
"enum": [
"ADJUSTMENT_JOURNAL_SOURCE_LAYOUT_INVALID",
"ADJUSTMENT_JOURNAL_SOURCE_UNREADABLE",
"ADJUSTMENT_JOURNAL_SOURCE_VALUE_INVALID",
"ADJUSTMENT_JOURNAL_REQUIRED_VALUE_MISSING",
"ADJUSTMENT_JOURNAL_EFFECTIVE_DATE_INVALID",
"ADJUSTMENT_JOURNAL_AMOUNT_INVALID",
"ADJUSTMENT_JOURNAL_DEBIT_CREDIT_INVALID",
"ADJUSTMENT_JOURNAL_EFFECTIVE_TIMESTAMP_CONFLICT",
"ADJUSTMENT_JOURNAL_MEMO_CONFLICT",
"ADJUSTMENT_JOURNAL_DEBIT_MISSING",
"ADJUSTMENT_JOURNAL_CREDIT_MISSING",
"ADJUSTMENT_JOURNAL_UNBALANCED",
"ADJUSTMENT_JOURNAL_ACCOUNT_NOT_FOUND_OR_INELIGIBLE",
"ADJUSTMENT_JOURNAL_ACCOUNT_AMBIGUOUS",
"ADJUSTMENT_JOURNAL_ACCOUNT_BASE_CURRENCY_REQUIRED",
"ADJUSTMENT_JOURNAL_COUNTERPARTY_NOT_FOUND_OR_INELIGIBLE",
"ADJUSTMENT_JOURNAL_COUNTERPARTY_AMBIGUOUS",
"ADJUSTMENT_JOURNAL_RESPONSIBILITY_CENTER_NOT_FOUND_OR_INELIGIBLE",
"ADJUSTMENT_JOURNAL_RESPONSIBILITY_CENTER_AMBIGUOUS"
],
"type": "string"
},
"count": {
"maximum": 9007199254740991,
"minimum": 0,
"type": "integer"
}
},
"required": [
"code",
"count"
],
"type": "object"
},
"type": "array"
},
"examples": {
"items": {
"$ref": "#/$defs/AjIssue"
},
"maxItems": 5,
"type": "array"
},
"mode": {
"const": "summary",
"type": "string"
},
"nextAction": {
"const": "Correct the source file, then preview the complete file again before posting.",
"type": "string"
},
"omittedCandidateCount": {
"maximum": 9007199254740991,
"minimum": 0,
"type": "integer"
},
"omittedIssueCount": {
"maximum": 9007199254740991,
"minimum": 0,
"type": "integer"
}
},
"required": [
"mode",
"counts",
"examples",
"omittedIssueCount",
"omittedCandidateCount",
"nextAction"
],
"type": "object"
},
"AjLocator": {
"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"
}
]
},
"AjPostJournal": {
"additionalProperties": false,
"properties": {
"sourceEntryId": {
"minLength": 1,
"type": "string"
},
"transactionId": {
"minLength": 1,
"type": "string"
}
},
"required": [
"sourceEntryId",
"transactionId"
],
"type": "object"
},
"AjPreviewJournal": {
"additionalProperties": false,
"properties": {
"credit": {
"pattern": "^-?\\d+(\\.\\d+)?$",
"type": "string"
},
"debit": {
"pattern": "^-?\\d+(\\.\\d+)?$",
"type": "string"
},
"effectiveDate": {
"pattern": "^\\d{4}-\\d{2}-\\d{2}$",
"type": "string"
},
"entryId": {
"minLength": 1,
"type": "string"
},
"memo": {
"minLength": 1,
"type": "string"
}
},
"required": [
"credit",
"debit",
"effectiveDate",
"entryId"
],
"type": "object"
},
"AjPreviewSummary": {
"additionalProperties": false,
"properties": {
"baseCurrency": {
"minLength": 1,
"type": "string"
},
"journalCount": {
"maximum": 9007199254740991,
"minimum": 0,
"type": "integer"
},
"sourceRowCount": {
"maximum": 9007199254740991,
"minimum": 0,
"type": "integer"
},
"totalCredit": {
"pattern": "^-?\\d+(\\.\\d+)?$",
"type": "string"
},
"totalDebit": {
"pattern": "^-?\\d+(\\.\\d+)?$",
"type": "string"
}
},
"required": [
"baseCurrency",
"journalCount",
"sourceRowCount",
"totalCredit",
"totalDebit"
],
"type": "object"
}
},
"$schema": "https://json-schema.org/draft/2020-12/schema",
"additionalProperties": false,
"oneOf": [
{
"additionalProperties": false,
"properties": {
"action": {
"const": "preview",
"type": "string"
},
"issues": {
"oneOf": [
{
"$ref": "#/$defs/AjFullIssues"
},
{
"$ref": "#/$defs/AjIssueSummary"
}
]
},
"journals": {
"items": {
"$ref": "#/$defs/AjPreviewJournal"
},
"maxItems": 3,
"type": "array"
},
"omittedJournalCount": {
"maximum": 9007199254740991,
"minimum": 0,
"type": "integer"
},
"previewToken": {
"pattern": "^[0-9a-f]{64}$",
"type": "string"
},
"readyToPost": {
"type": "boolean"
},
"summary": {
"$ref": "#/$defs/AjPreviewSummary"
}
},
"required": [
"action",
"previewToken",
"readyToPost",
"summary",
"journals",
"omittedJournalCount",
"issues"
],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"action": {
"const": "post",
"type": "string"
},
"createdJournalCount": {
"maximum": 9007199254740991,
"minimum": 1,
"type": "integer"
},
"importRef": {
"maxLength": 128,
"minLength": 1,
"pattern": "^adjustment-journal-import-[a-z0-9-]+$",
"type": "string"
},
"journals": {
"items": {
"$ref": "#/$defs/AjPostJournal"
},
"maxItems": 3,
"type": "array"
},
"omittedJournalCount": {
"maximum": 9007199254740991,
"minimum": 0,
"type": "integer"
}
},
"required": [
"action",
"importRef",
"createdJournalCount",
"journals",
"omittedJournalCount"
],
"type": "object"
}
],
"properties": {
"action": {
"enum": [
"preview",
"post"
],
"type": "string"
},
"createdJournalCount": {
"maximum": 9007199254740991,
"minimum": 1,
"type": "integer"
},
"importRef": {
"maxLength": 128,
"minLength": 1,
"pattern": "^adjustment-journal-import-[a-z0-9-]+$",
"type": "string"
},
"issues": {
"oneOf": [
{
"$ref": "#/$defs/AjFullIssues"
},
{
"$ref": "#/$defs/AjIssueSummary"
}
]
},
"journals": {
"anyOf": [
{
"items": {
"$ref": "#/$defs/AjPreviewJournal"
},
"maxItems": 3,
"type": "array"
},
{
"items": {
"$ref": "#/$defs/AjPostJournal"
},
"maxItems": 3,
"type": "array"
}
]
},
"omittedJournalCount": {
"maximum": 9007199254740991,
"minimum": 0,
"type": "integer"
},
"previewToken": {
"pattern": "^[0-9a-f]{64}$",
"type": "string"
},
"readyToPost": {
"type": "boolean"
},
"summary": {
"$ref": "#/$defs/AjPreviewSummary"
}
},
"required": [
"action",
"journals",
"omittedJournalCount"
],
"type": "object"
}
},
{
"description": "Pull only recent blockchain and wallet activity while keeping all existing transaction and accounting history; use this routine refresh before reports or when new activity is missing, then track its requestId with get_request_status.",
"inputSchema": {
"additionalProperties": false,
"properties": {
"portfolioRef": {
"description": "Portfolio exact name or slug",
"type": "string"
},
"wallets": {
"description": "Optional exact wallet pairs; omit to sync every wallet in the portfolio",
"items": {
"additionalProperties": false,
"properties": {
"chainId": {
"description": "Exact chain ID for the wallet",
"type": "string"
},
"walletAddress": {
"description": "Exact case-sensitive wallet address",
"type": "string"
}
},
"required": [
"chainId",
"walletAddress"
],
"type": "object"
},
"type": "array"
},
"workspaceRef": {
"description": "Workspace exact name or slug",
"type": "string"
}
},
"required": [
"workspaceRef",
"portfolioRef"
],
"type": "object"
},
"name": "incremental_sync",
"outputSchema": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"additionalProperties": false,
"properties": {
"portfolioSlug": {
"type": "string"
},
"requestId": {
"type": "string"
}
},
"required": [
"portfolioSlug",
"requestId"
],
"type": "object"
}
},
{
"description": "Find saved accounting rules, filter them, or recover the exact ruleRef needed to preview, edit, or delete one rule.",
"inputSchema": {
"additionalProperties": false,
"properties": {
"accountNumbers": {
"description": "Ledger account numbers as CSV or repeated query values.",
"items": {
"description": "Chart-of-accounts number, from list_journal_line_assignment_options (type: ledger_account).",
"maxLength": 8,
"minLength": 1,
"type": "string"
},
"maxItems": 100,
"type": "array"
},
"actionTypes": {
"description": "Action types as CSV or repeated query values.",
"items": {
"description": "What a rule changes when it matches.",
"enum": [
"SET_COUNTERPARTY",
"SET_LEDGER_ACCOUNT",
"SET_RESPONSIBILITY_CENTERS"
],
"type": "string"
},
"maxItems": 25,
"type": "array"
},
"assetIds": {
"description": "Asset ids as CSV or repeated query values.",
"items": {
"minLength": 1,
"type": "string"
},
"maxItems": 100,
"type": "array"
},
"conditionFields": {
"description": "Condition fields as CSV or repeated query values.",
"items": {
"description": "Which part of a transaction the condition tests.",
"enum": [
"fromAddressLabel",
"toAddressLabel",
"fromAddress",
"toAddress",
"direction",
"wallet",
"asset",
"assetClass",
"stablecoin",
"chain",
"operationType",
"accountSubType",
"accountNumber",
"counterparty",
"fiatValue",
"entryType",
"accountType"
],
"type": "string"
},
"maxItems": 50,
"type": "array"
},
"counterpartyNames": {
"description": "Counterparty names as CSV or repeated query values.",
"items": {
"description": "Counterparty name, from list_journal_line_assignment_options (type: counterparty).",
"minLength": 1,
"type": "string"
},
"maxItems": 100,
"type": "array"
},
"enabled": {
"description": "Keep only enabled rules, or only disabled ones. Omit to return both.",
"type": "boolean"
},
"limit": {
"default": 50,
"description": "Requested number of resources to return. Oversized values are clamped to the route limit.",
"maximum": 9007199254740991,
"minimum": 1,
"type": "integer"
},
"pageToken": {
"description": "Opaque token returned by the previous list response.",
"minLength": 1,
"type": "string"
},
"portfolioRef": {
"description": "Portfolio name or slug inside that workspace. Call list_portfolios to resolve it.",
"minLength": 1,
"type": "string"
},
"ruleRef": {
"description": "Saved rule handle, from list_accounting_rules.",
"minLength": 1,
"type": "string"
},
"search": {
"description": "Free-text match against rule names.",
"maxLength": 200,
"minLength": 1,
"type": "string"
},
"wallets": {
"description": "Wallet selectors as chainId:walletAddress values.",
"items": {
"description": "Wallet as chainId:walletAddress, e.g. eth-mainnet:0xabc.",
"minLength": 3,
"type": "string"
},
"maxItems": 100,
"type": "array"
},
"workspaceRef": {
"description": "Workspace name or slug. Call list_workspaces to resolve it.",
"minLength": 1,
"type": "string"
}
},
"required": [
"workspaceRef",
"portfolioRef"
],
"type": "object"
},
"name": "list_accounting_rules",
"outputSchema": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"additionalProperties": false,
"properties": {
"data": {
"items": {
"additionalProperties": false,
"properties": {
"action": {
"additionalProperties": false,
"properties": {
"actions": {
"items": {
"oneOf": [
{
"additionalProperties": false,
"properties": {
"counterpartyName": {
"minLength": 1,
"type": "string"
},
"target": {
"const": "LINE",
"type": "string"
},
"type": {
"const": "SET_COUNTERPARTY",
"type": "string"
}
},
"required": [
"type",
"target"
],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"accountNumber": {
"maxLength": 8,
"minLength": 1,
"type": "string"
},
"target": {
"const": "LINE",
"type": "string"
},
"type": {
"const": "SET_LEDGER_ACCOUNT",
"type": "string"
}
},
"required": [
"type",
"target"
],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"responsibilityCenterAssignments": {
"items": {
"additionalProperties": false,
"properties": {
"responsibilityCenterName": {
"minLength": 1,
"type": "string"
},
"responsibilityCenterTypeKey": {
"pattern": "^[a-z0-9]+(_[a-z0-9]+)*$",
"type": "string"
}
},
"type": "object"
},
"minItems": 1,
"type": "array"
},
"target": {
"const": "LINE",
"type": "string"
},
"type": {
"const": "SET_RESPONSIBILITY_CENTERS",
"type": "string"
}
},
"required": [
"type",
"target",
"responsibilityCenterAssignments"
],
"type": "object"
}
]
},
"minItems": 1,
"type": "array"
},
"formatVersion": {
"const": 1,
"type": "number"
}
},
"required": [
"formatVersion",
"actions"
],
"type": "object"
},
"conditions": {
"additionalProperties": false,
"properties": {
"all": {
"items": {
"oneOf": [
{
"additionalProperties": false,
"properties": {
"field": {
"const": "fromAddressLabel",
"type": "string"
},
"operator": {
"enum": [
"equals",
"contains",
"notEquals",
"notContains"
],
"type": "string"
},
"value": {
"minLength": 1,
"type": "string"
}
},
"required": [
"field",
"operator",
"value"
],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"field": {
"const": "toAddressLabel",
"type": "string"
},
"operator": {
"enum": [
"equals",
"contains",
"notEquals",
"notContains"
],
"type": "string"
},
"value": {
"minLength": 1,
"type": "string"
}
},
"required": [
"field",
"operator",
"value"
],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"field": {
"const": "fromAddress",
"type": "string"
},
"operator": {
"enum": [
"equals",
"contains"
],
"type": "string"
},
"value": {
"minLength": 1,
"type": "string"
}
},
"required": [
"field",
"operator",
"value"
],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"field": {
"const": "toAddress",
"type": "string"
},
"operator": {
"enum": [
"equals",
"contains"
],
"type": "string"
},
"value": {
"minLength": 1,
"type": "string"
}
},
"required": [
"field",
"operator",
"value"
],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"field": {
"const": "direction",
"type": "string"
},
"operator": {
"enum": [
"equals",
"notEquals"
],
"type": "string"
},
"value": {
"enum": [
"IN",
"OUT",
"GAS"
],
"type": "string"
}
},
"required": [
"field",
"operator",
"value"
],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"field": {
"const": "asset",
"type": "string"
},
"operator": {
"enum": [
"in",
"notIn"
],
"type": "string"
},
"value": {
"items": {
"minLength": 1,
"type": "string"
},
"minItems": 1,
"type": "array"
}
},
"required": [
"field",
"operator",
"value"
],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"field": {
"const": "assetClass",
"type": "string"
},
"operator": {
"enum": [
"in",
"notIn"
],
"type": "string"
},
"value": {
"items": {
"enum": [
"ERC20",
"FIAT",
"NATIVE",
"REBASE_LST",
"INTEREST_BEARING",
"VALUE_ACCRUING",
"LP_SHARE",
"DEBT",
"REFLECT",
"VOTE_ESCROWED",
"NFT"
],
"type": "string"
},
"minItems": 1,
"type": "array"
}
},
"required": [
"field",
"operator",
"value"
],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"field": {
"const": "stablecoin",
"type": "string"
},
"operator": {
"enum": [
"equals"
],
"type": "string"
},
"value": {
"type": "boolean"
}
},
"required": [
"field",
"operator",
"value"
],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"field": {
"const": "chain",
"type": "string"
},
"operator": {
"enum": [
"in",
"notIn"
],
"type": "string"
},
"value": {
"items": {
"minLength": 1,
"type": "string"
},
"minItems": 1,
"type": "array"
}
},
"required": [
"field",
"operator",
"value"
],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"field": {
"const": "operationType",
"type": "string"
},
"operator": {
"enum": [
"in",
"notIn"
],
"type": "string"
},
"value": {
"items": {
"enum": [
"DEPOSIT_FIAT",
"INCOME",
"REFUND",
"WITHDRAWAL_FIAT",
"EXPENSE",
"BUY",
"SELL",
"EXCHANGE",
"SWAP",
"MOVE",
"INTERCOMPANY_SEND",
"INTERCOMPANY_RECEIVE",
"STAKE",
"UNSTAKE",
"PROTOCOL_DEPOSIT",
"PROTOCOL_WITHDRAW",
"VAULT_DEPOSIT",
"VAULT_WITHDRAW",
"LP_IN",
"LP_OUT",
"LOAN_BORROW",
"LOAN_REPAY",
"LOAN_LIQUIDATION",
"LEND_GIVE",
"LEND_WITHDRAW",
"ADJUSTMENT",
"UNCATEGORIZED",
"SPAM"
],
"type": "string"
},
"minItems": 1,
"type": "array"
}
},
"required": [
"field",
"operator",
"value"
],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"field": {
"const": "accountSubType",
"type": "string"
},
"operator": {
"enum": [
"in",
"notIn"
],
"type": "string"
},
"value": {
"items": {
"enum": [
"EXT",
"BNK",
"INC",
"EXP",
"LINT",
"LLIQ",
"LQLOSS",
"CLOSS",
"CBNK",
"CBAS",
"CRE",
"CGL",
"CEXP",
"CINC",
"TRADING_REVENUE",
"COGS",
"INVENTORY_VALUATION_ADJUSTMENT",
"INVENTORY_COGS_ADJUSTMENT",
"INVENTORY_WRITE_DOWN",
"INVENTORY_REMEASUREMENT_GAIN",
"INVENTORY_REMEASUREMENT_LOSS",
"CNP",
"UINC",
"UEXP",
"OFEXP",
"OFINC",
"ICINV",
"CAP",
"UNREALISED_FV_GAIN",
"UNREALISED_FV_LOSS",
"CFVA"
],
"type": "string"
},
"minItems": 1,
"type": "array"
}
},
"required": [
"field",
"operator",
"value"
],
"type": "object"
},
{
"oneOf": [
{
"additionalProperties": false,
"properties": {
"field": {
"const": "fiatValue",
"type": "string"
},
"operator": {
"const": "gt",
"type": "string"
},
"value": {
"pattern": "^-?\\d+(\\.\\d+)?$",
"type": "string"
}
},
"required": [
"field",
"operator",
"value"
],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"field": {
"const": "fiatValue",
"type": "string"
},
"operator": {
"const": "lt",
"type": "string"
},
"value": {
"pattern": "^-?\\d+(\\.\\d+)?$",
"type": "string"
}
},
"required": [
"field",
"operator",
"value"
],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"field": {
"const": "fiatValue",
"type": "string"
},
"operator": {
"const": "gte",
"type": "string"
},
"value": {
"pattern": "^-?\\d+(\\.\\d+)?$",
"type": "string"
}
},
"required": [
"field",
"operator",
"value"
],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"field": {
"const": "fiatValue",
"type": "string"
},
"operator": {
"const": "lte",
"type": "string"
},
"value": {
"pattern": "^-?\\d+(\\.\\d+)?$",
"type": "string"
}
},
"required": [
"field",
"operator",
"value"
],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"field": {
"const": "fiatValue",
"type": "string"
},
"operator": {
"const": "between",
"type": "string"
},
"value": {
"maxItems": 2,
"minItems": 2,
"prefixItems": [
{
"pattern": "^-?\\d+(\\.\\d+)?$",
"type": "string"
},
{
"pattern": "^-?\\d+(\\.\\d+)?$",
"type": "string"
}
],
"type": "array"
}
},
"required": [
"field",
"operator",
"value"
],
"type": "object"
}
]
},
{
"additionalProperties": false,
"properties": {
"field": {
"const": "entryType",
"type": "string"
},
"operator": {
"enum": [
"equals"
],
"type": "string"
},
"value": {
"enum": [
"DR",
"CR"
],
"type": "string"
}
},
"required": [
"field",
"operator",
"value"
],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"field": {
"const": "accountType",
"type": "string"
},
"operator": {
"enum": [
"in",
"notIn"
],
"type": "string"
},
"value": {
"items": {
"enum": [
"ASSET",
"LIABILITY",
"EQUITY",
"INCOME",
"EXPENSE"
],
"type": "string"
},
"minItems": 1,
"type": "array"
}
},
"required": [
"field",
"operator",
"value"
],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"field": {
"const": "wallet",
"type": "string"
},
"operator": {
"enum": [
"in",
"notIn"
],
"type": "string"
},
"value": {
"items": {
"additionalProperties": false,
"properties": {
"address": {
"minLength": 1,
"type": "string"
},
"chainId": {
"minLength": 1,
"type": "string"
}
},
"required": [
"chainId",
"address"
],
"type": "object"
},
"type": "array"
}
},
"required": [
"field",
"operator",
"value"
],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"field": {
"const": "accountNumber",
"type": "string"
},
"operator": {
"enum": [
"in",
"notIn"
],
"type": "string"
},
"value": {
"items": {
"maxLength": 8,
"minLength": 1,
"type": "string"
},
"type": "array"
}
},
"required": [
"operator",
"field",
"value"
],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"field": {
"const": "counterparty",
"type": "string"
},
"operator": {
"enum": [
"in",
"notIn"
],
"type": "string"
},
"value": {
"items": {
"minLength": 1,
"type": "string"
},
"type": "array"
}
},
"required": [
"field",
"operator",
"value"
],
"type": "object"
}
]
},
"minItems": 1,
"type": "array"
},
"formatVersion": {
"const": 1,
"type": "number"
}
},
"required": [
"formatVersion",
"all"
],
"type": "object"
},
"createdAt": {
"format": "date-time",
"type": "string"
},
"enabled": {
"type": "boolean"
},
"hasInvalidDefinition": {
"type": "boolean"
},
"hasUnresolvedReferences": {
"type": "boolean"
},
"name": {
"type": "string"
},
"ruleRef": {
"minLength": 1,
"type": "string"
},
"updatedAt": {
"format": "date-time",
"type": "string"
},
"version": {
"maximum": 9007199254740991,
"minimum": -9007199254740991,
"type": "integer"
}
},
"required": [
"name",
"enabled",
"version",
"hasInvalidDefinition",
"hasUnresolvedReferences",
"createdAt",
"updatedAt",
"ruleRef"
],
"type": "object"
},
"type": "array"
},
"pagination": {
"additionalProperties": false,
"properties": {
"nextPageToken": {
"minLength": 1,
"type": "string"
},
"pageSize": {
"maximum": 9007199254740991,
"minimum": 1,
"type": "integer"
}
},
"required": [
"pageSize"
],
"type": "object"
}
},
"required": [
"data",
"pagination"
],
"type": "object"
}
},
{
"description": "Find which blockchains support wallet syncing by name, Tokenbooks chain slug, or numeric EVM network ID; results identify EVM networks whose shared 0x address can be added together with add_wallet.",
"inputSchema": {
"additionalProperties": false,
"properties": {
"evmOnly": {
"description": "When true, return only EVM-compatible chains",
"type": "boolean"
},
"query": {
"description": "Optional chain name, slug, or EVM chain id (e.g. \"Optimism\", \"optimism-mainnet\", \"10\")",
"type": "string"
}
},
"type": "object"
},
"name": "list_chains",
"outputSchema": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"additionalProperties": false,
"properties": {
"data": {
"items": {
"additionalProperties": false,
"properties": {
"chainRef": {
"type": "string"
},
"description": {
"type": "string"
},
"evmChainId": {
"type": "string"
},
"isEvm": {
"type": "boolean"
},
"logoUrl": {
"type": "string"
},
"name": {
"type": "string"
}
},
"required": [
"chainRef",
"name",
"isEvm"
],
"type": "object"
},
"type": "array"
}
},
"required": [
"data"
],
"type": "object"
}
},
{
"description": "Find the ledger accounts, saved counterparties, or responsibility centers (departments, projects, or other reporting groups) that can be assigned to an accounting entry line. Pass type to choose the lookup: ledger_account returns each account's accountNumber, counterparty returns the counterparty name, and responsibility_center returns its type key and center name.",
"inputSchema": {
"additionalProperties": false,
"properties": {
"limit": {
"description": "Maximum items to return, maximum 100. Preferred MCP pagination field. Only for type counterparty.",
"maximum": 100,
"minimum": 1,
"type": "integer"
},
"page": {
"description": "Page number, starting at 1 Only for type counterparty.",
"maximum": 9007199254740991,
"minimum": 1,
"type": "integer"
},
"pageSize": {
"description": "Deprecated alias for limit, maximum 100. Prefer limit for new MCP calls. Only for type counterparty.",
"maximum": 100,
"minimum": 1,
"type": "integer"
},
"portfolioRef": {
"description": "Portfolio name or slug inside that workspace. Call list_portfolios to resolve it.",
"minLength": 1,
"type": "string"
},
"search": {
"description": "Filter by name (also matches account number for ledger accounts)",
"minLength": 1,
"type": "string"
},
"type": {
"description": "ledger_account: Ledger accounts assignable to a journal line. counterparty: Saved vendors, people, or organizations assignable to a journal line. responsibility_center: Departments, projects, or other reporting groups (responsibility centers) assignable to a journal line.",
"enum": [
"ledger_account",
"counterparty",
"responsibility_center"
],
"type": "string"
},
"workspaceRef": {
"description": "Workspace name or slug. Call list_workspaces to resolve it.",
"minLength": 1,
"type": "string"
}
},
"required": [
"workspaceRef",
"portfolioRef",
"type"
],
"type": "object"
},
"name": "list_journal_line_assignment_options",
"outputSchema": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"additionalProperties": false,
"oneOf": [
{
"additionalProperties": false,
"properties": {
"accounts": {
"$ref": "#/properties/accounts"
},
"type": {
"const": "ledger_account",
"type": "string"
}
},
"required": [
"type",
"accounts"
],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"counterparties": {
"$ref": "#/properties/counterparties"
},
"hasMore": {
"$ref": "#/properties/hasMore"
},
"total": {
"$ref": "#/properties/total"
},
"type": {
"const": "counterparty",
"type": "string"
}
},
"required": [
"type",
"counterparties",
"total",
"hasMore"
],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"responsibilityCenters": {
"$ref": "#/properties/responsibilityCenters"
},
"type": {
"const": "responsibility_center",
"type": "string"
}
},
"required": [
"type",
"responsibilityCenters"
],
"type": "object"
}
],
"properties": {
"accounts": {
"items": {
"additionalProperties": false,
"properties": {
"accountNumber": {
"type": "string"
},
"accountType": {
"type": "string"
},
"currency": {
"type": "string"
},
"isActive": {
"type": "boolean"
},
"name": {
"type": "string"
},
"subType": {
"type": "string"
}
},
"required": [
"accountNumber",
"name",
"accountType",
"currency",
"isActive"
],
"type": "object"
},
"type": "array"
},
"counterparties": {
"items": {
"additionalProperties": false,
"properties": {
"isActive": {
"type": "boolean"
},
"name": {
"type": "string"
},
"type": {
"type": "string"
}
},
"required": [
"name",
"type",
"isActive"
],
"type": "object"
},
"type": "array"
},
"hasMore": {
"type": "boolean"
},
"responsibilityCenters": {
"items": {
"additionalProperties": false,
"properties": {
"description": {
"type": "string"
},
"name": {
"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"
}
},
"required": [
"name"
],
"type": "object"
},
"type": "array"
},
"total": {
"type": "number"
},
"type": {
"enum": [
"ledger_account",
"counterparty",
"responsibility_center"
],
"type": "string"
}
},
"required": [
"type"
],
"type": "object"
}
},
{
"description": "Find accounting transactions—called Portfolio Transactions in Tokenbooks—for review or reconciliation; filter by status, type, errors, spam, wallet, or asset, optionally attaching grouped contributing raw source records (10-record page cap). Pass transactionId to explain full details of one transaction instead: classification, journal entry, cost-basis links, and (rawWithDetails) its sanitized event logs and contract calls.",
"inputSchema": {
"additionalProperties": false,
"properties": {
"address": {
"description": "Match transfer from/to address (case-insensitive)",
"minLength": 1,
"type": "string"
},
"assetRefs": {
"description": "Filter by asset symbol (case-insensitive)",
"items": {
"minLength": 1,
"type": "string"
},
"minItems": 1,
"type": "array"
},
"chainId": {
"description": "Public wallet chain ID.",
"minLength": 1,
"type": "string"
},
"chainIds": {
"description": "Optional chain ID filters",
"items": {
"minLength": 1,
"type": "string"
},
"minItems": 1,
"type": "array"
},
"counterparty": {
"description": "Filter by counterparty name (case-insensitive)",
"items": {
"minLength": 1,
"type": "string"
},
"minItems": 1,
"type": "array"
},
"defiPositionKey": {
"description": "Filter by protocol-defined DeFi position key",
"minLength": 1,
"type": "string"
},
"defiPositionWalletAddress": {
"description": "Filter by DeFi position wallet address",
"minLength": 1,
"type": "string"
},
"defiPositionWalletChainId": {
"description": "Filter by DeFi position wallet chain ID",
"minLength": 1,
"type": "string"
},
"errorType": {
"description": "Filter by error/warning code, e.g. [\"FmvNotAvailable\"]",
"items": {
"minLength": 1,
"type": "string"
},
"minItems": 1,
"type": "array"
},
"fromDate": {
"description": "Optional ISO timestamp lower bound",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$",
"type": "string"
},
"hasError": {
"description": "true: has a processing error; false: error-free",
"type": "boolean"
},
"hasJournalEntry": {
"description": "true: has a non-empty journal entry; false: does not",
"type": "boolean"
},
"hasLots": {
"description": "true: produced cost-basis lots; false: did not",
"type": "boolean"
},
"include": {
"description": "Include grouped contributing raw source transactions; rawWithDetails adds sanitized provider details and requires transactionId",
"enum": [
"raw",
"rawWithDetails"
],
"type": "string"
},
"isSpam": {
"description": "true: transfers involve spam tokens; false: non-spam only",
"type": "boolean"
},
"limit": {
"anyOf": [
{
"description": "Maximum Portfolio Transactions to return, maximum 100.",
"maximum": 100,
"minimum": 1,
"type": "integer"
},
{
"description": "Maximum Portfolio Transactions to return, maximum 100. Numeric strings are accepted for MCP client compatibility.",
"pattern": "^(?:1|2|3|4|5|6|7|8|9|10|11|12|13|14|15|16|17|18|19|20|21|22|23|24|25|26|27|28|29|30|31|32|33|34|35|36|37|38|39|40|41|42|43|44|45|46|47|48|49|50|51|52|53|54|55|56|57|58|59|60|61|62|63|64|65|66|67|68|69|70|71|72|73|74|75|76|77|78|79|80|81|82|83|84|85|86|87|88|89|90|91|92|93|94|95|96|97|98|99|100)$",
"type": "string"
}
],
"description": "Maximum Portfolio Transactions to return, maximum 100."
},
"maxValue": {
"description": "Maximum transfer fiat quote value (inclusive), as a decimal string",
"pattern": "^-?\\d+(\\.\\d+)?$",
"type": "string"
},
"minValue": {
"description": "Minimum transfer fiat quote value (inclusive), as a decimal string",
"pattern": "^-?\\d+(\\.\\d+)?$",
"type": "string"
},
"operationType": {
"description": "Filter by operation type, e.g. [\"UNCATEGORIZED\"]",
"items": {
"enum": [
"DEPOSIT_FIAT",
"INCOME",
"REFUND",
"WITHDRAWAL_FIAT",
"EXPENSE",
"BUY",
"SELL",
"EXCHANGE",
"SWAP",
"MOVE",
"INTERCOMPANY_SEND",
"INTERCOMPANY_RECEIVE",
"STAKE",
"UNSTAKE",
"PROTOCOL_DEPOSIT",
"PROTOCOL_WITHDRAW",
"VAULT_DEPOSIT",
"VAULT_WITHDRAW",
"LP_IN",
"LP_OUT",
"LOAN_BORROW",
"LOAN_REPAY",
"LOAN_LIQUIDATION",
"LEND_GIVE",
"LEND_WITHDRAW",
"ADJUSTMENT",
"UNCATEGORIZED",
"SPAM"
],
"type": "string"
},
"minItems": 1,
"type": "array"
},
"pageToken": {
"description": "Opaque token returned by the previous list response.",
"minLength": 1,
"type": "string"
},
"portfolioRef": {
"description": "Portfolio name or slug inside that workspace. Call list_portfolios to resolve it.",
"minLength": 1,
"type": "string"
},
"responsibilityCenterTypeKeys": {
"description": "Filter by journal-line responsibility-center type key (e.g. primary, goal; from list_journal_line_assignment_options)",
"items": {
"description": "Stable responsibility-center type key. It uses lowercase alphanumeric snake_case segments.",
"pattern": "^[a-z0-9]+(_[a-z0-9]+)*$",
"type": "string"
},
"minItems": 1,
"type": "array"
},
"search": {
"description": "Free-text search over memo, tx hash, transaction ID",
"minLength": 1,
"type": "string"
},
"sort": {
"default": "-timestamp",
"description": "Timestamp sort. Prefix with - for descending order.",
"enum": [
"timestamp",
"-timestamp"
],
"type": "string"
},
"status": {
"description": "Filter by status, e.g. [\"POSTED\"]",
"items": {
"enum": [
"PROPOSED",
"ERROR",
"POSTED",
"CLOSED"
],
"type": "string"
},
"minItems": 1,
"type": "array"
},
"subType": {
"description": "Filter by operation sub-type (case-insensitive)",
"items": {
"minLength": 1,
"type": "string"
},
"minItems": 1,
"type": "array"
},
"toDate": {
"description": "Optional ISO timestamp upper bound",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$",
"type": "string"
},
"transactionId": {
"description": "Look up one transaction by handle instead of listing",
"minLength": 1,
"type": "string"
},
"txHash": {
"description": "Filter by exact on-chain transaction hash",
"minLength": 1,
"type": "string"
},
"walletAddress": {
"description": "Public wallet address on the selected chain.",
"minLength": 1,
"type": "string"
},
"workspaceRef": {
"description": "Workspace name or slug. Call list_workspaces to resolve it.",
"minLength": 1,
"type": "string"
}
},
"required": [
"workspaceRef",
"portfolioRef"
],
"type": "object"
},
"name": "list_portfolio_transactions",
"outputSchema": {
"$defs": {
"JournalEntryResponseDto": {
"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": {
"maximum": 9007199254740991,
"minimum": 1,
"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"
},
"RawTransactionCompleteDto": {
"additionalProperties": false,
"properties": {
"blockHeight": {
"pattern": "^\\d+$",
"type": "string"
},
"hash": {
"type": "string"
},
"id": {
"minLength": 1,
"type": "string"
},
"memo": {
"type": "string"
},
"processingState": {
"enum": [
"PROCESSED",
"PARTIAL",
"UNPROCESSED"
],
"type": "string"
},
"timestamp": {
"format": "date-time",
"type": "string"
},
"wallet": {
"additionalProperties": false,
"properties": {
"address": {
"type": "string"
},
"chainId": {
"type": "string"
},
"name": {
"type": "string"
},
"type": {
"enum": [
"BLOCKCHAIN",
"EXCHANGE",
"BANK"
],
"type": "string"
}
},
"required": [
"chainId",
"address",
"type"
],
"type": "object"
},
"walletOperations": {
"items": {
"additionalProperties": false,
"properties": {
"defi": {
"additionalProperties": false,
"properties": {
"operation": {
"anyOf": [
{
"const": "PROTOCOL_DEPOSIT",
"type": "string"
},
{
"const": "PROTOCOL_WITHDRAW",
"type": "string"
},
{
"const": "VAULT_DEPOSIT",
"type": "string"
},
{
"const": "VAULT_WITHDRAW",
"type": "string"
},
{
"const": "SWAP",
"type": "string"
},
{
"const": "PROVIDE_LIQUIDITY",
"type": "string"
},
{
"const": "REMOVE_LIQUIDITY",
"type": "string"
},
{
"const": "LEND",
"type": "string"
},
{
"const": "WITHDRAW_LEND",
"type": "string"
},
{
"const": "LEND_REDUCE",
"type": "string"
},
{
"const": "BORROW",
"type": "string"
},
{
"const": "REPAY",
"type": "string"
},
{
"const": "LOAN_LIQUIDATION",
"type": "string"
},
{
"const": "STAKE",
"type": "string"
},
{
"const": "UNSTAKE",
"type": "string"
},
{
"const": "CLAIM_REWARDS",
"type": "string"
}
]
},
"positionRef": {
"type": "string"
},
"tokenRole": {
"anyOf": [
{
"const": "UNDERLYING",
"type": "string"
},
{
"const": "COLLATERAL",
"type": "string"
},
{
"const": "RECEIPT_TOKEN",
"type": "string"
},
{
"const": "LP_SHARE",
"type": "string"
},
{
"const": "LIABILITY_TOKEN",
"type": "string"
},
{
"const": "REWARD",
"type": "string"
},
{
"const": "OTHER",
"type": "string"
}
]
}
},
"type": "object"
},
"from": {
"additionalProperties": false,
"properties": {
"address": {
"type": "string"
},
"label": {
"type": "string"
}
},
"required": [
"address"
],
"type": "object"
},
"portfolioTransactionId": {
"type": "string"
},
"quote": {
"additionalProperties": false,
"properties": {
"currency": {
"type": "string"
},
"meta": {
"additionalProperties": false,
"properties": {
"s": {
"enum": [
"SYNC_SOURCE",
"FMV_ENGINE",
"DERIVED_REPRESENTED",
"DERIVED_SIBLING",
"POLICY",
"MANUAL"
],
"type": "string"
},
"ts": {
"maximum": 8210266876799,
"minimum": 1,
"type": "integer"
}
},
"required": [
"s"
],
"type": "object"
},
"source": {
"type": "string"
},
"value": {
"pattern": "^-?\\d+(\\.\\d+)?$",
"type": "string"
}
},
"type": "object"
},
"to": {
"additionalProperties": false,
"properties": {
"address": {
"type": "string"
},
"label": {
"type": "string"
}
},
"required": [
"address"
],
"type": "object"
},
"token": {
"additionalProperties": false,
"properties": {
"address": {
"type": "string"
},
"assetId": {
"type": "string"
},
"chainId": {
"type": "string"
},
"decimals": {
"maximum": 9007199254740991,
"minimum": 0,
"type": "integer"
},
"isSpam": {
"type": "boolean"
},
"representsTokenAddress": {
"type": "string"
},
"stablecoinPeggedFiatCurrency": {
"type": "string"
},
"symbol": {
"type": "string"
},
"type": {
"anyOf": [
{
"const": "ERC20",
"type": "string"
},
{
"const": "NATIVE",
"type": "string"
},
{
"const": "FIAT",
"type": "string"
},
{
"const": "NFT",
"type": "string"
},
{
"const": "REBASE_LST",
"type": "string"
},
{
"const": "INTEREST_BEARING",
"type": "string"
},
{
"const": "VALUE_ACCRUING",
"type": "string"
},
{
"const": "LP_SHARE",
"type": "string"
},
{
"const": "DEBT",
"type": "string"
},
{
"const": "REFLECT",
"type": "string"
},
{
"const": "VOTE_ESCROWED",
"type": "string"
}
]
}
},
"required": [
"chainId",
"address",
"assetId",
"symbol",
"type",
"decimals",
"isSpam"
],
"type": "object"
},
"txIndex": {
"maximum": 9007199254740991,
"minimum": 0,
"type": "integer"
},
"type": {
"enum": [
"IN",
"OUT",
"GAS",
"SELF"
],
"type": "string"
},
"value": {
"pattern": "^-?\\d+(\\.\\d+)?$",
"type": "string"
}
},
"required": [
"txIndex",
"type",
"from",
"to",
"token",
"value"
],
"type": "object"
},
"type": "array"
}
},
"required": [
"id",
"wallet",
"hash",
"blockHeight",
"timestamp",
"processingState",
"walletOperations"
],
"type": "object"
},
"RawTransactionWithDetailsDto__schema0": {
"anyOf": [
{
"type": "string"
},
{
"type": "number"
},
{
"type": "boolean"
},
{
"type": "null"
},
{
"items": {
"$ref": "#/$defs/RawTransactionWithDetailsDto__schema0"
},
"type": "array"
},
{
"additionalProperties": {
"$ref": "#/$defs/RawTransactionWithDetailsDto__schema0"
},
"propertyNames": {
"type": "string"
},
"type": "object"
}
]
}
},
"$schema": "https://json-schema.org/draft/2020-12/schema",
"additionalProperties": false,
"anyOf": [
{
"additionalProperties": false,
"properties": {
"data": {
"$ref": "#/properties/data"
},
"pagination": {
"$ref": "#/properties/pagination"
},
"resultType": {
"const": "transactionList",
"type": "string"
}
},
"required": [
"data",
"pagination",
"resultType"
],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"classification": {
"$ref": "#/properties/classification"
},
"errorDetails": {
"$ref": "#/properties/errorDetails"
},
"errorMessage": {
"$ref": "#/properties/errorMessage"
},
"fileAttachments": {
"$ref": "#/properties/fileAttachments"
},
"id": {
"$ref": "#/properties/id"
},
"intercompanyPair": {
"$ref": "#/properties/intercompanyPair"
},
"journalEntry": {
"$ref": "#/properties/journalEntry"
},
"memo": {
"$ref": "#/properties/memo"
},
"operationType": {
"$ref": "#/properties/operationType"
},
"portfolioTransactionContext": {
"$ref": "#/properties/portfolioTransactionContext"
},
"rawTransactions": {
"$ref": "#/properties/rawTransactions"
},
"resultType": {
"const": "transaction",
"type": "string"
},
"status": {
"$ref": "#/properties/status"
},
"subType": {
"$ref": "#/properties/subType"
},
"systemNotes": {
"$ref": "#/properties/systemNotes"
},
"tags": {
"$ref": "#/properties/tags"
},
"timestamp": {
"$ref": "#/properties/timestamp"
},
"walletOperations": {
"$ref": "#/properties/walletOperations"
},
"walletSource": {
"$ref": "#/properties/walletSource"
}
},
"required": [
"id",
"operationType",
"classification",
"timestamp",
"status",
"tags",
"fileAttachments",
"walletOperations",
"resultType"
],
"type": "object"
}
],
"properties": {
"classification": {
"additionalProperties": false,
"properties": {
"detail": {
"type": "string"
},
"reason": {
"type": "string"
},
"state": {
"enum": [
"categorized",
"uncategorized",
"error"
],
"type": "string"
},
"suggestedAction": {
"additionalProperties": false,
"properties": {
"description": {
"type": "string"
},
"tool": {
"type": "string"
}
},
"required": [
"description"
],
"type": "object"
}
},
"required": [
"state"
],
"type": "object"
},
"data": {
"items": {
"additionalProperties": false,
"properties": {
"classification": {
"additionalProperties": false,
"properties": {
"detail": {
"type": "string"
},
"reason": {
"type": "string"
},
"state": {
"enum": [
"categorized",
"uncategorized",
"error"
],
"type": "string"
},
"suggestedAction": {
"additionalProperties": false,
"properties": {
"description": {
"type": "string"
},
"tool": {
"type": "string"
}
},
"required": [
"description"
],
"type": "object"
}
},
"required": [
"state"
],
"type": "object"
},
"errorDetails": {
"items": {},
"type": "array"
},
"errorMessage": {
"type": "string"
},
"fileAttachments": {
"items": {},
"type": "array"
},
"id": {
"type": "string"
},
"intercompanyPair": {
"additionalProperties": false,
"properties": {
"counterpartOperationType": {
"type": "string"
},
"counterpartPortfolioName": {
"type": "string"
},
"counterpartPortfolioSlug": {
"minLength": 1,
"pattern": "^[a-z0-9-]+$",
"type": "string"
},
"counterpartPortfolioTransactionId": {
"type": "string"
},
"counterpartStatus": {
"enum": [
"PROPOSED",
"ERROR",
"POSTED",
"CLOSED"
],
"type": "string"
},
"counterpartSubType": {
"type": "string"
},
"lotLinkCount": {
"maximum": 9007199254740991,
"minimum": 0,
"type": "integer"
},
"pairId": {
"type": "string"
},
"side": {
"enum": [
"SEND",
"RECEIVE"
],
"type": "string"
},
"treatment": {
"type": "string"
}
},
"required": [
"pairId",
"side",
"counterpartPortfolioName",
"counterpartPortfolioSlug",
"counterpartPortfolioTransactionId",
"counterpartOperationType",
"counterpartStatus",
"lotLinkCount"
],
"type": "object"
},
"journalEntry": {
"$ref": "#/$defs/JournalEntryResponseDto"
},
"memo": {
"type": "string"
},
"operationType": {
"type": "string"
},
"portfolioTransactionContext": {
"additionalProperties": {},
"propertyNames": {
"type": "string"
},
"type": "object"
},
"rawTransactions": {
"items": {
"$ref": "#/$defs/RawTransactionCompleteDto"
},
"type": "array"
},
"status": {
"type": "string"
},
"subType": {
"type": "string"
},
"systemNotes": {
"type": "string"
},
"tags": {
"items": {
"type": "string"
},
"type": "array"
},
"timestamp": {
"type": "string"
},
"walletOperations": {
"items": {
"additionalProperties": false,
"properties": {
"assetId": {
"type": "string"
},
"assetSymbol": {
"type": "string"
},
"chainId": {
"type": "string"
},
"defiOperation": {
"type": "string"
},
"defiPositionId": {
"type": "string"
},
"defiPositionRef": {
"type": "string"
},
"fromAddress": {
"type": "string"
},
"fromAddressLabel": {
"type": "string"
},
"isSpam": {
"type": "boolean"
},
"quoteCurrency": {
"type": "string"
},
"quoteMeta": {
"additionalProperties": false,
"properties": {
"s": {
"enum": [
"SYNC_SOURCE",
"FMV_ENGINE",
"DERIVED_REPRESENTED",
"DERIVED_SIBLING",
"POLICY",
"MANUAL"
],
"type": "string"
},
"ts": {
"maximum": 8210266876799,
"minimum": 1,
"type": "integer"
}
},
"required": [
"s"
],
"type": "object"
},
"quoteSource": {
"type": "string"
},
"stablecoinPeggedFiatCurrency": {
"type": "string"
},
"toAddress": {
"type": "string"
},
"toAddressLabel": {
"type": "string"
},
"tokenAddress": {
"type": "string"
},
"txHash": {
"type": "string"
},
"txIndex": {
"maximum": 9007199254740991,
"minimum": -9007199254740991,
"type": "integer"
},
"type": {
"type": "string"
},
"value": {
"type": "string"
},
"valueQuote": {
"type": "string"
},
"walletAddress": {
"type": "string"
},
"walletName": {
"type": "string"
},
"walletTransactionId": {
"type": "string"
}
},
"required": [
"type",
"txHash",
"chainId",
"txIndex",
"walletTransactionId",
"fromAddress",
"toAddress",
"value",
"tokenAddress",
"isSpam",
"walletName",
"walletAddress"
],
"type": "object"
},
"type": "array"
},
"walletSource": {
"additionalProperties": false,
"properties": {
"blockHeight": {
"type": "string"
},
"rawTransactionId": {
"type": "string"
},
"rawTransactionSource": {
"type": "string"
},
"timestamp": {
"type": "string"
},
"wallet": {
"additionalProperties": false,
"properties": {
"address": {
"type": "string"
},
"chainId": {
"type": "string"
}
},
"required": [
"chainId",
"address"
],
"type": "object"
},
"walletType": {
"enum": [
"BLOCKCHAIN",
"EXCHANGE",
"BANK"
],
"type": "string"
}
},
"required": [
"wallet",
"walletType",
"rawTransactionId",
"rawTransactionSource",
"blockHeight",
"timestamp"
],
"type": "object"
}
},
"required": [
"id",
"operationType",
"classification",
"timestamp",
"status",
"tags",
"fileAttachments",
"walletOperations"
],
"type": "object"
},
"type": "array"
},
"errorDetails": {
"items": {},
"type": "array"
},
"errorMessage": {
"type": "string"
},
"fileAttachments": {
"items": {},
"type": "array"
},
"id": {
"type": "string"
},
"intercompanyPair": {
"additionalProperties": false,
"properties": {
"counterpartOperationType": {
"type": "string"
},
"counterpartPortfolioName": {
"type": "string"
},
"counterpartPortfolioSlug": {
"minLength": 1,
"pattern": "^[a-z0-9-]+$",
"type": "string"
},
"counterpartPortfolioTransactionId": {
"type": "string"
},
"counterpartStatus": {
"enum": [
"PROPOSED",
"ERROR",
"POSTED",
"CLOSED"
],
"type": "string"
},
"counterpartSubType": {
"type": "string"
},
"lotLinkCount": {
"maximum": 9007199254740991,
"minimum": 0,
"type": "integer"
},
"pairId": {
"type": "string"
},
"side": {
"enum": [
"SEND",
"RECEIVE"
],
"type": "string"
},
"treatment": {
"type": "string"
}
},
"required": [
"pairId",
"side",
"counterpartPortfolioName",
"counterpartPortfolioSlug",
"counterpartPortfolioTransactionId",
"counterpartOperationType",
"counterpartStatus",
"lotLinkCount"
],
"type": "object"
},
"journalEntry": {
"$ref": "#/$defs/JournalEntryResponseDto"
},
"memo": {
"type": "string"
},
"operationType": {
"type": "string"
},
"pagination": {
"additionalProperties": false,
"properties": {
"nextPageToken": {
"minLength": 1,
"type": "string"
},
"pageSize": {
"maximum": 9007199254740991,
"minimum": 1,
"type": "integer"
}
},
"required": [
"pageSize"
],
"type": "object"
},
"portfolioTransactionContext": {
"additionalProperties": {},
"propertyNames": {
"type": "string"
},
"type": "object"
},
"rawTransactions": {
"items": {
"additionalProperties": false,
"properties": {
"blockHeight": {
"pattern": "^\\d+$",
"type": "string"
},
"details": {
"$ref": "#/$defs/RawTransactionWithDetailsDto__schema0"
},
"hash": {
"type": "string"
},
"id": {
"minLength": 1,
"type": "string"
},
"memo": {
"type": "string"
},
"processingState": {
"enum": [
"PROCESSED",
"PARTIAL",
"UNPROCESSED"
],
"type": "string"
},
"timestamp": {
"format": "date-time",
"type": "string"
},
"wallet": {
"additionalProperties": false,
"properties": {
"address": {
"type": "string"
},
"chainId": {
"type": "string"
},
"name": {
"type": "string"
},
"type": {
"enum": [
"BLOCKCHAIN",
"EXCHANGE",
"BANK"
],
"type": "string"
}
},
"required": [
"chainId",
"address",
"type"
],
"type": "object"
},
"walletOperations": {
"items": {
"additionalProperties": false,
"properties": {
"defi": {
"additionalProperties": false,
"properties": {
"operation": {
"anyOf": [
{
"const": "PROTOCOL_DEPOSIT",
"type": "string"
},
{
"const": "PROTOCOL_WITHDRAW",
"type": "string"
},
{
"const": "VAULT_DEPOSIT",
"type": "string"
},
{
"const": "VAULT_WITHDRAW",
"type": "string"
},
{
"const": "SWAP",
"type": "string"
},
{
"const": "PROVIDE_LIQUIDITY",
"type": "string"
},
{
"const": "REMOVE_LIQUIDITY",
"type": "string"
},
{
"const": "LEND",
"type": "string"
},
{
"const": "WITHDRAW_LEND",
"type": "string"
},
{
"const": "LEND_REDUCE",
"type": "string"
},
{
"const": "BORROW",
"type": "string"
},
{
"const": "REPAY",
"type": "string"
},
{
"const": "LOAN_LIQUIDATION",
"type": "string"
},
{
"const": "STAKE",
"type": "string"
},
{
"const": "UNSTAKE",
"type": "string"
},
{
"const": "CLAIM_REWARDS",
"type": "string"
}
]
},
"positionRef": {
"type": "string"
},
"tokenRole": {
"anyOf": [
{
"const": "UNDERLYING",
"type": "string"
},
{
"const": "COLLATERAL",
"type": "string"
},
{
"const": "RECEIPT_TOKEN",
"type": "string"
},
{
"const": "LP_SHARE",
"type": "string"
},
{
"const": "LIABILITY_TOKEN",
"type": "string"
},
{
"const": "REWARD",
"type": "string"
},
{
"const": "OTHER",
"type": "string"
}
]
}
},
"type": "object"
},
"from": {
"additionalProperties": false,
"properties": {
"address": {
"type": "string"
},
"label": {
"type": "string"
}
},
"required": [
"address"
],
"type": "object"
},
"portfolioTransactionId": {
"type": "string"
},
"quote": {
"additionalProperties": false,
"properties": {
"currency": {
"type": "string"
},
"meta": {
"additionalProperties": false,
"properties": {
"s": {
"enum": [
"SYNC_SOURCE",
"FMV_ENGINE",
"DERIVED_REPRESENTED",
"DERIVED_SIBLING",
"POLICY",
"MANUAL"
],
"type": "string"
},
"ts": {
"maximum": 8210266876799,
"minimum": 1,
"type": "integer"
}
},
"required": [
"s"
],
"type": "object"
},
"source": {
"type": "string"
},
"value": {
"pattern": "^-?\\d+(\\.\\d+)?$",
"type": "string"
}
},
"type": "object"
},
"to": {
"additionalProperties": false,
"properties": {
"address": {
"type": "string"
},
"label": {
"type": "string"
}
},
"required": [
"address"
],
"type": "object"
},
"token": {
"additionalProperties": false,
"properties": {
"address": {
"type": "string"
},
"assetId": {
"type": "string"
},
"chainId": {
"type": "string"
},
"decimals": {
"maximum": 9007199254740991,
"minimum": 0,
"type": "integer"
},
"isSpam": {
"type": "boolean"
},
"representsTokenAddress": {
"type": "string"
},
"stablecoinPeggedFiatCurrency": {
"type": "string"
},
"symbol": {
"type": "string"
},
"type": {
"anyOf": [
{
"const": "ERC20",
"type": "string"
},
{
"const": "NATIVE",
"type": "string"
},
{
"const": "FIAT",
"type": "string"
},
{
"const": "NFT",
"type": "string"
},
{
"const": "REBASE_LST",
"type": "string"
},
{
"const": "INTEREST_BEARING",
"type": "string"
},
{
"const": "VALUE_ACCRUING",
"type": "string"
},
{
"const": "LP_SHARE",
"type": "string"
},
{
"const": "DEBT",
"type": "string"
},
{
"const": "REFLECT",
"type": "string"
},
{
"const": "VOTE_ESCROWED",
"type": "string"
}
]
}
},
"required": [
"chainId",
"address",
"assetId",
"symbol",
"type",
"decimals",
"isSpam"
],
"type": "object"
},
"txIndex": {
"maximum": 9007199254740991,
"minimum": 0,
"type": "integer"
},
"type": {
"enum": [
"IN",
"OUT",
"GAS",
"SELF"
],
"type": "string"
},
"value": {
"pattern": "^-?\\d+(\\.\\d+)?$",
"type": "string"
}
},
"required": [
"txIndex",
"type",
"from",
"to",
"token",
"value"
],
"type": "object"
},
"type": "array"
}
},
"required": [
"id",
"wallet",
"hash",
"blockHeight",
"timestamp",
"processingState",
"walletOperations"
],
"type": "object"
},
"type": "array"
},
"resultType": {
"enum": [
"transactionList",
"transaction"
],
"type": "string"
},
"status": {
"type": "string"
},
"subType": {
"type": "string"
},
"systemNotes": {
"type": "string"
},
"tags": {
"items": {
"type": "string"
},
"type": "array"
},
"timestamp": {
"type": "string"
},
"walletOperations": {
"items": {
"additionalProperties": false,
"properties": {
"assetId": {
"type": "string"
},
"assetSymbol": {
"type": "string"
},
"chainId": {
"type": "string"
},
"defiOperation": {
"type": "string"
},
"defiPositionId": {
"type": "string"
},
"defiPositionRef": {
"type": "string"
},
"fromAddress": {
"type": "string"
},
"fromAddressLabel": {
"type": "string"
},
"isSpam": {
"type": "boolean"
},
"quoteCurrency": {
"type": "string"
},
"quoteMeta": {
"additionalProperties": false,
"properties": {
"s": {
"enum": [
"SYNC_SOURCE",
"FMV_ENGINE",
"DERIVED_REPRESENTED",
"DERIVED_SIBLING",
"POLICY",
"MANUAL"
],
"type": "string"
},
"ts": {
"maximum": 8210266876799,
"minimum": 1,
"type": "integer"
}
},
"required": [
"s"
],
"type": "object"
},
"quoteSource": {
"type": "string"
},
"stablecoinPeggedFiatCurrency": {
"type": "string"
},
"toAddress": {
"type": "string"
},
"toAddressLabel": {
"type": "string"
},
"tokenAddress": {
"type": "string"
},
"txHash": {
"type": "string"
},
"txIndex": {
"maximum": 9007199254740991,
"minimum": -9007199254740991,
"type": "integer"
},
"type": {
"type": "string"
},
"value": {
"type": "string"
},
"valueQuote": {
"type": "string"
},
"walletAddress": {
"type": "string"
},
"walletName": {
"type": "string"
},
"walletTransactionId": {
"type": "string"
}
},
"required": [
"type",
"txHash",
"chainId",
"txIndex",
"walletTransactionId",
"fromAddress",
"toAddress",
"value",
"tokenAddress",
"isSpam",
"walletName",
"walletAddress"
],
"type": "object"
},
"type": "array"
},
"walletSource": {
"additionalProperties": false,
"properties": {
"blockHeight": {
"type": "string"
},
"rawTransactionId": {
"type": "string"
},
"rawTransactionSource": {
"type": "string"
},
"timestamp": {
"type": "string"
},
"wallet": {
"additionalProperties": false,
"properties": {
"address": {
"type": "string"
},
"chainId": {
"type": "string"
}
},
"required": [
"chainId",
"address"
],
"type": "object"
},
"walletType": {
"enum": [
"BLOCKCHAIN",
"EXCHANGE",
"BANK"
],
"type": "string"
}
},
"required": [
"wallet",
"walletType",
"rawTransactionId",
"rawTransactionSource",
"blockHeight",
"timestamp"
],
"type": "object"
}
},
"required": [
"resultType"
],
"type": "object"
}
},
{
"description": "List portfolios available in a workspace, or search by name or slug.",
"inputSchema": {
"additionalProperties": false,
"properties": {
"limit": {
"anyOf": [
{
"description": "Maximum items to return, maximum 100. Preferred MCP pagination field.",
"maximum": 100,
"minimum": 1,
"type": "integer"
},
{
"description": "Maximum items to return, maximum 100. Preferred MCP pagination field. Numeric strings are accepted for MCP client compatibility.",
"pattern": "^(?:1|2|3|4|5|6|7|8|9|10|11|12|13|14|15|16|17|18|19|20|21|22|23|24|25|26|27|28|29|30|31|32|33|34|35|36|37|38|39|40|41|42|43|44|45|46|47|48|49|50|51|52|53|54|55|56|57|58|59|60|61|62|63|64|65|66|67|68|69|70|71|72|73|74|75|76|77|78|79|80|81|82|83|84|85|86|87|88|89|90|91|92|93|94|95|96|97|98|99|100)$",
"type": "string"
}
],
"description": "Maximum items to return, maximum 100. Preferred MCP pagination field."
},
"page": {
"description": "Page number, starting at 1",
"type": "integer"
},
"pageSize": {
"anyOf": [
{
"description": "Deprecated alias for limit, maximum 100. Prefer limit for new MCP calls.",
"maximum": 100,
"minimum": 1,
"type": "integer"
},
{
"description": "Deprecated alias for limit, maximum 100. Prefer limit for new MCP calls. Numeric strings are accepted for MCP client compatibility.",
"pattern": "^(?:1|2|3|4|5|6|7|8|9|10|11|12|13|14|15|16|17|18|19|20|21|22|23|24|25|26|27|28|29|30|31|32|33|34|35|36|37|38|39|40|41|42|43|44|45|46|47|48|49|50|51|52|53|54|55|56|57|58|59|60|61|62|63|64|65|66|67|68|69|70|71|72|73|74|75|76|77|78|79|80|81|82|83|84|85|86|87|88|89|90|91|92|93|94|95|96|97|98|99|100)$",
"type": "string"
}
],
"description": "Deprecated alias for limit, maximum 100. Prefer limit for new MCP calls."
},
"query": {
"description": "Optional portfolio name or slug search query",
"type": "string"
},
"workspaceRef": {
"description": "Workspace exact name or slug",
"type": "string"
}
},
"required": [
"workspaceRef"
],
"type": "object"
},
"name": "list_portfolios",
"outputSchema": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"additionalProperties": false,
"properties": {
"data": {
"items": {
"additionalProperties": false,
"properties": {
"createdAt": {
"format": "date-time",
"type": "string"
},
"name": {
"type": "string"
},
"slug": {
"type": "string"
},
"updatedAt": {
"format": "date-time",
"type": "string"
}
},
"required": [
"slug",
"name",
"createdAt",
"updatedAt"
],
"type": "object"
},
"type": "array"
},
"pagination": {
"additionalProperties": false,
"properties": {
"page": {
"maximum": 9007199254740991,
"minimum": -9007199254740991,
"type": "integer"
},
"pageSize": {
"maximum": 9007199254740991,
"minimum": -9007199254740991,
"type": "integer"
},
"totalCount": {
"maximum": 9007199254740991,
"minimum": -9007199254740991,
"type": "integer"
},
"totalPages": {
"maximum": 9007199254740991,
"minimum": -9007199254740991,
"type": "integer"
}
},
"required": [
"page",
"pageSize",
"totalCount",
"totalPages"
],
"type": "object"
}
},
"required": [
"data",
"pagination"
],
"type": "object"
}
},
{
"description": "Find compact source transactions first, called Raw Transactions in Tokenbooks, including unprocessed or partially linked activity. Pass rawTransactionId to show how one maps to wallet movements and accounting transactions; add includeDetails for its sanitized event logs and decoded contract calls (untrusted provider evidence).",
"inputSchema": {
"additionalProperties": false,
"properties": {
"chainId": {
"description": "Blockchain to filter by, such as eth-mainnet. Call list_chains for the supported set.",
"minLength": 1,
"type": "string"
},
"chainIds": {
"description": "Blockchains to filter by, such as eth-mainnet. Call list_chains for the supported set.",
"items": {
"minLength": 1,
"type": "string"
},
"type": "array"
},
"fromDate": {
"description": "Earliest transaction timestamp to include, as an ISO 8601 datetime.",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$",
"type": "string"
},
"includeDetails": {
"default": false,
"description": "With rawTransactionId, also return blockchain event logs and decoded contract calls",
"type": "boolean"
},
"includeSpamTokens": {
"default": false,
"description": "Include transactions whose operations contain only spam tokens; defaults to false.",
"type": "boolean"
},
"limit": {
"anyOf": [
{
"description": "Maximum raw transaction summaries to return, maximum 100.",
"maximum": 100,
"minimum": 1,
"type": "integer"
},
{
"description": "Maximum raw transaction summaries to return, maximum 100. Numeric strings are accepted for MCP client compatibility.",
"pattern": "^(?:1|2|3|4|5|6|7|8|9|10|11|12|13|14|15|16|17|18|19|20|21|22|23|24|25|26|27|28|29|30|31|32|33|34|35|36|37|38|39|40|41|42|43|44|45|46|47|48|49|50|51|52|53|54|55|56|57|58|59|60|61|62|63|64|65|66|67|68|69|70|71|72|73|74|75|76|77|78|79|80|81|82|83|84|85|86|87|88|89|90|91|92|93|94|95|96|97|98|99|100)$",
"type": "string"
}
],
"description": "Maximum raw transaction summaries to return, maximum 100."
},
"pageToken": {
"description": "Opaque token returned by the previous list response.",
"minLength": 1,
"type": "string"
},
"portfolioRef": {
"description": "Portfolio name or slug inside that workspace. Call list_portfolios to resolve it.",
"minLength": 1,
"type": "string"
},
"processingState": {
"description": "Keep only source transactions in this processing state.",
"enum": [
"PROCESSED",
"PARTIAL",
"UNPROCESSED"
],
"type": "string"
},
"rawTransactionId": {
"description": "Look up one source transaction by handle instead of listing",
"minLength": 1,
"type": "string"
},
"sort": {
"default": "-timestamp",
"description": "Timestamp order. Use timestamp for ascending or -timestamp for descending; defaults to -timestamp.",
"enum": [
"timestamp",
"-timestamp"
],
"type": "string"
},
"toDate": {
"description": "Latest transaction timestamp to include, as an ISO 8601 datetime.",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$",
"type": "string"
},
"txHash": {
"description": "Exact on-chain transaction hash.",
"type": "string"
},
"walletAddress": {
"description": "Wallet to filter by. Supply chainId alongside it.",
"minLength": 1,
"type": "string"
},
"workspaceRef": {
"description": "Workspace name or slug. Call list_workspaces to resolve it.",
"minLength": 1,
"type": "string"
}
},
"required": [
"workspaceRef",
"portfolioRef"
],
"type": "object"
},
"name": "list_raw_transactions",
"outputSchema": {
"$defs": {
"RawTransactionWithDetailsDto__schema0": {
"anyOf": [
{
"type": "string"
},
{
"type": "number"
},
{
"type": "boolean"
},
{
"type": "null"
},
{
"items": {
"$ref": "#/$defs/RawTransactionWithDetailsDto__schema0"
},
"type": "array"
},
{
"additionalProperties": {
"$ref": "#/$defs/RawTransactionWithDetailsDto__schema0"
},
"propertyNames": {
"type": "string"
},
"type": "object"
}
]
}
},
"$schema": "https://json-schema.org/draft/2020-12/schema",
"additionalProperties": false,
"anyOf": [
{
"additionalProperties": false,
"properties": {
"data": {
"$ref": "#/properties/data"
},
"pagination": {
"$ref": "#/properties/pagination"
},
"resultType": {
"const": "rawTransactionList",
"type": "string"
}
},
"required": [
"data",
"pagination",
"resultType"
],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"blockHeight": {
"$ref": "#/properties/blockHeight"
},
"details": {
"$ref": "#/properties/details"
},
"hash": {
"$ref": "#/properties/hash"
},
"id": {
"$ref": "#/properties/id"
},
"memo": {
"$ref": "#/properties/memo"
},
"processingState": {
"$ref": "#/properties/processingState"
},
"resultType": {
"const": "rawTransaction",
"type": "string"
},
"timestamp": {
"$ref": "#/properties/timestamp"
},
"wallet": {
"$ref": "#/properties/wallet"
},
"walletOperations": {
"$ref": "#/properties/walletOperations"
}
},
"required": [
"id",
"wallet",
"hash",
"blockHeight",
"timestamp",
"processingState",
"walletOperations",
"resultType"
],
"type": "object"
}
],
"properties": {
"blockHeight": {
"pattern": "^\\d+$",
"type": "string"
},
"data": {
"items": {
"additionalProperties": false,
"properties": {
"blockHeight": {
"pattern": "^\\d+$",
"type": "string"
},
"hash": {
"type": "string"
},
"id": {
"minLength": 1,
"type": "string"
},
"memo": {
"type": "string"
},
"processingState": {
"enum": [
"PROCESSED",
"PARTIAL",
"UNPROCESSED"
],
"type": "string"
},
"timestamp": {
"format": "date-time",
"type": "string"
},
"wallet": {
"additionalProperties": false,
"properties": {
"address": {
"type": "string"
},
"chainId": {
"type": "string"
},
"name": {
"type": "string"
},
"type": {
"enum": [
"BLOCKCHAIN",
"EXCHANGE",
"BANK"
],
"type": "string"
}
},
"required": [
"chainId",
"address",
"type"
],
"type": "object"
}
},
"required": [
"id",
"wallet",
"hash",
"blockHeight",
"timestamp",
"processingState"
],
"type": "object"
},
"type": "array"
},
"details": {
"$ref": "#/$defs/RawTransactionWithDetailsDto__schema0"
},
"hash": {
"type": "string"
},
"id": {
"minLength": 1,
"type": "string"
},
"memo": {
"type": "string"
},
"pagination": {
"additionalProperties": false,
"properties": {
"nextPageToken": {
"minLength": 1,
"type": "string"
},
"pageSize": {
"maximum": 9007199254740991,
"minimum": 1,
"type": "integer"
}
},
"required": [
"pageSize"
],
"type": "object"
},
"processingState": {
"enum": [
"PROCESSED",
"PARTIAL",
"UNPROCESSED"
],
"type": "string"
},
"resultType": {
"enum": [
"rawTransactionList",
"rawTransaction"
],
"type": "string"
},
"timestamp": {
"format": "date-time",
"type": "string"
},
"wallet": {
"additionalProperties": false,
"properties": {
"address": {
"type": "string"
},
"chainId": {
"type": "string"
},
"name": {
"type": "string"
},
"type": {
"enum": [
"BLOCKCHAIN",
"EXCHANGE",
"BANK"
],
"type": "string"
}
},
"required": [
"chainId",
"address",
"type"
],
"type": "object"
},
"walletOperations": {
"items": {
"additionalProperties": false,
"properties": {
"defi": {
"additionalProperties": false,
"properties": {
"operation": {
"anyOf": [
{
"const": "PROTOCOL_DEPOSIT",
"type": "string"
},
{
"const": "PROTOCOL_WITHDRAW",
"type": "string"
},
{
"const": "VAULT_DEPOSIT",
"type": "string"
},
{
"const": "VAULT_WITHDRAW",
"type": "string"
},
{
"const": "SWAP",
"type": "string"
},
{
"const": "PROVIDE_LIQUIDITY",
"type": "string"
},
{
"const": "REMOVE_LIQUIDITY",
"type": "string"
},
{
"const": "LEND",
"type": "string"
},
{
"const": "WITHDRAW_LEND",
"type": "string"
},
{
"const": "LEND_REDUCE",
"type": "string"
},
{
"const": "BORROW",
"type": "string"
},
{
"const": "REPAY",
"type": "string"
},
{
"const": "LOAN_LIQUIDATION",
"type": "string"
},
{
"const": "STAKE",
"type": "string"
},
{
"const": "UNSTAKE",
"type": "string"
},
{
"const": "CLAIM_REWARDS",
"type": "string"
}
]
},
"positionRef": {
"type": "string"
},
"tokenRole": {
"anyOf": [
{
"const": "UNDERLYING",
"type": "string"
},
{
"const": "COLLATERAL",
"type": "string"
},
{
"const": "RECEIPT_TOKEN",
"type": "string"
},
{
"const": "LP_SHARE",
"type": "string"
},
{
"const": "LIABILITY_TOKEN",
"type": "string"
},
{
"const": "REWARD",
"type": "string"
},
{
"const": "OTHER",
"type": "string"
}
]
}
},
"type": "object"
},
"from": {
"additionalProperties": false,
"properties": {
"address": {
"type": "string"
},
"label": {
"type": "string"
}
},
"required": [
"address"
],
"type": "object"
},
"portfolioTransactionId": {
"type": "string"
},
"quote": {
"additionalProperties": false,
"properties": {
"currency": {
"type": "string"
},
"meta": {
"additionalProperties": false,
"properties": {
"s": {
"enum": [
"SYNC_SOURCE",
"FMV_ENGINE",
"DERIVED_REPRESENTED",
"DERIVED_SIBLING",
"POLICY",
"MANUAL"
],
"type": "string"
},
"ts": {
"maximum": 8210266876799,
"minimum": 1,
"type": "integer"
}
},
"required": [
"s"
],
"type": "object"
},
"source": {
"type": "string"
},
"value": {
"pattern": "^-?\\d+(\\.\\d+)?$",
"type": "string"
}
},
"type": "object"
},
"to": {
"additionalProperties": false,
"properties": {
"address": {
"type": "string"
},
"label": {
"type": "string"
}
},
"required": [
"address"
],
"type": "object"
},
"token": {
"additionalProperties": false,
"properties": {
"address": {
"type": "string"
},
"assetId": {
"type": "string"
},
"chainId": {
"type": "string"
},
"decimals": {
"maximum": 9007199254740991,
"minimum": 0,
"type": "integer"
},
"isSpam": {
"type": "boolean"
},
"representsTokenAddress": {
"type": "string"
},
"stablecoinPeggedFiatCurrency": {
"type": "string"
},
"symbol": {
"type": "string"
},
"type": {
"anyOf": [
{
"const": "ERC20",
"type": "string"
},
{
"const": "NATIVE",
"type": "string"
},
{
"const": "FIAT",
"type": "string"
},
{
"const": "NFT",
"type": "string"
},
{
"const": "REBASE_LST",
"type": "string"
},
{
"const": "INTEREST_BEARING",
"type": "string"
},
{
"const": "VALUE_ACCRUING",
"type": "string"
},
{
"const": "LP_SHARE",
"type": "string"
},
{
"const": "DEBT",
"type": "string"
},
{
"const": "REFLECT",
"type": "string"
},
{
"const": "VOTE_ESCROWED",
"type": "string"
}
]
}
},
"required": [
"chainId",
"address",
"assetId",
"symbol",
"type",
"decimals",
"isSpam"
],
"type": "object"
},
"txIndex": {
"maximum": 9007199254740991,
"minimum": 0,
"type": "integer"
},
"type": {
"enum": [
"IN",
"OUT",
"GAS",
"SELF"
],
"type": "string"
},
"value": {
"pattern": "^-?\\d+(\\.\\d+)?$",
"type": "string"
}
},
"required": [
"txIndex",
"type",
"from",
"to",
"token",
"value"
],
"type": "object"
},
"type": "array"
}
},
"required": [
"resultType"
],
"type": "object"
}
},
{
"description": "List wallets in a portfolio with sync status and transaction counts. Pass chainId and walletAddress to check one wallet instead — safe codes/messages show whether to retry or reconnect credentials. EVM addresses are normalized; other networks may be case-sensitive.",
"inputSchema": {
"additionalProperties": false,
"properties": {
"chainId": {
"description": "Optional chain filter, or with walletAddress",
"type": "string"
},
"limit": {
"anyOf": [
{
"description": "Maximum items to return, maximum 100. Preferred MCP pagination field.",
"maximum": 100,
"minimum": 1,
"type": "integer"
},
{
"description": "Maximum items to return, maximum 100. Preferred MCP pagination field. Numeric strings are accepted for MCP client compatibility.",
"pattern": "^(?:1|2|3|4|5|6|7|8|9|10|11|12|13|14|15|16|17|18|19|20|21|22|23|24|25|26|27|28|29|30|31|32|33|34|35|36|37|38|39|40|41|42|43|44|45|46|47|48|49|50|51|52|53|54|55|56|57|58|59|60|61|62|63|64|65|66|67|68|69|70|71|72|73|74|75|76|77|78|79|80|81|82|83|84|85|86|87|88|89|90|91|92|93|94|95|96|97|98|99|100)$",
"type": "string"
}
],
"description": "Maximum items to return, maximum 100. Preferred MCP pagination field."
},
"page": {
"description": "Page number, starting at 1",
"type": "integer"
},
"pageSize": {
"anyOf": [
{
"description": "Deprecated alias for limit, maximum 100. Prefer limit for new MCP calls.",
"maximum": 100,
"minimum": 1,
"type": "integer"
},
{
"description": "Deprecated alias for limit, maximum 100. Prefer limit for new MCP calls. Numeric strings are accepted for MCP client compatibility.",
"pattern": "^(?:1|2|3|4|5|6|7|8|9|10|11|12|13|14|15|16|17|18|19|20|21|22|23|24|25|26|27|28|29|30|31|32|33|34|35|36|37|38|39|40|41|42|43|44|45|46|47|48|49|50|51|52|53|54|55|56|57|58|59|60|61|62|63|64|65|66|67|68|69|70|71|72|73|74|75|76|77|78|79|80|81|82|83|84|85|86|87|88|89|90|91|92|93|94|95|96|97|98|99|100)$",
"type": "string"
}
],
"description": "Deprecated alias for limit, maximum 100. Prefer limit for new MCP calls."
},
"portfolioRef": {
"description": "Portfolio exact name or slug",
"type": "string"
},
"walletAddress": {
"description": "Look up one wallet; requires chainId",
"type": "string"
},
"workspaceRef": {
"description": "Workspace exact name or slug",
"type": "string"
}
},
"required": [
"workspaceRef",
"portfolioRef"
],
"type": "object"
},
"name": "list_wallets",
"outputSchema": {
"$defs": {
"WalletDetailsResponseDto": {
"additionalProperties": false,
"properties": {
"address": {
"type": "string"
},
"chainId": {
"type": "string"
},
"createdAt": {
"format": "date-time",
"type": "string"
},
"lastSyncAt": {
"format": "date-time",
"type": "string"
},
"name": {
"type": "string"
},
"syncMessages": {
"items": {
"oneOf": [
{
"additionalProperties": false,
"properties": {
"code": {
"const": "EXCHANGE_RECONNECT_REQUIRED",
"type": "string"
},
"details": {
"additionalProperties": false,
"properties": {
"errorType": {
"const": "ExternalServiceAuthenticationError",
"type": "string"
},
"provider": {
"minLength": 1,
"type": "string"
},
"reconnectRequired": {
"const": true,
"type": "boolean"
}
},
"required": [
"provider",
"reconnectRequired",
"errorType"
],
"type": "object"
},
"message": {
"minLength": 1,
"type": "string"
},
"severity": {
"default": "ERROR",
"enum": [
"ERROR",
"WARN"
],
"type": "string"
}
},
"required": [
"code",
"message",
"severity",
"details"
],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"code": {
"const": "SYNC_PROCESSING_FAILED",
"type": "string"
},
"details": {
"additionalProperties": false,
"properties": {
"errorType": {
"const": "SyncProcessingError",
"type": "string"
},
"retryable": {
"const": true,
"type": "boolean"
}
},
"required": [
"retryable",
"errorType"
],
"type": "object"
},
"message": {
"minLength": 1,
"type": "string"
},
"severity": {
"default": "ERROR",
"enum": [
"ERROR",
"WARN"
],
"type": "string"
}
},
"required": [
"code",
"message",
"severity",
"details"
],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"code": {
"const": "SYNC_WARNING",
"type": "string"
},
"details": {
"additionalProperties": false,
"properties": {
"errorType": {
"const": "SyncWarning",
"type": "string"
}
},
"required": [
"errorType"
],
"type": "object"
},
"message": {
"minLength": 1,
"type": "string"
},
"severity": {
"default": "ERROR",
"enum": [
"ERROR",
"WARN"
],
"type": "string"
}
},
"required": [
"code",
"message",
"severity",
"details"
],
"type": "object"
}
]
},
"type": "array"
},
"syncStatus": {
"enum": [
"pending",
"syncing",
"synced",
"failed"
],
"type": "string"
},
"transactionCount": {
"maximum": 9007199254740991,
"minimum": -9007199254740991,
"type": "integer"
}
},
"required": [
"chainId",
"address",
"createdAt",
"syncMessages",
"syncStatus",
"transactionCount"
],
"type": "object"
}
},
"$schema": "https://json-schema.org/draft/2020-12/schema",
"additionalProperties": false,
"anyOf": [
{
"additionalProperties": false,
"properties": {
"data": {
"$ref": "#/properties/data"
},
"pagination": {
"$ref": "#/properties/pagination"
},
"resultType": {
"const": "walletList",
"type": "string"
}
},
"required": [
"data",
"pagination",
"resultType"
],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"address": {
"$ref": "#/properties/address"
},
"chainId": {
"$ref": "#/properties/chainId"
},
"createdAt": {
"$ref": "#/properties/createdAt"
},
"lastSyncAt": {
"$ref": "#/properties/lastSyncAt"
},
"name": {
"$ref": "#/properties/name"
},
"resultType": {
"const": "wallet",
"type": "string"
},
"syncMessages": {
"$ref": "#/properties/syncMessages"
},
"syncStatus": {
"$ref": "#/properties/syncStatus"
},
"transactionCount": {
"$ref": "#/properties/transactionCount"
}
},
"required": [
"chainId",
"address",
"createdAt",
"syncMessages",
"syncStatus",
"transactionCount",
"resultType"
],
"type": "object"
}
],
"properties": {
"address": {
"type": "string"
},
"chainId": {
"type": "string"
},
"createdAt": {
"format": "date-time",
"type": "string"
},
"data": {
"items": {
"$ref": "#/$defs/WalletDetailsResponseDto"
},
"type": "array"
},
"lastSyncAt": {
"format": "date-time",
"type": "string"
},
"name": {
"type": "string"
},
"pagination": {
"additionalProperties": false,
"properties": {
"page": {
"maximum": 9007199254740991,
"minimum": -9007199254740991,
"type": "integer"
},
"pageSize": {
"maximum": 9007199254740991,
"minimum": -9007199254740991,
"type": "integer"
},
"totalCount": {
"maximum": 9007199254740991,
"minimum": -9007199254740991,
"type": "integer"
},
"totalPages": {
"maximum": 9007199254740991,
"minimum": -9007199254740991,
"type": "integer"
}
},
"required": [
"page",
"pageSize",
"totalCount",
"totalPages"
],
"type": "object"
},
"resultType": {
"enum": [
"walletList",
"wallet"
],
"type": "string"
},
"syncMessages": {
"items": {
"oneOf": [
{
"additionalProperties": false,
"properties": {
"code": {
"const": "EXCHANGE_RECONNECT_REQUIRED",
"type": "string"
},
"details": {
"additionalProperties": false,
"properties": {
"errorType": {
"const": "ExternalServiceAuthenticationError",
"type": "string"
},
"provider": {
"minLength": 1,
"type": "string"
},
"reconnectRequired": {
"const": true,
"type": "boolean"
}
},
"required": [
"provider",
"reconnectRequired",
"errorType"
],
"type": "object"
},
"message": {
"minLength": 1,
"type": "string"
},
"severity": {
"default": "ERROR",
"enum": [
"ERROR",
"WARN"
],
"type": "string"
}
},
"required": [
"code",
"message",
"severity",
"details"
],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"code": {
"const": "SYNC_PROCESSING_FAILED",
"type": "string"
},
"details": {
"additionalProperties": false,
"properties": {
"errorType": {
"const": "SyncProcessingError",
"type": "string"
},
"retryable": {
"const": true,
"type": "boolean"
}
},
"required": [
"retryable",
"errorType"
],
"type": "object"
},
"message": {
"minLength": 1,
"type": "string"
},
"severity": {
"default": "ERROR",
"enum": [
"ERROR",
"WARN"
],
"type": "string"
}
},
"required": [
"code",
"message",
"severity",
"details"
],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"code": {
"const": "SYNC_WARNING",
"type": "string"
},
"details": {
"additionalProperties": false,
"properties": {
"errorType": {
"const": "SyncWarning",
"type": "string"
}
},
"required": [
"errorType"
],
"type": "object"
},
"message": {
"minLength": 1,
"type": "string"
},
"severity": {
"default": "ERROR",
"enum": [
"ERROR",
"WARN"
],
"type": "string"
}
},
"required": [
"code",
"message",
"severity",
"details"
],
"type": "object"
}
]
},
"type": "array"
},
"syncStatus": {
"enum": [
"pending",
"syncing",
"synced",
"failed"
],
"type": "string"
},
"transactionCount": {
"maximum": 9007199254740991,
"minimum": -9007199254740991,
"type": "integer"
}
},
"required": [
"resultType"
],
"type": "object"
}
},
{
"description": "List workspaces available to the authenticated Tokenbooks user, or search by name or slug.",
"inputSchema": {
"additionalProperties": false,
"properties": {
"query": {
"description": "Optional workspace name or slug search query",
"type": "string"
}
},
"type": "object"
},
"name": "list_workspaces",
"outputSchema": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"additionalProperties": false,
"properties": {
"data": {
"items": {
"additionalProperties": false,
"properties": {
"name": {
"type": "string"
},
"planName": {
"type": "string"
},
"role": {
"type": "string"
},
"slug": {
"type": "string"
},
"usage": {
"additionalProperties": false,
"properties": {
"portfolios": {
"type": "number"
},
"transactions": {
"type": "number"
},
"users": {
"type": "number"
},
"wallets": {
"type": "number"
}
},
"required": [
"portfolios",
"transactions",
"users",
"wallets"
],
"type": "object"
}
},
"required": [
"name",
"planName",
"role",
"slug",
"usage"
],
"type": "object"
},
"type": "array"
}
},
"required": [
"data"
],
"type": "object"
}
},
{
"description": "Mark or unmark a token as spam so unwanted dust or airdrops are excluded from accounting and existing records are updated; this queued action defaults to marking spam and returns a requestId.",
"inputSchema": {
"additionalProperties": false,
"properties": {
"chainId": {
"description": "Chain ID of the token (from a walletOperation)",
"type": "string"
},
"isSpam": {
"description": "Spam flag to set (default true; false unmarks)",
"type": "boolean"
},
"portfolioRef": {
"description": "Portfolio exact name or slug",
"type": "string"
},
"reason": {
"description": "Optional immutable root reason. Nonempty bytes are preserved exactly; use ptx:<uuid> for transaction references.",
"type": "string"
},
"tokenAddress": {
"description": "Token contract address (from a walletOperation)",
"type": "string"
},
"workspaceRef": {
"description": "Workspace exact name or slug",
"type": "string"
}
},
"required": [
"workspaceRef",
"portfolioRef",
"chainId",
"tokenAddress"
],
"type": "object"
},
"name": "mark_token_spam",
"outputSchema": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"additionalProperties": false,
"oneOf": [
{
"additionalProperties": false,
"properties": {
"requestId": {
"type": "string"
},
"status": {
"const": "queued",
"type": "string"
}
},
"required": [
"status",
"requestId"
],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"error": {
"additionalProperties": false,
"properties": {
"message": {
"type": "string"
},
"name": {
"type": "string"
}
},
"required": [
"name",
"message"
],
"type": "object"
},
"status": {
"const": "completed",
"type": "string"
},
"success": {
"type": "boolean"
}
},
"required": [
"status",
"success"
],
"type": "object"
}
],
"properties": {
"error": {
"additionalProperties": false,
"properties": {
"message": {
"type": "string"
},
"name": {
"type": "string"
}
},
"required": [
"name",
"message"
],
"type": "object"
},
"requestId": {
"type": "string"
},
"status": {
"enum": [
"queued",
"completed"
],
"type": "string"
},
"success": {
"type": "boolean"
}
},
"required": [
"status"
],
"type": "object"
}
},
{
"description": "Destructively combine wallet movements from several accounting transactions into one target transaction and reclassify it; preview the grouping first, then track the queued requestId.",
"inputSchema": {
"additionalProperties": false,
"properties": {
"operationType": {
"description": "Accounting operation type for the merged transaction",
"enum": [
"DEPOSIT_FIAT",
"INCOME",
"REFUND",
"WITHDRAWAL_FIAT",
"EXPENSE",
"BUY",
"SELL",
"EXCHANGE",
"SWAP",
"MOVE",
"INTERCOMPANY_SEND",
"INTERCOMPANY_RECEIVE",
"STAKE",
"UNSTAKE",
"PROTOCOL_DEPOSIT",
"PROTOCOL_WITHDRAW",
"VAULT_DEPOSIT",
"VAULT_WITHDRAW",
"LP_IN",
"LP_OUT",
"LOAN_BORROW",
"LOAN_REPAY",
"LOAN_LIQUIDATION",
"LEND_GIVE",
"LEND_WITHDRAW",
"ADJUSTMENT",
"UNCATEGORIZED",
"SPAM"
],
"type": "string"
},
"operations": {
"description": "Operations to merge into the target",
"items": {
"additionalProperties": false,
"properties": {
"portfolioTransactionId": {
"description": "Portfolio transaction the operation currently belongs to",
"type": "string"
},
"txIndex": {
"description": "Transfer index within the wallet transaction",
"type": "integer"
},
"walletTransactionId": {
"description": "Wallet transaction handle (from a walletOperation)",
"type": "string"
}
},
"required": [
"walletTransactionId",
"txIndex",
"portfolioTransactionId"
],
"type": "object"
},
"type": "array"
},
"portfolioRef": {
"description": "Portfolio exact name or slug",
"type": "string"
},
"reason": {
"description": "Optional immutable root reason. Nonempty bytes are preserved exactly; use ptx:<uuid> for transaction references.",
"type": "string"
},
"subType": {
"description": "Optional operation sub-type",
"type": "string"
},
"transactionId": {
"description": "Target transaction the operations are merged into",
"type": "string"
},
"workspaceRef": {
"description": "Workspace exact name or slug",
"type": "string"
}
},
"required": [
"workspaceRef",
"portfolioRef",
"transactionId",
"operations",
"operationType"
],
"type": "object"
},
"name": "merge_transactions",
"outputSchema": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"additionalProperties": false,
"oneOf": [
{
"additionalProperties": false,
"properties": {
"requestId": {
"type": "string"
},
"status": {
"const": "queued",
"type": "string"
},
"transactionId": {
"type": "string"
}
},
"required": [
"status",
"requestId",
"transactionId"
],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"error": {
"additionalProperties": false,
"properties": {
"message": {
"type": "string"
},
"name": {
"type": "string"
}
},
"required": [
"name",
"message"
],
"type": "object"
},
"status": {
"const": "completed",
"type": "string"
},
"success": {
"type": "boolean"
},
"transactionId": {
"type": "string"
}
},
"required": [
"status",
"success",
"transactionId"
],
"type": "object"
}
],
"properties": {
"error": {
"additionalProperties": false,
"properties": {
"message": {
"type": "string"
},
"name": {
"type": "string"
}
},
"required": [
"name",
"message"
],
"type": "object"
},
"requestId": {
"type": "string"
},
"status": {
"enum": [
"queued",
"completed"
],
"type": "string"
},
"success": {
"type": "boolean"
},
"transactionId": {
"type": "string"
}
},
"required": [
"status",
"transactionId"
],
"type": "object"
}
},
{
"description": "Preview how selected wallet movements would be grouped and labeled as accounting transactions. Returns every proposal in order and saves nothing.",
"inputSchema": {
"additionalProperties": false,
"properties": {
"operations": {
"description": "Exact transfer-operation handles returned by transaction reads, including the accounting transaction each operation currently belongs to",
"items": {
"additionalProperties": false,
"properties": {
"portfolioTransactionId": {
"description": "Accounting transaction the movement currently belongs to.",
"minLength": 1,
"type": "string"
},
"txIndex": {
"description": "Position of the movement within that source transaction, from the same walletOperation.",
"maximum": 2147483647,
"minimum": 0,
"type": "integer"
},
"walletTransactionId": {
"description": "Source transaction the wallet movement belongs to, from a walletOperation in a read tool result.",
"minLength": 1,
"type": "string"
}
},
"required": [
"portfolioTransactionId",
"walletTransactionId",
"txIndex"
],
"type": "object"
},
"minItems": 1,
"type": "array"
},
"portfolioRef": {
"description": "Portfolio name or slug inside that workspace. Call list_portfolios to resolve it.",
"minLength": 1,
"type": "string"
},
"workspaceRef": {
"description": "Workspace name or slug. Call list_workspaces to resolve it.",
"minLength": 1,
"type": "string"
}
},
"required": [
"workspaceRef",
"portfolioRef",
"operations"
],
"type": "object"
},
"name": "preview_transaction_classification",
"outputSchema": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"additionalProperties": false,
"properties": {
"transactions": {
"items": {
"additionalProperties": false,
"properties": {
"operationType": {
"enum": [
"DEPOSIT_FIAT",
"INCOME",
"REFUND",
"WITHDRAWAL_FIAT",
"EXPENSE",
"BUY",
"SELL",
"EXCHANGE",
"SWAP",
"MOVE",
"INTERCOMPANY_SEND",
"INTERCOMPANY_RECEIVE",
"STAKE",
"UNSTAKE",
"PROTOCOL_DEPOSIT",
"PROTOCOL_WITHDRAW",
"VAULT_DEPOSIT",
"VAULT_WITHDRAW",
"LP_IN",
"LP_OUT",
"LOAN_BORROW",
"LOAN_REPAY",
"LOAN_LIQUIDATION",
"LEND_GIVE",
"LEND_WITHDRAW",
"ADJUSTMENT",
"UNCATEGORIZED",
"SPAM"
],
"type": "string"
},
"operations": {
"items": {
"additionalProperties": false,
"properties": {
"portfolioTransactionId": {
"minLength": 1,
"type": "string"
},
"txIndex": {
"maximum": 2147483647,
"minimum": 0,
"type": "integer"
},
"walletTransactionId": {
"minLength": 1,
"type": "string"
}
},
"required": [
"portfolioTransactionId",
"walletTransactionId",
"txIndex"
],
"type": "object"
},
"minItems": 1,
"type": "array"
},
"subType": {
"type": "string"
},
"systemNotes": {
"type": "string"
},
"timestamp": {
"format": "date-time",
"type": "string"
}
},
"required": [
"operationType",
"timestamp",
"operations"
],
"type": "object"
},
"type": "array"
}
},
"required": [
"transactions"
],
"type": "object"
}
},
{
"description": "Recalculate one accounting transaction after correcting its inputs; this destructive queued job may regroup only its assigned wallet movements, and waitForCompletion can return the final state.",
"inputSchema": {
"additionalProperties": false,
"properties": {
"pollIntervalMs": {
"description": "Request-status polling interval in milliseconds",
"maximum": 5000,
"minimum": 100,
"type": "integer"
},
"portfolioRef": {
"description": "Portfolio name or slug",
"minLength": 1,
"type": "string"
},
"reason": {
"description": "Optional immutable root reason; nonempty bytes are preserved exactly",
"minLength": 1,
"type": "string"
},
"timeoutMs": {
"description": "Maximum wait time in milliseconds",
"maximum": 60000,
"minimum": 1000,
"type": "integer"
},
"transactionId": {
"description": "Selected portfolio transaction ID to reprocess",
"minLength": 1,
"type": "string"
},
"waitForCompletion": {
"description": "Wait for the queued reprocess request to reach a terminal state before returning",
"type": "boolean"
},
"workspaceRef": {
"description": "Workspace name or slug",
"minLength": 1,
"type": "string"
}
},
"required": [
"workspaceRef",
"portfolioRef",
"transactionId"
],
"type": "object"
},
"name": "reprocess_transaction",
"outputSchema": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"additionalProperties": false,
"oneOf": [
{
"additionalProperties": false,
"properties": {
"completed": {
"type": "boolean"
},
"finalState": {
"additionalProperties": false,
"properties": {
"classificationState": {
"type": "string"
},
"errorTypes": {
"items": {
"type": "string"
},
"type": "array"
},
"hasError": {
"type": "boolean"
},
"operationType": {
"type": "string"
},
"suggestedAction": {}
},
"required": [
"hasError",
"errorTypes",
"suggestedAction"
],
"type": "object"
},
"requestId": {
"type": "string"
},
"requests": {
"additionalProperties": false,
"properties": {
"all": {
"items": {
"additionalProperties": false,
"properties": {
"appProgress": {
"additionalProperties": false,
"properties": {
"completed": {
"type": "number"
},
"total": {
"type": "number"
},
"transactionsSynced": {
"type": "number"
}
},
"required": [
"completed",
"total",
"transactionsSynced"
],
"type": "object"
},
"completedAt": {
"format": "date-time",
"type": "string"
},
"createdAt": {
"format": "date-time",
"type": "string"
},
"error": {
"additionalProperties": false,
"properties": {
"error": {
"additionalProperties": false,
"properties": {
"code": {
"type": "string"
},
"details": {
"additionalProperties": {},
"propertyNames": {
"type": "string"
},
"type": "object"
},
"message": {
"type": "string"
},
"requestId": {
"type": "string"
}
},
"required": [
"code",
"message",
"requestId"
],
"type": "object"
}
},
"required": [
"error"
],
"type": "object"
},
"finishedOn": {
"type": "number"
},
"progress": {
"type": "number"
},
"requestId": {
"type": "string"
},
"result": {
"additionalProperties": false,
"properties": {
"downloadUrl": {
"type": "string"
},
"fileSize": {
"type": "number"
},
"format": {
"enum": [
"xlsx",
"pdf",
"json"
],
"type": "string"
}
},
"required": [
"downloadUrl",
"fileSize",
"format"
],
"type": "object"
},
"returnValue": {},
"status": {
"enum": [
"pending",
"active",
"delayed",
"completed",
"failed"
],
"type": "string"
},
"type": {
"enum": [
"sync",
"export",
"recompute",
"reclassify"
],
"type": "string"
},
"updatedAt": {
"format": "date-time",
"type": "string"
}
},
"required": [
"requestId",
"type",
"status",
"progress",
"createdAt",
"updatedAt"
],
"type": "object"
},
"type": "array"
},
"primary": {
"type": "string"
}
},
"required": [
"primary",
"all"
],
"type": "object"
},
"status": {
"const": "queued",
"type": "string"
},
"statuses": {
"items": {
"additionalProperties": false,
"properties": {
"appProgress": {
"additionalProperties": false,
"properties": {
"completed": {
"type": "number"
},
"total": {
"type": "number"
},
"transactionsSynced": {
"type": "number"
}
},
"required": [
"completed",
"total",
"transactionsSynced"
],
"type": "object"
},
"completedAt": {
"format": "date-time",
"type": "string"
},
"createdAt": {
"format": "date-time",
"type": "string"
},
"error": {
"additionalProperties": false,
"properties": {
"error": {
"additionalProperties": false,
"properties": {
"code": {
"type": "string"
},
"details": {
"additionalProperties": {},
"propertyNames": {
"type": "string"
},
"type": "object"
},
"message": {
"type": "string"
},
"requestId": {
"type": "string"
}
},
"required": [
"code",
"message",
"requestId"
],
"type": "object"
}
},
"required": [
"error"
],
"type": "object"
},
"finishedOn": {
"type": "number"
},
"progress": {
"type": "number"
},
"requestId": {
"type": "string"
},
"result": {
"additionalProperties": false,
"properties": {
"downloadUrl": {
"type": "string"
},
"fileSize": {
"type": "number"
},
"format": {
"enum": [
"xlsx",
"pdf",
"json"
],
"type": "string"
}
},
"required": [
"downloadUrl",
"fileSize",
"format"
],
"type": "object"
},
"returnValue": {},
"status": {
"enum": [
"pending",
"active",
"delayed",
"completed",
"failed"
],
"type": "string"
},
"type": {
"enum": [
"sync",
"export",
"recompute",
"reclassify"
],
"type": "string"
},
"updatedAt": {
"format": "date-time",
"type": "string"
}
},
"required": [
"requestId",
"type",
"status",
"progress",
"createdAt",
"updatedAt"
],
"type": "object"
},
"type": "array"
},
"transactionId": {
"type": "string"
}
},
"required": [
"status",
"requestId",
"transactionId"
],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"error": {
"additionalProperties": false,
"properties": {
"message": {
"type": "string"
},
"name": {
"type": "string"
}
},
"required": [
"name",
"message"
],
"type": "object"
},
"status": {
"const": "completed",
"type": "string"
},
"success": {
"type": "boolean"
},
"transactionId": {
"type": "string"
}
},
"required": [
"status",
"success",
"transactionId"
],
"type": "object"
}
],
"properties": {
"completed": {
"type": "boolean"
},
"error": {
"additionalProperties": false,
"properties": {
"message": {
"type": "string"
},
"name": {
"type": "string"
}
},
"required": [
"name",
"message"
],
"type": "object"
},
"finalState": {
"additionalProperties": false,
"properties": {
"classificationState": {
"type": "string"
},
"errorTypes": {
"items": {
"type": "string"
},
"type": "array"
},
"hasError": {
"type": "boolean"
},
"operationType": {
"type": "string"
},
"suggestedAction": {}
},
"required": [
"hasError",
"errorTypes",
"suggestedAction"
],
"type": "object"
},
"requestId": {
"type": "string"
},
"requests": {
"additionalProperties": false,
"properties": {
"all": {
"items": {
"additionalProperties": false,
"properties": {
"appProgress": {
"additionalProperties": false,
"properties": {
"completed": {
"type": "number"
},
"total": {
"type": "number"
},
"transactionsSynced": {
"type": "number"
}
},
"required": [
"completed",
"total",
"transactionsSynced"
],
"type": "object"
},
"completedAt": {
"format": "date-time",
"type": "string"
},
"createdAt": {
"format": "date-time",
"type": "string"
},
"error": {
"additionalProperties": false,
"properties": {
"error": {
"additionalProperties": false,
"properties": {
"code": {
"type": "string"
},
"details": {
"additionalProperties": {},
"propertyNames": {
"type": "string"
},
"type": "object"
},
"message": {
"type": "string"
},
"requestId": {
"type": "string"
}
},
"required": [
"code",
"message",
"requestId"
],
"type": "object"
}
},
"required": [
"error"
],
"type": "object"
},
"finishedOn": {
"type": "number"
},
"progress": {
"type": "number"
},
"requestId": {
"type": "string"
},
"result": {
"additionalProperties": false,
"properties": {
"downloadUrl": {
"type": "string"
},
"fileSize": {
"type": "number"
},
"format": {
"enum": [
"xlsx",
"pdf",
"json"
],
"type": "string"
}
},
"required": [
"downloadUrl",
"fileSize",
"format"
],
"type": "object"
},
"returnValue": {},
"status": {
"enum": [
"pending",
"active",
"delayed",
"completed",
"failed"
],
"type": "string"
},
"type": {
"enum": [
"sync",
"export",
"recompute",
"reclassify"
],
"type": "string"
},
"updatedAt": {
"format": "date-time",
"type": "string"
}
},
"required": [
"requestId",
"type",
"status",
"progress",
"createdAt",
"updatedAt"
],
"type": "object"
},
"type": "array"
},
"primary": {
"type": "string"
}
},
"required": [
"primary",
"all"
],
"type": "object"
},
"status": {
"enum": [
"queued",
"completed"
],
"type": "string"
},
"statuses": {
"items": {
"additionalProperties": false,
"properties": {
"appProgress": {
"additionalProperties": false,
"properties": {
"completed": {
"type": "number"
},
"total": {
"type": "number"
},
"transactionsSynced": {
"type": "number"
}
},
"required": [
"completed",
"total",
"transactionsSynced"
],
"type": "object"
},
"completedAt": {
"format": "date-time",
"type": "string"
},
"createdAt": {
"format": "date-time",
"type": "string"
},
"error": {
"additionalProperties": false,
"properties": {
"error": {
"additionalProperties": false,
"properties": {
"code": {
"type": "string"
},
"details": {
"additionalProperties": {},
"propertyNames": {
"type": "string"
},
"type": "object"
},
"message": {
"type": "string"
},
"requestId": {
"type": "string"
}
},
"required": [
"code",
"message",
"requestId"
],
"type": "object"
}
},
"required": [
"error"
],
"type": "object"
},
"finishedOn": {
"type": "number"
},
"progress": {
"type": "number"
},
"requestId": {
"type": "string"
},
"result": {
"additionalProperties": false,
"properties": {
"downloadUrl": {
"type": "string"
},
"fileSize": {
"type": "number"
},
"format": {
"enum": [
"xlsx",
"pdf",
"json"
],
"type": "string"
}
},
"required": [
"downloadUrl",
"fileSize",
"format"
],
"type": "object"
},
"returnValue": {},
"status": {
"enum": [
"pending",
"active",
"delayed",
"completed",
"failed"
],
"type": "string"
},
"type": {
"enum": [
"sync",
"export",
"recompute",
"reclassify"
],
"type": "string"
},
"updatedAt": {
"format": "date-time",
"type": "string"
}
},
"required": [
"requestId",
"type",
"status",
"progress",
"createdAt",
"updatedAt"
],
"type": "object"
},
"type": "array"
},
"success": {
"type": "boolean"
},
"transactionId": {
"type": "string"
}
},
"required": [
"status",
"transactionId"
],
"type": "object"
}
},
{
"description": "Queue generation of the requested spreadsheet, PDF, or JSON accounting report—such as profit and loss, trial balance, balance sheet, journal, or transaction export—for a reporting period; track the returned requestId with get_request_status.",
"inputSchema": {
"additionalProperties": false,
"properties": {
"format": {
"description": "Export format",
"enum": [
"xlsx",
"pdf",
"json"
],
"type": "string"
},
"fromDate": {
"description": "Report period start ISO timestamp",
"type": "string"
},
"portfolioRef": {
"description": "Portfolio exact name or slug",
"type": "string"
},
"reportType": {
"description": "Report type",
"enum": [
"transactions",
"journal-entries",
"gains-losses",
"cost-basis-ledger",
"income-expense",
"profit-and-loss",
"statement",
"balance-sheet",
"trial-balance"
],
"type": "string"
},
"toDate": {
"description": "Report period end ISO timestamp",
"type": "string"
},
"totalsOnly": {
"description": "Return summary only when true",
"type": "boolean"
},
"workspaceRef": {
"description": "Workspace exact name or slug",
"type": "string"
}
},
"required": [
"workspaceRef",
"portfolioRef",
"reportType",
"format",
"fromDate",
"toDate"
],
"type": "object"
},
"name": "request_report_export",
"outputSchema": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"additionalProperties": false,
"properties": {
"requestId": {
"type": "string"
}
},
"required": [
"requestId"
],
"type": "object"
}
},
{
"description": "Estimate exchange rates, processing fees, amount received, and corridor limits for a bank payout before sending money; use it to compare supported rails such as ACH, SEPA, EFT, FPS, IMPS, or SWIFT.",
"inputSchema": {
"additionalProperties": false,
"properties": {
"network": {
"description": "Fiat payout rail / bank method",
"enum": [
"SWIFT",
"ACH",
"SEPA",
"FPS",
"EFT",
"FAST",
"CHATS",
"KFTC",
"ZENGIN",
"INSTAPAY",
"PESONET",
"PROMPTPAY",
"BECS",
"IMPS",
"NEFT",
"BI-FAST",
"UAEFTS",
"SPEI",
"SPID",
"PIX"
],
"type": "string"
},
"portfolioRef": {
"description": "Portfolio exact name or slug",
"type": "string"
},
"purposeOfPayment": {
"description": "Purpose-of-payment classification",
"enum": [
"payment_for_goods",
"payment_for_business_services",
"payment_for_salary_or_benefits",
"capital_investment_or_item",
"other"
],
"type": "string"
},
"receivingAmount": {
"description": "Amount the recipient should receive, as a decimal string in the receiving currency (e.g. \"500000\")",
"type": "string"
},
"receivingCurrency": {
"description": "ISO 4217 receiving currency; defaults to the network default",
"type": "string"
},
"recipientBankCountry": {
"description": "ISO 3166-1 alpha-2 recipient bank country; defaults to the network default",
"type": "string"
},
"senderCurrency": {
"description": "Stablecoin funding the payout (default USDC)",
"enum": [
"USDC",
"USDT",
"USDe"
],
"type": "string"
},
"workspaceRef": {
"description": "Workspace exact name or slug",
"type": "string"
}
},
"required": [
"workspaceRef",
"portfolioRef",
"network",
"receivingAmount"
],
"type": "object"
},
"name": "simulate_fiat_quote",
"outputSchema": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"additionalProperties": false,
"properties": {
"corridor": {
"additionalProperties": false,
"properties": {
"amountBounds": {
"additionalProperties": false,
"properties": {
"maxAmount": {
"type": "string"
},
"minAmount": {
"type": "string"
}
},
"required": [
"minAmount",
"maxAmount"
],
"type": "object"
},
"network": {
"type": "string"
},
"receivingCurrency": {
"type": "string"
},
"recipientBankCountry": {
"type": "string"
},
"senderCurrency": {
"type": "string"
}
},
"required": [
"network",
"receivingCurrency",
"recipientBankCountry",
"senderCurrency"
],
"type": "object"
},
"note": {
"type": "string"
},
"quote": {
"additionalProperties": false,
"properties": {
"exchangeRate": {
"type": "string"
},
"itemizedFees": {
"items": {
"additionalProperties": false,
"properties": {
"amount": {
"type": "string"
},
"key": {
"type": "string"
},
"label": {
"type": "string"
},
"percentage": {
"type": "string"
}
},
"required": [
"key",
"label",
"amount"
],
"type": "object"
},
"type": "array"
},
"processingFee": {
"type": "string"
},
"quoteValiditySeconds": {
"maximum": 9007199254740991,
"minimum": -9007199254740991,
"type": "integer"
},
"receivingCurrency": {
"type": "string"
},
"senderCurrency": {
"type": "string"
},
"summary": {
"type": "string"
},
"totalReceivable": {
"type": "string"
}
},
"required": [
"exchangeRate",
"senderCurrency",
"receivingCurrency",
"processingFee",
"itemizedFees",
"totalReceivable",
"quoteValiditySeconds",
"summary"
],
"type": "object"
},
"status": {
"enum": [
"quoted",
"corridor_unavailable",
"amount_out_of_range",
"limit_skipped"
],
"type": "string"
}
},
"required": [
"status",
"corridor"
],
"type": "object"
}
},
{
"description": "Destructively move selected whole existing operation handles unchanged out of one accounting transaction into a new classified transaction; use this only when the needed economic legs already exist as operation handles. It cannot divide one transfer amount into new economic legs: repair sync normalization or use a supported persisted replacement lifecycle for a missing leg. Preview the grouping first, then track the queued requestId.",
"inputSchema": {
"additionalProperties": false,
"properties": {
"operationType": {
"description": "Accounting operation type for the new transaction",
"enum": [
"DEPOSIT_FIAT",
"INCOME",
"REFUND",
"WITHDRAWAL_FIAT",
"EXPENSE",
"BUY",
"SELL",
"EXCHANGE",
"SWAP",
"MOVE",
"INTERCOMPANY_SEND",
"INTERCOMPANY_RECEIVE",
"STAKE",
"UNSTAKE",
"PROTOCOL_DEPOSIT",
"PROTOCOL_WITHDRAW",
"VAULT_DEPOSIT",
"VAULT_WITHDRAW",
"LP_IN",
"LP_OUT",
"LOAN_BORROW",
"LOAN_REPAY",
"LOAN_LIQUIDATION",
"LEND_GIVE",
"LEND_WITHDRAW",
"ADJUSTMENT",
"UNCATEGORIZED",
"SPAM"
],
"type": "string"
},
"operations": {
"description": "Whole existing operation handles to move unchanged into a new transaction; do not use this to divide one normalized transfer amount into new economic legs",
"items": {
"additionalProperties": false,
"properties": {
"portfolioTransactionId": {
"description": "Portfolio transaction the operation currently belongs to",
"type": "string"
},
"txIndex": {
"description": "Transfer index within the wallet transaction",
"type": "integer"
},
"walletTransactionId": {
"description": "Wallet transaction handle (from a walletOperation)",
"type": "string"
}
},
"required": [
"walletTransactionId",
"txIndex",
"portfolioTransactionId"
],
"type": "object"
},
"type": "array"
},
"portfolioRef": {
"description": "Portfolio exact name or slug",
"type": "string"
},
"reason": {
"description": "Optional immutable root reason. Nonempty bytes are preserved exactly; use ptx:<uuid> for transaction references.",
"type": "string"
},
"subType": {
"description": "Optional operation sub-type",
"type": "string"
},
"transactionId": {
"description": "Source transaction to split operations out of",
"type": "string"
},
"workspaceRef": {
"description": "Workspace exact name or slug",
"type": "string"
}
},
"required": [
"workspaceRef",
"portfolioRef",
"transactionId",
"operations",
"operationType"
],
"type": "object"
},
"name": "split_transactions",
"outputSchema": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"additionalProperties": false,
"oneOf": [
{
"additionalProperties": false,
"properties": {
"requestId": {
"type": "string"
},
"status": {
"const": "queued",
"type": "string"
},
"transactionId": {
"type": "string"
}
},
"required": [
"status",
"requestId",
"transactionId"
],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"error": {
"additionalProperties": false,
"properties": {
"message": {
"type": "string"
},
"name": {
"type": "string"
}
},
"required": [
"name",
"message"
],
"type": "object"
},
"status": {
"const": "completed",
"type": "string"
},
"success": {
"type": "boolean"
},
"transactionId": {
"type": "string"
}
},
"required": [
"status",
"success",
"transactionId"
],
"type": "object"
}
],
"properties": {
"error": {
"additionalProperties": false,
"properties": {
"message": {
"type": "string"
},
"name": {
"type": "string"
}
},
"required": [
"name",
"message"
],
"type": "object"
},
"requestId": {
"type": "string"
},
"status": {
"enum": [
"queued",
"completed"
],
"type": "string"
},
"success": {
"type": "boolean"
},
"transactionId": {
"type": "string"
}
},
"required": [
"status",
"transactionId"
],
"type": "object"
}
}
]
}Verify it yourself
curl -s https://api.teppi.xyz/v1/evidence/sha256:2a86beb0fc393ce6db4b756cc42ec4c135df2aa89d9dd498deb3b4d4e421ab8c | sha256sum