Koskamo

Tokenbooks MCP

A first-party MCP server for crypto and fiat accounting that allows agents to reconcile multi-chain treasury flows, pull capital gains and balance sheet reports, and propose journal entries within an auditable, permission-gated ledger without handling private keys or moving funds.

Endpoint and access

No sign-in to connect and list tools. Individual tools may still need a vendor account, credentials, or permissions; check the documented prerequisites.

Tokenbooks MCP logo, by TokenbooksVendor evidenceStreamable HTTPNo sign-inEndpoint checked 2026-11-23Operated by Tokenbooks
You need:Add the endpoint to any MCP-compatible client, approve the workspace scopesAdd the Tokenbooks MCP server to Claude Desktop, ChatGPT, or your own client. OAuth handles workspace consent in two clicks.Register a user, create the first workspace, and establish workspace-scoped API access for the product integration.
MCP endpoint (Streamable HTTP)
https://api.tokenbooks.io/mcp
Vendor documentation

What its tools do

37 tools, grouped by the hints the server advertises. Hints are self-declared, not verified behavior.

37 of 37 have a description · 37 of 37 declare behavior hints · 34 of 35 with parameters document them all

Checks and signals

Each line is separate evidence, not a trust score.

  • Passed Endpoint answered the live check ·
  • Passed Official MCP Registry namespace is tied to tokenbooks.io ·
  • Passed Endpoint is on the registry namespace domain ·
  • Uptime 100% over 90 days
  • Availability 2 of 2 checks passed in 30 days

What you can do with it

  • Reconcile multi-chain treasury flows in plain English
  • Pull capital gains, balance sheet, and P&L on demand
  • Drill into one asset position across every wallet
  • Search and explain individual portfolio transactions

Source and maintenance

Vendor evidenceRegistry 0.1.1

Protocol and capabilities

Server
tokenbooks 0.1.1
MCP protocol negotiated in check
2025-11-25
Tools
37 advertised
Resources
Not advertised
Resource templates
Not advertised
Prompts
4 advertised
Server-advertised capabilities
{
  "tools": {
    "listChanged": false
  },
  "prompts": {
    "listChanged": false
  }
}

Server-provided instructions

Untrusted server output shown for inspection. It is not Koskamo guidance and is excluded from knowledge search.

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. If list_workspaces returns none, create one with create_workspace. 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; if it reports the workspace is busy, retry in a moment. 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

37 advertised

get_server_info — Get Server Info
Advertised by the server during the last successful anonymous check.
Advertised read-only

Review supported blockchains and fiat sources, accounting standards, plans, limits and tier features, signup, connection endpoint, authentication, and exclusions. No credentials needed; use before connecting, evaluating costs or coverage, or debugging a connection.

get_server_info input schema
{
  "type": "object",
  "properties": {},
  "additionalProperties": false
}
get_server_info output schema
{
  "type": "object",
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "required": [
    "name",
    "title",
    "summary",
    "endpoint",
    "documentationUrl",
    "authentication",
    "notes",
    "gettingStarted",
    "coverage",
    "pricing",
    "limitations"
  ],
  "properties": {
    "name": {
      "type": "string"
    },
    "notes": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "title": {
      "type": "string"
    },
    "pricing": {
      "type": "object",
      "required": [
        "url",
        "note",
        "plans"
      ],
      "properties": {
        "url": {
          "type": "string"
        },
        "note": {
          "type": "string"
        },
        "plans": {
          "type": "array",
          "items": {
            "oneOf": [
              {
                "type": "object",
                "required": [
                  "name",
                  "capacity",
                  "unlocks"
                ],
                "properties": {
                  "name": {
                    "type": "string"
                  },
                  "unlocks": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "capacity": {
                    "type": "string",
                    "const": "negotiated"
                  }
                },
                "additionalProperties": false
              },
              {
                "type": "object",
                "required": [
                  "name",
                  "capacity",
                  "limits",
                  "unlocks"
                ],
                "properties": {
                  "name": {
                    "type": "string"
                  },
                  "limits": {
                    "type": "object",
                    "required": [
                      "portfolios",
                      "wallets",
                      "transactions"
                    ],
                    "properties": {
                      "wallets": {
                        "type": "number"
                      },
                      "portfolios": {
                        "type": "number"
                      },
                      "transactions": {
                        "type": "number"
                      }
                    },
                    "additionalProperties": false
                  },
                  "unlocks": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "capacity": {
                    "type": "string",
                    "const": "published"
                  }
                },
                "additionalProperties": false
              }
            ]
          }
        }
      },
      "additionalProperties": false
    },
    "summary": {
      "type": "string"
    },
    "coverage": {
      "type": "object",
      "required": [
        "blockchains",
        "fiat",
        "accountingFrameworks"
      ],
      "properties": {
        "fiat": {
          "type": "string"
        },
        "blockchains": {
          "type": "string"
        },
        "accountingFrameworks": {
          "type": "string"
        }
      },
      "additionalProperties": false
    },
    "endpoint": {
      "type": "string"
    },
    "limitations": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "authentication": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "gettingStarted": {
      "type": "object",
      "required": [
        "accessRequirement",
        "signUpUrl",
        "steps"
      ],
      "properties": {
        "steps": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "signUpUrl": {
          "type": "string"
        },
        "accessRequirement": {
          "type": "string"
        }
      },
      "additionalProperties": false
    },
    "documentationUrl": {
      "type": "string"
    }
  },
  "additionalProperties": false
}
get_server_info annotations
{
  "title": "Get Server Info",
  "readOnlyHint": true,
  "openWorldHint": false,
  "idempotentHint": true,
  "destructiveHint": false
}
get_accounting_reference — Get Accounting Reference
Advertised by the server during the last successful anonymous check.
Advertised read-only

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.

get_accounting_reference input schema
{
  "type": "object",
  "properties": {},
  "additionalProperties": false
}
get_accounting_reference output schema
{
  "type": "object",
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "required": [
    "operationTypes",
    "transactionStatuses",
    "costBasisLotMethods",
    "costBasisLotEntryKinds"
  ],
  "properties": {
    "operationTypes": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "value",
          "description"
        ],
        "properties": {
          "value": {
            "type": "string"
          },
          "description": {
            "type": "string"
          }
        },
        "additionalProperties": false
      }
    },
    "costBasisLotMethods": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "value",
          "description"
        ],
        "properties": {
          "value": {
            "type": "string"
          },
          "description": {
            "type": "string"
          }
        },
        "additionalProperties": false
      }
    },
    "transactionStatuses": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "value",
          "description"
        ],
        "properties": {
          "value": {
            "type": "string"
          },
          "description": {
            "type": "string"
          }
        },
        "additionalProperties": false
      }
    },
    "costBasisLotEntryKinds": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "value",
          "description"
        ],
        "properties": {
          "value": {
            "type": "string"
          },
          "description": {
            "type": "string"
          }
        },
        "additionalProperties": false
      }
    }
  },
  "additionalProperties": false
}
get_accounting_reference annotations
{
  "title": "Get Accounting Reference",
  "readOnlyHint": true,
  "openWorldHint": false,
  "idempotentHint": true,
  "destructiveHint": false
}
list_workspaces — List Workspaces
Advertised by the server during the last successful anonymous check.
Advertised read-only

List workspaces available to the authenticated Tokenbooks user, or search by name or slug.

list_workspaces input schema
{
  "type": "object",
  "properties": {
    "query": {
      "type": "string",
      "description": "Optional workspace name or slug search query"
    }
  },
  "additionalProperties": false
}
list_workspaces output schema
{
  "type": "object",
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "required": [
    "data"
  ],
  "properties": {
    "data": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "name",
          "planName",
          "role",
          "slug",
          "usage"
        ],
        "properties": {
          "name": {
            "type": "string"
          },
          "role": {
            "type": "string"
          },
          "slug": {
            "type": "string"
          },
          "usage": {
            "type": "object",
            "required": [
              "portfolios",
              "transactions",
              "users",
              "wallets"
            ],
            "properties": {
              "users": {
                "type": "number"
              },
              "wallets": {
                "type": "number"
              },
              "portfolios": {
                "type": "number"
              },
              "transactions": {
                "type": "number"
              }
            },
            "additionalProperties": false
          },
          "planName": {
            "type": "string"
          }
        },
        "additionalProperties": false
      }
    }
  },
  "additionalProperties": false
}
list_workspaces annotations
{
  "title": "List Workspaces",
  "readOnlyHint": true,
  "openWorldHint": false,
  "idempotentHint": true,
  "destructiveHint": false
}
list_portfolios — List Portfolios
Advertised by the server during the last successful anonymous check.
Advertised read-only

List portfolios available in a workspace, or search by name or slug.

list_portfolios input schema
{
  "type": "object",
  "required": [
    "workspaceRef"
  ],
  "properties": {
    "page": {
      "type": "integer",
      "description": "Page number, starting at 1"
    },
    "limit": {
      "anyOf": [
        {
          "type": "integer",
          "maximum": 100,
          "minimum": 1,
          "description": "Maximum items to return, maximum 100. Preferred MCP pagination field."
        },
        {
          "type": "string",
          "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)$",
          "description": "Maximum items to return, maximum 100. Preferred MCP pagination field. Numeric strings are accepted for MCP client compatibility."
        }
      ],
      "description": "Maximum items to return, maximum 100. Preferred MCP pagination field."
    },
    "query": {
      "type": "string",
      "description": "Optional portfolio name or slug search query"
    },
    "pageSize": {
      "anyOf": [
        {
          "type": "integer",
          "maximum": 100,
          "minimum": 1,
          "description": "Deprecated alias for limit, maximum 100. Prefer limit for new MCP calls."
        },
        {
          "type": "string",
          "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)$",
          "description": "Deprecated alias for limit, maximum 100. Prefer limit for new MCP calls. Numeric strings are accepted for MCP client compatibility."
        }
      ],
      "description": "Deprecated alias for limit, maximum 100. Prefer limit for new MCP calls."
    },
    "workspaceRef": {
      "type": "string",
      "description": "Workspace exact name or slug"
    }
  },
  "additionalProperties": false
}
list_portfolios output schema
{
  "type": "object",
  "required": [
    "data",
    "pagination"
  ],
  "properties": {
    "data": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "slug",
          "name",
          "createdAt",
          "updatedAt"
        ],
        "properties": {
          "name": {
            "type": "string"
          },
          "slug": {
            "type": "string"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "additionalProperties": false
      }
    },
    "pagination": {
      "type": "object",
      "required": [
        "page",
        "pageSize",
        "totalCount",
        "totalPages"
      ],
      "properties": {
        "page": {
          "type": "integer",
          "maximum": 9007199254740991,
          "minimum": -9007199254740991
        },
        "pageSize": {
          "type": "integer",
          "maximum": 9007199254740991,
          "minimum": -9007199254740991
        },
        "totalCount": {
          "type": "integer",
          "maximum": 9007199254740991,
          "minimum": -9007199254740991
        },
        "totalPages": {
          "type": "integer",
          "maximum": 9007199254740991,
          "minimum": -9007199254740991
        }
      },
      "additionalProperties": false
    }
  },
  "additionalProperties": false
}
list_portfolios annotations
{
  "title": "List Portfolios",
  "readOnlyHint": true,
  "openWorldHint": false,
  "idempotentHint": true,
  "destructiveHint": false
}
get_portfolio — Get Portfolio
Advertised by the server during the last successful anonymous check.
Advertised read-only

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.

get_portfolio input schema
{
  "type": "object",
  "required": [
    "workspaceRef",
    "portfolioRef"
  ],
  "properties": {
    "portfolioRef": {
      "type": "string",
      "description": "Portfolio exact name or slug"
    },
    "workspaceRef": {
      "type": "string",
      "description": "Workspace exact name or slug"
    }
  },
  "additionalProperties": false
}
get_portfolio output schema
{
  "type": "object",
  "required": [
    "slug",
    "name",
    "createdAt",
    "updatedAt",
    "currency",
    "accountingConfiguration",
    "reportingTimezone",
    "hasPostedActivity"
  ],
  "properties": {
    "name": {
      "type": "string"
    },
    "slug": {
      "type": "string"
    },
    "currency": {
      "type": "string"
    },
    "createdAt": {
      "type": "string",
      "format": "date-time"
    },
    "updatedAt": {
      "type": "string",
      "format": "date-time"
    },
    "legalEntityType": {
      "enum": [
        "BUSINESS",
        "CORPORATION",
        "INDIVIDUAL",
        "TRUST",
        "PARTNERSHIP"
      ],
      "type": "string"
    },
    "hasPostedActivity": {
      "type": "boolean"
    },
    "reportingTimezone": {
      "type": "string"
    },
    "accountingConfiguration": {
      "type": "object",
      "required": [
        "gasFeeAccountingTreatment",
        "isPurchaseTaxable",
        "costBasisLotMethod",
        "baseCurrency",
        "jurisdictionCode",
        "stablecoinTreatment",
        "costBasisPerWallet",
        "defiDepositTreatment",
        "separateIncomeExpenseLines",
        "financialReportingFramework"
      ],
      "properties": {
        "baseCurrency": {
          "type": "string"
        },
        "jurisdictionCode": {
          "type": "string"
        },
        "isPurchaseTaxable": {
          "type": "boolean"
        },
        "costBasisLotMethod": {
          "enum": [
            "FIFO",
            "LIFO",
            "HIFO",
            "ACB"
          ],
          "type": "string"
        },
        "costBasisPerWallet": {
          "type": "boolean"
        },
        "stablecoinTreatment": {
          "enum": [
            "BASE",
            "ASSET"
          ],
          "type": "string"
        },
        "defiDepositTreatment": {
          "enum": [
            "TAXABLE_EXCHANGE",
            "NON_TAXABLE_RESERVATION"
          ],
          "type": "string"
        },
        "gasFeeAccountingTreatment": {
          "enum": [
            "DISPOSAL_AND_COST_BASIS",
            "EXPENSE_ONLY"
          ],
          "type": "string"
        },
        "separateIncomeExpenseLines": {
          "type": "boolean"
        },
        "financialReportingFramework": {
          "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",
          "default": "TAX_ONLY"
        }
      },
      "additionalProperties": false
    }
  },
  "additionalProperties": false
}
get_portfolio annotations
{
  "title": "Get Portfolio",
  "readOnlyHint": true,
  "openWorldHint": false,
  "idempotentHint": true,
  "destructiveHint": false
}
get_portfolio_balances — Get Portfolio Balances
Advertised by the server during the last successful anonymous check.
Advertised read-only

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.

get_portfolio_balances input schema
{
  "type": "object",
  "required": [
    "workspaceRef",
    "portfolioRef"
  ],
  "properties": {
    "portfolioRef": {
      "type": "string",
      "description": "Portfolio exact name or slug"
    },
    "workspaceRef": {
      "type": "string",
      "description": "Workspace exact name or slug"
    }
  },
  "additionalProperties": false
}
get_portfolio_balances output schema
{
  "type": "object",
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "required": [
    "data",
    "allBalancesMatch"
  ],
  "properties": {
    "data": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "chainId",
          "address",
          "isBalanceMatch",
          "tokenCount"
        ],
        "properties": {
          "address": {
            "type": "string"
          },
          "chainId": {
            "type": "string"
          },
          "tokenCount": {
            "type": "integer",
            "maximum": 9007199254740991,
            "minimum": -9007199254740991
          },
          "isBalanceMatch": {
            "type": "boolean"
          },
          "lastTransactionTimestamp": {
            "type": "string",
            "format": "date-time"
          }
        },
        "additionalProperties": false
      }
    },
    "allBalancesMatch": {
      "type": "boolean"
    }
  },
  "additionalProperties": false
}
get_portfolio_balances annotations
{
  "title": "Get Portfolio Balances",
  "readOnlyHint": true,
  "openWorldHint": false,
  "idempotentHint": true,
  "destructiveHint": false
}
list_accounting_rules — List Accounting Rules
Advertised by the server during the last successful anonymous check.
Advertised read-only

Find saved accounting rules, filter them, or recover the exact ruleRef needed to preview, edit, or delete one rule.

list_accounting_rules input schema
{
  "type": "object",
  "required": [
    "workspaceRef",
    "portfolioRef"
  ],
  "properties": {
    "limit": {
      "type": "integer",
      "default": 50,
      "maximum": 9007199254740991,
      "minimum": 1,
      "description": "Requested number of resources to return. Oversized values are clamped to the route limit."
    },
    "search": {
      "type": "string",
      "maxLength": 200,
      "minLength": 1,
      "description": "Free-text match against rule names."
    },
    "enabled": {
      "type": "boolean",
      "description": "Keep only enabled rules, or only disabled ones. Omit to return both."
    },
    "ruleRef": {
      "type": "string",
      "minLength": 1,
      "description": "Saved rule handle, from list_accounting_rules."
    },
    "wallets": {
      "type": "array",
      "items": {
        "type": "string",
        "minLength": 3,
        "description": "Wallet as chainId:walletAddress, e.g. eth-mainnet:0xabc."
      },
      "maxItems": 100,
      "description": "Wallet selectors as chainId:walletAddress values."
    },
    "assetIds": {
      "type": "array",
      "items": {
        "type": "string",
        "minLength": 1
      },
      "maxItems": 100,
      "description": "Asset ids as CSV or repeated query values."
    },
    "pageToken": {
      "type": "string",
      "minLength": 1,
      "description": "Opaque token returned by the previous list response."
    },
    "actionTypes": {
      "type": "array",
      "items": {
        "enum": [
          "SET_COUNTERPARTY",
          "SET_LEDGER_ACCOUNT",
          "SET_RESPONSIBILITY_CENTERS"
        ],
        "type": "string",
        "description": "What a rule changes when it matches."
      },
      "maxItems": 25,
      "description": "Action types as CSV or repeated query values."
    },
    "portfolioRef": {
      "type": "string",
      "minLength": 1,
      "description": "Portfolio name or slug inside that workspace. Call list_portfolios to resolve it."
    },
    "workspaceRef": {
      "type": "string",
      "minLength": 1,
      "description": "Workspace name or slug. Call list_workspaces to resolve it."
    },
    "accountNumbers": {
      "type": "array",
      "items": {
        "type": "string",
        "maxLength": 8,
        "minLength": 1,
        "description": "Chart-of-accounts number, from list_journal_line_assignment_options (type: ledger_account)."
      },
      "maxItems": 100,
      "description": "Ledger account numbers as CSV or repeated query values."
    },
    "conditionFields": {
      "type": "array",
      "items": {
        "enum": [
          "fromAddressLabel",
          "toAddressLabel",
          "fromAddress",
          "toAddress",
          "direction",
          "wallet",
          "asset",
          "assetClass",
          "stablecoin",
          "chain",
          "operationType",
          "accountSubType",
          "accountNumber",
          "counterparty",
          "fiatValue",
          "entryType",
          "accountType",
          "transactionDate"
        ],
        "type": "string",
        "description": "Which part of a transaction the condition tests."
      },
      "maxItems": 50,
      "description": "Condition fields as CSV or repeated query values."
    },
    "counterpartyNames": {
      "type": "array",
      "items": {
        "type": "string",
        "minLength": 1,
        "description": "Counterparty name, from list_journal_line_assignment_options (type: counterparty)."
      },
      "maxItems": 100,
      "description": "Counterparty names as CSV or repeated query values."
    }
  },
  "additionalProperties": false
}
list_accounting_rules output schema
{
  "type": "object",
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "required": [
    "data",
    "pagination"
  ],
  "properties": {
    "data": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "name",
          "enabled",
          "version",
          "hasInvalidDefinition",
          "hasUnresolvedReferences",
          "createdAt",
          "updatedAt",
          "ruleRef"
        ],
        "properties": {
          "name": {
            "type": "string"
          },
          "action": {
            "type": "object",
            "required": [
              "formatVersion",
              "actions"
            ],
            "properties": {
              "actions": {
                "type": "array",
                "items": {
                  "oneOf": [
                    {
                      "type": "object",
                      "required": [
                        "type",
                        "target"
                      ],
                      "properties": {
                        "type": {
                          "type": "string",
                          "const": "SET_COUNTERPARTY"
                        },
                        "target": {
                          "type": "string",
                          "const": "LINE"
                        },
                        "counterpartyName": {
                          "type": "string",
                          "minLength": 1
                        }
                      },
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "required": [
                        "type",
                        "target"
                      ],
                      "properties": {
                        "type": {
                          "type": "string",
                          "const": "SET_LEDGER_ACCOUNT"
                        },
                        "target": {
                          "type": "string",
                          "const": "LINE"
                        },
                        "accountNumber": {
                          "type": "string",
                          "maxLength": 8,
                          "minLength": 1
                        }
                      },
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "required": [
                        "type",
                        "target",
                        "responsibilityCenterAssignments"
                      ],
                      "properties": {
                        "type": {
                          "type": "string",
                          "const": "SET_RESPONSIBILITY_CENTERS"
                        },
                        "target": {
                          "type": "string",
                          "const": "LINE"
                        },
                        "responsibilityCenterAssignments": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "responsibilityCenterName": {
                                "type": "string",
                                "minLength": 1
                              },
                              "responsibilityCenterTypeKey": {
                                "type": "string",
                                "pattern": "^[a-z0-9]+(_[a-z0-9]+)*$"
                              }
                            },
                            "additionalProperties": false
                          },
                          "minItems": 1
                        }
                      },
                      "additionalProperties": false
                    }
                  ]
                },
                "minItems": 1
              },
              "formatVersion": {
                "type": "number",
                "const": 1
              }
            },
            "additionalProperties": false
          },
          "enabled": {
            "type": "boolean"
          },
          "ruleRef": {
            "type": "string",
            "minLength": 1
          },
          "version": {
            "type": "integer",
            "maximum": 9007199254740991,
            "minimum": -9007199254740991
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "conditions": {
            "type": "object",
            "required": [
              "formatVersion",
              "all"
            ],
            "properties": {
              "all": {
                "type": "array",
                "items": {
                  "oneOf": [
                    {
                      "type": "object",
                      "required": [
                        "field",
                        "operator",
                        "value"
                      ],
                      "properties": {
                        "field": {
                          "type": "string",
                          "const": "fromAddressLabel"
                        },
                        "value": {
                          "type": "string",
                          "minLength": 1
                        },
                        "operator": {
                          "enum": [
                            "equals",
                            "contains",
                            "notEquals",
                            "notContains"
                          ],
                          "type": "string"
                        }
                      },
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "required": [
                        "field",
                        "operator",
                        "value"
                      ],
                      "properties": {
                        "field": {
                          "type": "string",
                          "const": "toAddressLabel"
                        },
                        "value": {
                          "type": "string",
                          "minLength": 1
                        },
                        "operator": {
                          "enum": [
                            "equals",
                            "contains",
                            "notEquals",
                            "notContains"
                          ],
                          "type": "string"
                        }
                      },
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "required": [
                        "field",
                        "operator",
                        "value"
                      ],
                      "properties": {
                        "field": {
                          "type": "string",
                          "const": "fromAddress"
                        },
                        "value": {
                          "type": "string",
                          "minLength": 1
                        },
                        "operator": {
                          "enum": [
                            "equals",
                            "contains"
                          ],
                          "type": "string"
                        }
                      },
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "required": [
                        "field",
                        "operator",
                        "value"
                      ],
                      "properties": {
                        "field": {
                          "type": "string",
                          "const": "toAddress"
                        },
                        "value": {
                          "type": "string",
                          "minLength": 1
                        },
                        "operator": {
                          "enum": [
                            "equals",
                            "contains"
                          ],
                          "type": "string"
                        }
                      },
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "required": [
                        "field",
                        "operator",
                        "value"
                      ],
                      "properties": {
                        "field": {
                          "type": "string",
                          "const": "direction"
                        },
                        "value": {
                          "enum": [
                            "IN",
                            "OUT",
                            "GAS"
                          ],
                          "type": "string"
                        },
                        "operator": {
                          "enum": [
                            "equals",
                            "notEquals"
                          ],
                          "type": "string"
                        }
                      },
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "required": [
                        "field",
                        "operator",
                        "value"
                      ],
                      "properties": {
                        "field": {
                          "type": "string",
                          "const": "asset"
                        },
                        "value": {
                          "type": "array",
                          "items": {
                            "type": "string",
                            "minLength": 1
                          },
                          "minItems": 1
                        },
                        "operator": {
                          "enum": [
                            "in",
                            "notIn"
                          ],
                          "type": "string"
                        }
                      },
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "required": [
                        "field",
                        "operator",
                        "value"
                      ],
                      "properties": {
                        "field": {
                          "type": "string",
                          "const": "assetClass"
                        },
                        "value": {
                          "type": "array",
                          "items": {
                            "enum": [
                              "ERC20",
                              "FIAT",
                              "NATIVE",
                              "REBASE_LST",
                              "INTEREST_BEARING",
                              "VALUE_ACCRUING",
                              "LP_SHARE",
                              "DEBT",
                              "REFLECT",
                              "VOTE_ESCROWED",
                              "NFT"
                            ],
                            "type": "string"
                          },
                          "minItems": 1
                        },
                        "operator": {
                          "enum": [
                            "in",
                            "notIn"
                          ],
                          "type": "string"
                        }
                      },
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "required": [
                        "field",
                        "operator",
                        "value"
                      ],
                      "properties": {
                        "field": {
                          "type": "string",
                          "const": "stablecoin"
                        },
                        "value": {
                          "type": "boolean"
                        },
                        "operator": {
                          "enum": [
                            "equals"
                          ],
                          "type": "string"
                        }
                      },
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "required": [
                        "field",
                        "operator",
                        "value"
                      ],
                      "properties": {
                        "field": {
                          "type": "string",
                          "const": "chain"
                        },
                        "value": {
                          "type": "array",
                          "items": {
                            "type": "string",
                            "minLength": 1
                          },
                          "minItems": 1
                        },
                        "operator": {
                          "enum": [
                            "in",
                            "notIn"
                          ],
                          "type": "string"
                        }
                      },
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "required": [
                        "field",
                        "operator",
                        "value"
                      ],
                      "properties": {
                        "field": {
                          "type": "string",
                          "const": "operationType"
                        },
                        "value": {
                          "type": "array",
                          "items": {
                            "enum": [
                              "DEPOSIT_FIAT",
                              "INCOME",
                              "REFUND",
                              "REBATE",
                              "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
                        },
                        "operator": {
                          "enum": [
                            "in",
                            "notIn"
                          ],
                          "type": "string"
                        }
                      },
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "required": [
                        "field",
                        "operator",
                        "value"
                      ],
                      "properties": {
                        "field": {
                          "type": "string",
                          "const": "accountSubType"
                        },
                        "value": {
                          "type": "array",
                          "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",
                              "OCI_REVALUATION",
                              "REVALUATION_SURPLUS"
                            ],
                            "type": "string"
                          },
                          "minItems": 1
                        },
                        "operator": {
                          "enum": [
                            "in",
                            "notIn"
                          ],
                          "type": "string"
                        }
                      },
                      "additionalProperties": false
                    },
                    {
                      "oneOf": [
                        {
                          "type": "object",
                          "required": [
                            "field",
                            "operator",
                            "value"
                          ],
                          "properties": {
                            "field": {
                              "type": "string",
                              "const": "fiatValue"
                            },
                            "value": {
                              "type": "string",
                              "pattern": "^-?\\d+(\\.\\d+)?$"
                            },
                            "operator": {
                              "type": "string",
                              "const": "gt"
                            }
                          },
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "required": [
                            "field",
                            "operator",
                            "value"
                          ],
                          "properties": {
                            "field": {
                              "type": "string",
                              "const": "fiatValue"
                            },
                            "value": {
                              "type": "string",
                              "pattern": "^-?\\d+(\\.\\d+)?$"
                            },
                            "operator": {
                              "type": "string",
                              "const": "lt"
                            }
                          },
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "required": [
                            "field",
                            "operator",
                            "value"
                          ],
                          "properties": {
                            "field": {
                              "type": "string",
                              "const": "fiatValue"
                            },
                            "value": {
                              "type": "string",
                              "pattern": "^-?\\d+(\\.\\d+)?$"
                            },
                            "operator": {
                              "type": "string",
                              "const": "gte"
                            }
                          },
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "required": [
                            "field",
                            "operator",
                            "value"
                          ],
                          "properties": {
                            "field": {
                              "type": "string",
                              "const": "fiatValue"
                            },
                            "value": {
                              "type": "string",
                              "pattern": "^-?\\d+(\\.\\d+)?$"
                            },
                            "operator": {
                              "type": "string",
                              "const": "lte"
                            }
                          },
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "required": [
                            "field",
                            "operator",
                            "value"
                          ],
                          "properties": {
                            "field": {
                              "type": "string",
                              "const": "fiatValue"
                            },
                            "value": {
                              "type": "array",
                              "items": false,
                              "maxItems": 2,
                              "minItems": 2,
                              "prefixItems": [
                                {
                                  "type": "string",
                                  "pattern": "^-?\\d+(\\.\\d+)?$"
                                },
                                {
                                  "type": "string",
                                  "pattern": "^-?\\d+(\\.\\d+)?$"
                                }
                              ]
                            },
                            "operator": {
                              "type": "string",
                              "const": "between"
                            }
                          },
                          "additionalProperties": false
                        }
                      ]
                    },
                    {
                      "type": "object",
                      "required": [
                        "field",
                        "operator",
                        "value"
                      ],
                      "properties": {
                        "field": {
                          "type": "string",
                          "const": "entryType"
                        },
                        "value": {
                          "enum": [
                            "DR",
                            "CR"
                          ],
                          "type": "string"
                        },
                        "operator": {
                          "enum": [
                            "equals"
                          ],
                          "type": "string"
                        }
                      },
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "required": [
                        "field",
                        "operator",
                        "value"
                      ],
                      "properties": {
                        "field": {
                          "type": "string",
                          "const": "accountType"
                        },
                        "value": {
                          "type": "array",
                          "items": {
                            "enum": [
                              "ASSET",
                              "LIABILITY",
                              "EQUITY",
                              "INCOME",
                              "EXPENSE"
                            ],
                            "type": "string"
                          },
                          "minItems": 1
                        },
                        "operator": {
                          "enum": [
                            "in",
                            "notIn"
                          ],
                          "type": "string"
                        }
                      },
                      "additionalProperties": false
                    },
                    {
                      "oneOf": [
                        {
                          "type": "object",
                          "required": [
                            "field",
                            "operator",
                            "value"
                          ],
                          "properties": {
                            "field": {
                              "type": "string",
                              "const": "transactionDate"
                            },
                            "value": {
                              "type": "string",
                              "format": "date-time"
                            },
                            "operator": {
                              "type": "string",
                              "const": "lt"
                            }
                          },
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "required": [
                            "field",
                            "operator",
                            "value"
                          ],
                          "properties": {
                            "field": {
                              "type": "string",
                              "const": "transactionDate"
                            },
                            "value": {
                              "type": "string",
                              "format": "date-time"
                            },
                            "operator": {
                              "type": "string",
                              "const": "gte"
                            }
                          },
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "required": [
                            "field",
                            "operator",
                            "value"
                          ],
                          "properties": {
                            "field": {
                              "type": "string",
                              "const": "transactionDate"
                            },
                            "value": {
                              "type": "array",
                              "items": false,
                              "maxItems": 2,
                              "minItems": 2,
                              "prefixItems": [
                                {
                                  "type": "string",
                                  "format": "date-time"
                                },
                                {
                                  "type": "string",
                                  "format": "date-time"
                                }
                              ]
                            },
                            "operator": {
                              "type": "string",
                              "const": "between"
                            }
                          },
                          "additionalProperties": false
                        }
                      ]
                    },
                    {
                      "type": "object",
                      "required": [
                        "field",
                        "operator",
                        "value"
                      ],
                      "properties": {
                        "field": {
                          "type": "string",
                          "const": "wallet"
                        },
                        "value": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "required": [
                              "chainId",
                              "address"
                            ],
                            "properties": {
                              "address": {
                                "type": "string",
                                "minLength": 1
                              },
                              "chainId": {
                                "type": "string",
                                "minLength": 1
                              }
                            },
                            "additionalProperties": false
                          }
                        },
                        "operator": {
                          "enum": [
                            "in",
                            "notIn"
                          ],
                          "type": "string"
                        }
                      },
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "required": [
                        "operator",
                        "field",
                        "value"
                      ],
                      "properties": {
                        "field": {
                          "type": "string",
                          "const": "accountNumber"
                        },
                        "value": {
                          "type": "array",
                          "items": {
                            "type": "string",
                            "maxLength": 8,
                            "minLength": 1
                          }
                        },
                        "operator": {
                          "enum": [
                            "in",
                            "notIn"
                          ],
                          "type": "string"
                        }
                      },
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "required": [
                        "field",
                        "operator",
                        "value"
                      ],
                      "properties": {
                        "field": {
                          "type": "string",
                          "const": "counterparty"
                        },
                        "value": {
                          "type": "array",
                          "items": {
                            "type": "string",
                            "minLength": 1
                          }
                        },
                        "operator": {
                          "enum": [
                            "in",
                            "notIn"
                          ],
                          "type": "string"
                        }
                      },
                      "additionalProperties": false
                    }
                  ]
                },
                "minItems": 1
              },
              "formatVersion": {
                "type": "number",
                "const": 1
              }
            },
            "additionalProperties": false
          },
          "hasInvalidDefinition": {
            "type": "boolean"
          },
          "hasUnresolvedReferences": {
            "type": "boolean"
          }
        },
        "additionalProperties": false
      }
    },
    "pagination": {
      "type": "object",
      "required": [
        "pageSize"
      ],
      "properties": {
        "pageSize": {
          "type": "integer",
          "maximum": 9007199254740991,
          "minimum": 1
        },
        "nextPageToken": {
          "type": "string",
          "minLength": 1
        }
      },
      "additionalProperties": false
    }
  },
  "additionalProperties": false
}
list_accounting_rules annotations
{
  "title": "List Accounting Rules",
  "readOnlyHint": true,
  "openWorldHint": false,
  "idempotentHint": true,
  "destructiveHint": false
}
edit_accounting_rules — Edit Accounting Rules
Advertised by the server during the last successful anonymous check.
Advertised destructiveOpen-world

Create, update, enable/disable, reorder, or delete saved accounting rules. 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.

edit_accounting_rules input schema
{
  "type": "object",
  "$defs": {
    "r0": {
      "enum": [
        "in",
        "notIn"
      ],
      "type": "string",
      "description": "How the field is compared with value."
    },
    "r1": {
      "type": "string",
      "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{3}(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$",
      "description": "Exact timestamp with three fractional digits and a known offset or Z; -00:00 is invalid."
    },
    "r2": {
      "type": "string",
      "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{3}(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
    },
    "r3": {
      "type": "string",
      "pattern": "^-?\\d+(\\.\\d+)?$",
      "description": "Decimal fiat amount to compare against."
    },
    "r4": {
      "type": "string",
      "minLength": 1,
      "description": "The value the field is compared against."
    },
    "r5": {
      "type": "string",
      "const": "fiatValue",
      "description": "Condition field."
    },
    "r6": {
      "type": "string",
      "const": "LINE",
      "description": "What the change applies to: a journal line or the transaction."
    },
    "r7": {
      "type": "string",
      "const": "transactionDate",
      "description": "Owning transaction timestamp."
    },
    "r8": {
      "type": "string",
      "maxLength": 8,
      "minLength": 1,
      "description": "Chart-of-accounts number, from list_journal_line_assignment_options (type: ledger_account)."
    },
    "r9": {
      "type": "string",
      "minLength": 1,
      "description": "Counterparty name, from list_journal_line_assignment_options (type: counterparty)."
    },
    "r10": {
      "enum": [
        "equals",
        "contains",
        "notEquals",
        "notContains"
      ],
      "type": "string",
      "description": "How the field is compared with value."
    },
    "r11": {
      "type": "array",
      "items": {
        "type": "string",
        "minLength": 1
      },
      "minItems": 1,
      "description": "The value the field is compared against."
    },
    "r12": {
      "enum": [
        "equals",
        "contains"
      ],
      "type": "string",
      "description": "How the field is compared with value."
    },
    "r13": {
      "type": "number",
      "const": 1,
      "description": "Structure version of this envelope. Always 1."
    },
    "r14": {
      "enum": [
        "equals"
      ],
      "type": "string",
      "description": "How the field is compared with value."
    }
  },
  "required": [
    "workspaceRef",
    "portfolioRef",
    "operation"
  ],
  "properties": {
    "name": {
      "type": "string",
      "minLength": 1,
      "description": "Human-readable rule name, shown in the rules list. Only for operation create, update; required for operation create."
    },
    "action": {
      "type": "object",
      "required": [
        "formatVersion",
        "actions"
      ],
      "properties": {
        "actions": {
          "type": "array",
          "items": {
            "oneOf": [
              {
                "type": "object",
                "required": [
                  "type",
                  "target",
                  "counterpartyName"
                ],
                "properties": {
                  "type": {
                    "type": "string",
                    "const": "SET_COUNTERPARTY",
                    "description": "Which change this action makes."
                  },
                  "target": {
                    "$ref": "#/$defs/r6"
                  },
                  "counterpartyName": {
                    "$ref": "#/$defs/r9"
                  }
                },
                "additionalProperties": false
              },
              {
                "type": "object",
                "required": [
                  "type",
                  "target",
                  "accountNumber"
                ],
                "properties": {
                  "type": {
                    "type": "string",
                    "const": "SET_LEDGER_ACCOUNT",
                    "description": "Which change this action makes."
                  },
                  "target": {
                    "$ref": "#/$defs/r6"
                  },
                  "accountNumber": {
                    "$ref": "#/$defs/r8"
                  }
                },
                "additionalProperties": false
              },
              {
                "type": "object",
                "required": [
                  "type",
                  "target",
                  "responsibilityCenterAssignments"
                ],
                "properties": {
                  "type": {
                    "type": "string",
                    "const": "SET_RESPONSIBILITY_CENTERS",
                    "description": "Which change this action makes."
                  },
                  "target": {
                    "$ref": "#/$defs/r6"
                  },
                  "responsibilityCenterAssignments": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "required": [
                        "responsibilityCenterTypeKey",
                        "responsibilityCenterName"
                      ],
                      "properties": {
                        "responsibilityCenterName": {
                          "type": "string",
                          "minLength": 1,
                          "description": "Responsibility center name, from list_journal_line_assignment_options (type: responsibility_center)."
                        },
                        "responsibilityCenterTypeKey": {
                          "type": "string",
                          "pattern": "^[a-z0-9]+(_[a-z0-9]+)*$",
                          "description": "Stable responsibility-center type key. It uses lowercase alphanumeric snake_case segments."
                        }
                      },
                      "additionalProperties": false
                    },
                    "minItems": 1
                  }
                },
                "additionalProperties": false
              }
            ]
          },
          "minItems": 1,
          "description": "What the rule changes when it matches. At most one action of each type."
        },
        "formatVersion": {
          "$ref": "#/$defs/r13"
        }
      },
      "description": "Only for operation create, update; required for operation create.",
      "additionalProperties": false
    },
    "enabled": {
      "anyOf": [
        {
          "type": "boolean",
          "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."
        }
      ],
      "description": "Whether the rule evaluates. A disabled rule is kept but never fires. Only for operation create, set_enabled; required for operation set_enabled."
    },
    "preview": {
      "type": "boolean",
      "description": "When true, evaluate the change and return its impact without saving it. Not for operation current."
    },
    "ruleRef": {
      "type": "string",
      "minLength": 1,
      "description": "Saved rule handle, from list_accounting_rules. Only for operation update, set_enabled, delete; required for each."
    },
    "operation": {
      "enum": [
        "create",
        "update",
        "set_enabled",
        "reorder",
        "delete",
        "current"
      ],
      "type": "string",
      "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."
    },
    "conditions": {
      "type": "object",
      "required": [
        "formatVersion",
        "all"
      ],
      "properties": {
        "all": {
          "type": "array",
          "items": {
            "oneOf": [
              {
                "type": "object",
                "required": [
                  "field",
                  "operator",
                  "value"
                ],
                "properties": {
                  "field": {
                    "type": "string",
                    "const": "fromAddressLabel",
                    "description": "Which part of the transaction this condition tests."
                  },
                  "value": {
                    "$ref": "#/$defs/r4"
                  },
                  "operator": {
                    "$ref": "#/$defs/r10"
                  }
                },
                "additionalProperties": false
              },
              {
                "type": "object",
                "required": [
                  "field",
                  "operator",
                  "value"
                ],
                "properties": {
                  "field": {
                    "type": "string",
                    "const": "toAddressLabel",
                    "description": "Which part of the transaction this condition tests."
                  },
                  "value": {
                    "$ref": "#/$defs/r4"
                  },
                  "operator": {
                    "$ref": "#/$defs/r10"
                  }
                },
                "additionalProperties": false
              },
              {
                "type": "object",
                "required": [
                  "field",
                  "operator",
                  "value"
                ],
                "properties": {
                  "field": {
                    "type": "string",
                    "const": "fromAddress",
                    "description": "Which part of the transaction this condition tests."
                  },
                  "value": {
                    "$ref": "#/$defs/r4"
                  },
                  "operator": {
                    "$ref": "#/$defs/r12"
                  }
                },
                "additionalProperties": false
              },
              {
                "type": "object",
                "required": [
                  "field",
                  "operator",
                  "value"
                ],
                "properties": {
                  "field": {
                    "type": "string",
                    "const": "toAddress",
                    "description": "Which part of the transaction this condition tests."
                  },
                  "value": {
                    "$ref": "#/$defs/r4"
                  },
                  "operator": {
                    "$ref": "#/$defs/r12"
                  }
                },
                "additionalProperties": false
              },
              {
                "type": "object",
                "required": [
                  "field",
                  "operator",
                  "value"
                ],
                "properties": {
                  "field": {
                    "type": "string",
                    "const": "direction",
                    "description": "Which part of the transaction this condition tests."
                  },
                  "value": {
                    "enum": [
                      "IN",
                      "OUT",
                      "GAS"
                    ],
                    "type": "string",
                    "description": "The value the field is compared against."
                  },
                  "operator": {
                    "enum": [
                      "equals",
                      "notEquals"
                    ],
                    "type": "string",
                    "description": "How the field is compared with value."
                  }
                },
                "additionalProperties": false
              },
              {
                "type": "object",
                "required": [
                  "field",
                  "operator",
                  "value"
                ],
                "properties": {
                  "field": {
                    "type": "string",
                    "const": "asset",
                    "description": "Which part of the transaction this condition tests."
                  },
                  "value": {
                    "$ref": "#/$defs/r11"
                  },
                  "operator": {
                    "$ref": "#/$defs/r0"
                  }
                },
                "additionalProperties": false
              },
              {
                "type": "object",
                "required": [
                  "field",
                  "operator",
                  "value"
                ],
                "properties": {
                  "field": {
                    "type": "string",
                    "const": "assetClass",
                    "description": "Which part of the transaction this condition tests."
                  },
                  "value": {
                    "type": "array",
                    "items": {
                      "enum": [
                        "ERC20",
                        "FIAT",
                        "NATIVE",
                        "REBASE_LST",
                        "INTEREST_BEARING",
                        "VALUE_ACCRUING",
                        "LP_SHARE",
                        "DEBT",
                        "REFLECT",
                        "VOTE_ESCROWED",
                        "NFT"
                      ],
                      "type": "string"
                    },
                    "minItems": 1,
                    "description": "The value the field is compared against."
                  },
                  "operator": {
                    "$ref": "#/$defs/r0"
                  }
                },
                "additionalProperties": false
              },
              {
                "type": "object",
                "required": [
                  "field",
                  "operator",
                  "value"
                ],
                "properties": {
                  "field": {
                    "type": "string",
                    "const": "stablecoin",
                    "description": "Which part of the transaction this condition tests."
                  },
                  "value": {
                    "type": "boolean",
                    "description": "The value the field is compared against."
                  },
                  "operator": {
                    "$ref": "#/$defs/r14"
                  }
                },
                "additionalProperties": false
              },
              {
                "type": "object",
                "required": [
                  "field",
                  "operator",
                  "value"
                ],
                "properties": {
                  "field": {
                    "type": "string",
                    "const": "chain",
                    "description": "Which part of the transaction this condition tests."
                  },
                  "value": {
                    "$ref": "#/$defs/r11"
                  },
                  "operator": {
                    "$ref": "#/$defs/r0"
                  }
                },
                "additionalProperties": false
              },
              {
                "type": "object",
                "required": [
                  "field",
                  "operator",
                  "value"
                ],
                "properties": {
                  "field": {
                    "type": "string",
                    "const": "operationType",
                    "description": "Which part of the transaction this condition tests."
                  },
                  "value": {
                    "type": "array",
                    "items": {
                      "enum": [
                        "DEPOSIT_FIAT",
                        "INCOME",
                        "REFUND",
                        "REBATE",
                        "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,
                    "description": "The value the field is compared against."
                  },
                  "operator": {
                    "$ref": "#/$defs/r0"
                  }
                },
                "additionalProperties": false
              },
              {
                "type": "object",
                "required": [
                  "field",
                  "operator",
                  "value"
                ],
                "properties": {
                  "field": {
                    "type": "string",
                    "const": "accountSubType",
                    "description": "Which part of the transaction this condition tests."
                  },
                  "value": {
                    "type": "array",
                    "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",
                        "OCI_REVALUATION",
                        "REVALUATION_SURPLUS"
                      ],
                      "type": "string"
                    },
                    "minItems": 1,
                    "description": "The value the field is compared against."
                  },
                  "operator": {
                    "$ref": "#/$defs/r0"
                  }
                },
                "additionalProperties": false
              },
              {
                "oneOf": [
                  {
                    "type": "object",
                    "required": [
                      "field",
                      "operator",
                      "value"
                    ],
                    "properties": {
                      "field": {
                        "$ref": "#/$defs/r5"
                      },
                      "value": {
                        "$ref": "#/$defs/r3"
                      },
                      "operator": {
                        "type": "string",
                        "const": "gt",
                        "description": "Comparison operator."
                      }
                    },
                    "additionalProperties": false
                  },
                  {
                    "type": "object",
                    "required": [
                      "field",
                      "operator",
                      "value"
                    ],
                    "properties": {
                      "field": {
                        "$ref": "#/$defs/r5"
                      },
                      "value": {
                        "$ref": "#/$defs/r3"
                      },
                      "operator": {
                        "type": "string",
                        "const": "lt",
                        "description": "Comparison operator."
                      }
                    },
                    "additionalProperties": false
                  },
                  {
                    "type": "object",
                    "required": [
                      "field",
                      "operator",
                      "value"
                    ],
                    "properties": {
                      "field": {
                        "$ref": "#/$defs/r5"
                      },
                      "value": {
                        "$ref": "#/$defs/r3"
                      },
                      "operator": {
                        "type": "string",
                        "const": "gte",
                        "description": "Comparison operator."
                      }
                    },
                    "additionalProperties": false
                  },
                  {
                    "type": "object",
                    "required": [
                      "field",
                      "operator",
                      "value"
                    ],
                    "properties": {
                      "field": {
                        "$ref": "#/$defs/r5"
                      },
                      "value": {
                        "$ref": "#/$defs/r3"
                      },
                      "operator": {
                        "type": "string",
                        "const": "lte",
                        "description": "Comparison operator."
                      }
                    },
                    "additionalProperties": false
                  },
                  {
                    "type": "object",
                    "required": [
                      "field",
                      "operator",
                      "value"
                    ],
                    "properties": {
                      "field": {
                        "$ref": "#/$defs/r5"
                      },
                      "value": {
                        "type": "array",
                        "items": false,
                        "maxItems": 2,
                        "minItems": 2,
                        "description": "Inclusive [low, high] decimal-string range.",
                        "prefixItems": [
                          {
                            "type": "string",
                            "pattern": "^-?\\d+(\\.\\d+)?$"
                          },
                          {
                            "type": "string",
                            "pattern": "^-?\\d+(\\.\\d+)?$"
                          }
                        ]
                      },
                      "operator": {
                        "type": "string",
                        "const": "between",
                        "description": "Comparison operator."
                      }
                    },
                    "additionalProperties": false
                  }
                ]
              },
              {
                "type": "object",
                "required": [
                  "field",
                  "operator",
                  "value"
                ],
                "properties": {
                  "field": {
                    "type": "string",
                    "const": "entryType",
                    "description": "Which part of the transaction this condition tests."
                  },
                  "value": {
                    "enum": [
                      "DR",
                      "CR"
                    ],
                    "type": "string",
                    "description": "The value the field is compared against."
                  },
                  "operator": {
                    "$ref": "#/$defs/r14"
                  }
                },
                "additionalProperties": false
              },
              {
                "type": "object",
                "required": [
                  "field",
                  "operator",
                  "value"
                ],
                "properties": {
                  "field": {
                    "type": "string",
                    "const": "accountType",
                    "description": "Which part of the transaction this condition tests."
                  },
                  "value": {
                    "type": "array",
                    "items": {
                      "enum": [
                        "ASSET",
                        "LIABILITY",
                        "EQUITY",
                        "INCOME",
                        "EXPENSE"
                      ],
                      "type": "string"
                    },
                    "minItems": 1,
                    "description": "The value the field is compared against."
                  },
                  "operator": {
                    "$ref": "#/$defs/r0"
                  }
                },
                "additionalProperties": false
              },
              {
                "oneOf": [
                  {
                    "type": "object",
                    "required": [
                      "field",
                      "operator",
                      "value"
                    ],
                    "properties": {
                      "field": {
                        "$ref": "#/$defs/r7"
                      },
                      "value": {
                        "$ref": "#/$defs/r1"
                      },
                      "operator": {
                        "type": "string",
                        "const": "lt",
                        "description": "Before (lt) or on or after (gte) the cutoff."
                      }
                    },
                    "additionalProperties": false
                  },
                  {
                    "type": "object",
                    "required": [
                      "field",
                      "operator",
                      "value"
                    ],
                    "properties": {
                      "field": {
                        "$ref": "#/$defs/r7"
                      },
                      "value": {
                        "$ref": "#/$defs/r1"
                      },
                      "operator": {
                        "type": "string",
                        "const": "gte",
                        "description": "Before (lt) or on or after (gte) the cutoff."
                      }
                    },
                    "additionalProperties": false
                  },
                  {
                    "type": "object",
                    "required": [
                      "field",
                      "operator",
                      "value"
                    ],
                    "properties": {
                      "field": {
                        "$ref": "#/$defs/r7"
                      },
                      "value": {
                        "type": "array",
                        "items": false,
                        "maxItems": 2,
                        "minItems": 2,
                        "description": "Inclusive [start, end] timestamps, earliest first; each has three fractional digits and a known offset or Z, never -00:00.",
                        "prefixItems": [
                          {
                            "$ref": "#/$defs/r2"
                          },
                          {
                            "$ref": "#/$defs/r2"
                          }
                        ]
                      },
                      "operator": {
                        "type": "string",
                        "const": "between",
                        "description": "Within the inclusive [start, end] range."
                      }
                    },
                    "additionalProperties": false
                  }
                ]
              },
              {
                "type": "object",
                "required": [
                  "field",
                  "operator",
                  "value"
                ],
                "properties": {
                  "field": {
                    "type": "string",
                    "const": "wallet",
                    "description": "Which part of the transaction this condition tests."
                  },
                  "value": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "required": [
                        "chainId",
                        "address"
                      ],
                      "properties": {
                        "address": {
                          "type": "string",
                          "minLength": 1,
                          "description": "Wallet address"
                        },
                        "chainId": {
                          "type": "string",
                          "minLength": 1,
                          "description": "Chain ID"
                        }
                      },
                      "additionalProperties": false
                    },
                    "minItems": 1,
                    "description": "The value the field is compared against."
                  },
                  "operator": {
                    "$ref": "#/$defs/r0"
                  }
                },
                "additionalProperties": false
              },
              {
                "type": "object",
                "required": [
                  "operator",
                  "field",
                  "value"
                ],
                "properties": {
                  "field": {
                    "type": "string",
                    "const": "accountNumber",
                    "description": "Which part of the transaction this condition tests."
                  },
                  "value": {
                    "type": "array",
                    "items": {
                      "$ref": "#/$defs/r8"
                    },
                    "minItems": 1,
                    "description": "The value the field is compared against."
                  },
                  "operator": {
                    "$ref": "#/$defs/r0"
                  }
                },
                "additionalProperties": false
              },
              {
                "type": "object",
                "required": [
                  "field",
                  "operator",
                  "value"
                ],
                "properties": {
                  "field": {
                    "type": "string",
                    "const": "counterparty",
                    "description": "Which part of the transaction this condition tests."
                  },
                  "value": {
                    "type": "array",
                    "items": {
                      "$ref": "#/$defs/r9"
                    },
                    "minItems": 1,
                    "description": "The value the field is compared against."
                  },
                  "operator": {
                    "$ref": "#/$defs/r0"
                  }
                },
                "additionalProperties": false
              }
            ]
          },
          "minItems": 1,
          "description": "Conditions that must all match for the rule to fire. At least one is required."
        },
        "formatVersion": {
          "$ref": "#/$defs/r13"
        }
      },
      "description": "Only for operation create, update; required for operation create.",
      "additionalProperties": false
    },
    "maxAffected": {
      "type": "integer",
      "default": 10,
      "maximum": 25,
      "minimum": 1,
      "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."
    },
    "portfolioRef": {
      "type": "string",
      "minLength": 1,
      "description": "Portfolio name or slug inside that workspace. Call list_portfolios to resolve it."
    },
    "workspaceRef": {
      "type": "string",
      "minLength": 1,
      "description": "Workspace name or slug. Call list_workspaces to resolve it."
    },
    "orderedRuleRefs": {
      "type": "array",
      "items": {
        "type": "string",
        "minLength": 1,
        "description": "Saved rule handle, from list_accounting_rules."
      },
      "minItems": 1,
      "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."
    }
  },
  "additionalProperties": false
}
edit_accounting_rules output schema
{
  "type": "object",
  "$defs": {
    "r0": {
      "oneOf": [
        {
          "type": "object",
          "required": [
            "kind",
            "ruleRef",
            "version"
          ],
          "properties": {
            "kind": {
              "type": "string",
              "const": "saved"
            },
            "ruleRef": {
              "type": "string",
              "minLength": 1
            },
            "version": {
              "type": "integer",
              "maximum": 9007199254740991,
              "minimum": 1
            }
          },
          "additionalProperties": false
        },
        {
          "type": "object",
          "required": [
            "kind",
            "label",
            "version"
          ],
          "properties": {
            "kind": {
              "type": "string",
              "const": "draft"
            },
            "label": {
              "type": "string",
              "const": "draft"
            },
            "version": {
              "type": "number",
              "const": 1
            }
          },
          "additionalProperties": false
        }
      ]
    },
    "r1": {
      "oneOf": [
        {
          "type": "object",
          "required": [
            "kind"
          ],
          "properties": {
            "kind": {
              "enum": [
                "account",
                "counterparty"
              ],
              "type": "string"
            }
          },
          "additionalProperties": false
        },
        {
          "type": "object",
          "required": [
            "kind",
            "responsibilityCenterTypeKey"
          ],
          "properties": {
            "kind": {
              "type": "string",
              "const": "responsibilityCenter"
            },
            "responsibilityCenterTypeKey": {
              "type": "string",
              "pattern": "^[a-z0-9]+(_[a-z0-9]+)*$"
            }
          },
          "additionalProperties": false
        }
      ]
    },
    "r2": {
      "type": "object",
      "required": [
        "responsibilityCenterName",
        "percentageBps"
      ],
      "properties": {
        "percentageBps": {
          "type": "integer",
          "maximum": 9007199254740991,
          "minimum": 1
        },
        "responsibilityCenterName": {
          "type": "string",
          "minLength": 1
        }
      },
      "additionalProperties": false
    },
    "r3": {
      "enum": [
        "MANUAL",
        "MANUAL_CLEARED",
        "PAYMENT_LINK",
        "SYSTEM_RULE"
      ],
      "type": "string"
    },
    "r4": {
      "type": "string",
      "minLength": 1
    },
    "r5": {
      "type": "integer",
      "maximum": 9007199254740991,
      "minimum": 1
    }
  },
  "anyOf": [
    {
      "type": "object",
      "required": [
        "mode"
      ],
      "properties": {
        "mode": {
          "$ref": "#/properties/mode"
        },
        "jobId": {
          "$ref": "#/properties/jobId"
        },
        "result": {
          "$ref": "#/properties/result"
        },
        "status": {
          "$ref": "#/properties/status"
        }
      },
      "additionalProperties": false
    },
    {
      "type": "object",
      "required": [
        "detail",
        "scannedCount",
        "candidateCount",
        "affectedCount",
        "changes"
      ],
      "properties": {
        "detail": {
          "type": "string",
          "const": "compact"
        },
        "changes": {
          "$ref": "#/properties/changes"
        },
        "truncatedBy": {
          "$ref": "#/properties/truncatedBy"
        },
        "scannedCount": {
          "$ref": "#/properties/scannedCount"
        },
        "affectedCount": {
          "$ref": "#/properties/affectedCount"
        },
        "candidateCount": {
          "$ref": "#/properties/candidateCount"
        },
        "lastAffectedAt": {
          "$ref": "#/properties/lastAffectedAt"
        },
        "firstAffectedAt": {
          "$ref": "#/properties/firstAffectedAt"
        },
        "skippedRuleEvidence": {
          "$ref": "#/properties/skippedRuleEvidence"
        }
      },
      "additionalProperties": false
    }
  ],
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "properties": {
    "mode": {
      "enum": [
        "sync",
        "async"
      ],
      "type": "string"
    },
    "jobId": {
      "type": "string"
    },
    "detail": {
      "type": "string",
      "const": "compact"
    },
    "result": {
      "oneOf": [
        {
          "type": "object",
          "required": [
            "success"
          ],
          "properties": {
            "data": {},
            "success": {
              "type": "boolean",
              "const": true
            }
          },
          "additionalProperties": false
        },
        {
          "type": "object",
          "required": [
            "success",
            "error"
          ],
          "properties": {
            "error": {
              "type": "object",
              "required": [
                "name",
                "message",
                "body"
              ],
              "properties": {
                "body": {
                  "anyOf": [
                    {
                      "type": "object",
                      "required": [
                        "usageType",
                        "currentUsage",
                        "limit"
                      ],
                      "properties": {
                        "limit": {
                          "type": "number"
                        },
                        "usageType": {
                          "type": "string"
                        },
                        "currentUsage": {
                          "type": "number"
                        }
                      },
                      "additionalProperties": false
                    },
                    {}
                  ]
                },
                "name": {
                  "type": "string"
                },
                "message": {
                  "type": "string"
                }
              },
              "additionalProperties": false
            },
            "success": {
              "type": "boolean",
              "const": false
            }
          },
          "additionalProperties": false
        }
      ]
    },
    "status": {
      "type": "string",
      "const": "queued"
    },
    "changes": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "portfolioTransactionId",
          "timestamp",
          "lines"
        ],
        "properties": {
          "lines": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "lineNumber",
                "responsibilityCenters",
                "matchedButLost"
              ],
              "properties": {
                "account": {
                  "type": "object",
                  "required": [
                    "from",
                    "to"
                  ],
                  "properties": {
                    "to": {
                      "type": "string",
                      "maxLength": 8,
                      "minLength": 1
                    },
                    "from": {
                      "type": "string",
                      "maxLength": 8,
                      "minLength": 1
                    },
                    "byRule": {
                      "$ref": "#/$defs/r0"
                    },
                    "lockedBy": {
                      "$ref": "#/$defs/r3"
                    }
                  },
                  "additionalProperties": false
                },
                "lineNumber": {
                  "$ref": "#/$defs/r5"
                },
                "counterparty": {
                  "type": "object",
                  "properties": {
                    "to": {
                      "$ref": "#/$defs/r4"
                    },
                    "from": {
                      "$ref": "#/$defs/r4"
                    },
                    "byRule": {
                      "$ref": "#/$defs/r0"
                    },
                    "lockedBy": {
                      "$ref": "#/$defs/r3"
                    }
                  },
                  "additionalProperties": false
                },
                "matchedButLost": {
                  "type": "array",
                  "items": {
                    "oneOf": [
                      {
                        "type": "object",
                        "required": [
                          "kind",
                          "ruleRef",
                          "version",
                          "output"
                        ],
                        "properties": {
                          "kind": {
                            "type": "string",
                            "const": "saved"
                          },
                          "output": {
                            "$ref": "#/$defs/r1"
                          },
                          "ruleRef": {
                            "$ref": "#/$defs/r4"
                          },
                          "version": {
                            "$ref": "#/$defs/r5"
                          }
                        },
                        "additionalProperties": false
                      },
                      {
                        "type": "object",
                        "required": [
                          "kind",
                          "label",
                          "version",
                          "output"
                        ],
                        "properties": {
                          "kind": {
                            "type": "string",
                            "const": "draft"
                          },
                          "label": {
                            "type": "string",
                            "const": "draft"
                          },
                          "output": {
                            "$ref": "#/$defs/r1"
                          },
                          "version": {
                            "type": "number",
                            "const": 1
                          }
                        },
                        "additionalProperties": false
                      }
                    ]
                  }
                },
                "assignmentChanged": {
                  "type": "boolean"
                },
                "responsibilityCenters": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "required": [
                      "responsibilityCenterTypeKey"
                    ],
                    "properties": {
                      "to": {
                        "$ref": "#/$defs/r2"
                      },
                      "from": {
                        "$ref": "#/$defs/r2"
                      },
                      "byRule": {
                        "$ref": "#/$defs/r0"
                      },
                      "lockedBy": {
                        "$ref": "#/$defs/r3"
                      },
                      "responsibilityCenterTypeKey": {
                        "type": "string",
                        "pattern": "^[a-z0-9]+(_[a-z0-9]+)*$"
                      }
                    },
                    "additionalProperties": false
                  }
                }
              },
              "additionalProperties": false
            },
            "minItems": 1
          },
          "timestamp": {
            "type": "string",
            "format": "date-time"
          },
          "portfolioTransactionId": {
            "$ref": "#/$defs/r4"
          },
          "ruleEvaluationFailures": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "rule"
              ],
              "properties": {
                "rule": {
                  "$ref": "#/$defs/r0"
                },
                "rejection": {
                  "type": "object",
                  "required": [
                    "code",
                    "message"
                  ],
                  "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": {
                      "$ref": "#/$defs/r4"
                    }
                  },
                  "additionalProperties": false
                }
              },
              "additionalProperties": false
            }
          }
        },
        "additionalProperties": false
      },
      "maxItems": 100
    },
    "truncatedBy": {
      "enum": [
        "affected",
        "budget",
        "details",
        "scanned"
      ],
      "type": "string"
    },
    "scannedCount": {
      "type": "integer",
      "maximum": 9007199254740991,
      "minimum": 0
    },
    "affectedCount": {
      "type": "integer",
      "maximum": 100,
      "minimum": 0
    },
    "candidateCount": {
      "type": "integer",
      "maximum": 9007199254740991,
      "minimum": 0
    },
    "lastAffectedAt": {
      "type": "string",
      "format": "date-time"
    },
    "firstAffectedAt": {
      "type": "string",
      "format": "date-time"
    },
    "skippedRuleEvidence": {
      "type": "array",
      "items": {
        "$ref": "#/properties/changes/items"
      },
      "maxItems": 2000
    }
  },
  "additionalProperties": false
}
edit_accounting_rules annotations
{
  "title": "Edit Accounting Rules",
  "readOnlyHint": false,
  "openWorldHint": true,
  "idempotentHint": false,
  "destructiveHint": true
}
apply_accounting_rules — Apply Accounting Rules
Advertised by the server during the last successful anonymous check.
Advertised destructiveOpen-world

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.

apply_accounting_rules input schema
{
  "type": "object",
  "required": [
    "workspaceRef",
    "portfolioRef"
  ],
  "properties": {
    "portfolioRef": {
      "type": "string",
      "description": "Portfolio exact name or slug"
    },
    "workspaceRef": {
      "type": "string",
      "description": "Workspace exact name or slug"
    }
  },
  "additionalProperties": false
}
apply_accounting_rules output schema
{
  "type": "object",
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "required": [
    "status",
    "requestId"
  ],
  "properties": {
    "status": {
      "type": "string",
      "const": "queued"
    },
    "requestId": {
      "type": "string"
    }
  },
  "additionalProperties": false
}
apply_accounting_rules annotations
{
  "title": "Apply Accounting Rules",
  "readOnlyHint": false,
  "openWorldHint": true,
  "idempotentHint": false,
  "destructiveHint": true
}
list_wallets — List Wallets
Advertised by the server during the last successful anonymous check.
Advertised read-only

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.

list_wallets input schema
{
  "type": "object",
  "required": [
    "workspaceRef",
    "portfolioRef"
  ],
  "properties": {
    "page": {
      "type": "integer",
      "description": "Page number, starting at 1"
    },
    "limit": {
      "anyOf": [
        {
          "type": "integer",
          "maximum": 100,
          "minimum": 1,
          "description": "Maximum items to return, maximum 100. Preferred MCP pagination field."
        },
        {
          "type": "string",
          "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)$",
          "description": "Maximum items to return, maximum 100. Preferred MCP pagination field. Numeric strings are accepted for MCP client compatibility."
        }
      ],
      "description": "Maximum items to return, maximum 100. Preferred MCP pagination field."
    },
    "chainId": {
      "type": "string",
      "description": "Optional chain filter, or with walletAddress"
    },
    "pageSize": {
      "anyOf": [
        {
          "type": "integer",
          "maximum": 100,
          "minimum": 1,
          "description": "Deprecated alias for limit, maximum 100. Prefer limit for new MCP calls."
        },
        {
          "type": "string",
          "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)$",
          "description": "Deprecated alias for limit, maximum 100. Prefer limit for new MCP calls. Numeric strings are accepted for MCP client compatibility."
        }
      ],
      "description": "Deprecated alias for limit, maximum 100. Prefer limit for new MCP calls."
    },
    "portfolioRef": {
      "type": "string",
      "description": "Portfolio exact name or slug"
    },
    "workspaceRef": {
      "type": "string",
      "description": "Workspace exact name or slug"
    },
    "walletAddress": {
      "type": "string",
      "description": "Look up one wallet; requires chainId"
    }
  },
  "additionalProperties": false
}
list_wallets output schema
{
  "type": "object",
  "$defs": {
    "WalletDetailsResponseDto": {
      "type": "object",
      "required": [
        "chainId",
        "address",
        "createdAt",
        "syncMessages",
        "syncStatus",
        "transactionCount"
      ],
      "properties": {
        "name": {
          "type": "string"
        },
        "address": {
          "type": "string"
        },
        "chainId": {
          "type": "string"
        },
        "createdAt": {
          "type": "string",
          "format": "date-time"
        },
        "lastSyncAt": {
          "type": "string",
          "format": "date-time"
        },
        "syncStatus": {
          "enum": [
            "pending",
            "syncing",
            "synced",
            "failed"
          ],
          "type": "string"
        },
        "syncMessages": {
          "type": "array",
          "items": {
            "oneOf": [
              {
                "type": "object",
                "required": [
                  "code",
                  "message",
                  "severity",
                  "details"
                ],
                "properties": {
                  "code": {
                    "type": "string",
                    "const": "EXCHANGE_RECONNECT_REQUIRED"
                  },
                  "details": {
                    "type": "object",
                    "required": [
                      "provider",
                      "reconnectRequired",
                      "errorType"
                    ],
                    "properties": {
                      "provider": {
                        "type": "string",
                        "minLength": 1
                      },
                      "errorType": {
                        "type": "string",
                        "const": "ExternalServiceAuthenticationError"
                      },
                      "reconnectRequired": {
                        "type": "boolean",
                        "const": true
                      }
                    },
                    "additionalProperties": false
                  },
                  "message": {
                    "type": "string",
                    "minLength": 1
                  },
                  "severity": {
                    "enum": [
                      "ERROR",
                      "WARN"
                    ],
                    "type": "string",
                    "default": "ERROR"
                  }
                },
                "additionalProperties": false
              },
              {
                "type": "object",
                "required": [
                  "code",
                  "message",
                  "severity",
                  "details"
                ],
                "properties": {
                  "code": {
                    "type": "string",
                    "const": "SYNC_PROCESSING_FAILED"
                  },
                  "details": {
                    "type": "object",
                    "required": [
                      "retryable",
                      "errorType"
                    ],
                    "properties": {
                      "errorType": {
                        "type": "string",
                        "const": "SyncProcessingError"
                      },
                      "retryable": {
                        "type": "boolean",
                        "const": true
                      }
                    },
                    "additionalProperties": false
                  },
                  "message": {
                    "type": "string",
                    "minLength": 1
                  },
                  "severity": {
                    "enum": [
                      "ERROR",
                      "WARN"
                    ],
                    "type": "string",
                    "default": "ERROR"
                  }
                },
                "additionalProperties": false
              },
              {
                "type": "object",
                "required": [
                  "code",
                  "message",
                  "severity",
                  "details"
                ],
                "properties": {
                  "code": {
                    "enum": [
                      "SYNC_WARNING",
                      "TRANSACTION_LIMIT_REACHED"
                    ],
                    "type": "string"
                  },
                  "details": {
                    "type": "object",
                    "required": [
                      "errorType"
                    ],
                    "properties": {
                      "errorType": {
                        "type": "string",
                        "const": "SyncWarning"
                      }
                    },
                    "additionalProperties": false
                  },
                  "message": {
                    "type": "string",
                    "minLength": 1
                  },
                  "severity": {
                    "enum": [
                      "ERROR",
                      "WARN"
                    ],
                    "type": "string",
                    "default": "ERROR"
                  }
                },
                "additionalProperties": false
              }
            ]
          }
        },
        "transactionCount": {
          "type": "integer",
          "maximum": 9007199254740991,
          "minimum": -9007199254740991
        }
      },
      "additionalProperties": false
    }
  },
  "anyOf": [
    {
      "type": "object",
      "required": [
        "data",
        "pagination",
        "resultType"
      ],
      "properties": {
        "data": {
          "$ref": "#/properties/data"
        },
        "pagination": {
          "$ref": "#/properties/pagination"
        },
        "resultType": {
          "type": "string",
          "const": "walletList"
        }
      },
      "additionalProperties": false
    },
    {
      "type": "object",
      "required": [
        "chainId",
        "address",
        "createdAt",
        "syncMessages",
        "syncStatus",
        "transactionCount",
        "resultType"
      ],
      "properties": {
        "name": {
          "$ref": "#/properties/name"
        },
        "address": {
          "$ref": "#/properties/address"
        },
        "chainId": {
          "$ref": "#/properties/chainId"
        },
        "createdAt": {
          "$ref": "#/properties/createdAt"
        },
        "lastSyncAt": {
          "$ref": "#/properties/lastSyncAt"
        },
        "resultType": {
          "type": "string",
          "const": "wallet"
        },
        "syncStatus": {
          "$ref": "#/properties/syncStatus"
        },
        "syncMessages": {
          "$ref": "#/properties/syncMessages"
        },
        "transactionCount": {
          "$ref": "#/properties/transactionCount"
        }
      },
      "additionalProperties": false
    }
  ],
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "required": [
    "resultType"
  ],
  "properties": {
    "data": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/WalletDetailsResponseDto"
      }
    },
    "name": {
      "type": "string"
    },
    "address": {
      "type": "string"
    },
    "chainId": {
      "type": "string"
    },
    "createdAt": {
      "type": "string",
      "format": "date-time"
    },
    "lastSyncAt": {
      "type": "string",
      "format": "date-time"
    },
    "pagination": {
      "type": "object",
      "required": [
        "page",
        "pageSize",
        "totalCount",
        "totalPages"
      ],
      "properties": {
        "page": {
          "type": "integer",
          "maximum": 9007199254740991,
          "minimum": -9007199254740991
        },
        "pageSize": {
          "type": "integer",
          "maximum": 9007199254740991,
          "minimum": -9007199254740991
        },
        "totalCount": {
          "type": "integer",
          "maximum": 9007199254740991,
          "minimum": -9007199254740991
        },
        "totalPages": {
          "type": "integer",
          "maximum": 9007199254740991,
          "minimum": -9007199254740991
        }
      },
      "additionalProperties": false
    },
    "resultType": {
      "enum": [
        "walletList",
        "wallet"
      ],
      "type": "string"
    },
    "syncStatus": {
      "enum": [
        "pending",
        "syncing",
        "synced",
        "failed"
      ],
      "type": "string"
    },
    "syncMessages": {
      "type": "array",
      "items": {
        "oneOf": [
          {
            "type": "object",
            "required": [
              "code",
              "message",
              "severity",
              "details"
            ],
            "properties": {
              "code": {
                "type": "string",
                "const": "EXCHANGE_RECONNECT_REQUIRED"
              },
              "details": {
                "type": "object",
                "required": [
                  "provider",
                  "reconnectRequired",
                  "errorType"
                ],
                "properties": {
                  "provider": {
                    "type": "string",
                    "minLength": 1
                  },
                  "errorType": {
                    "type": "string",
                    "const": "ExternalServiceAuthenticationError"
                  },
                  "reconnectRequired": {
                    "type": "boolean",
                    "const": true
                  }
                },
                "additionalProperties": false
              },
              "message": {
                "type": "string",
                "minLength": 1
              },
              "severity": {
                "enum": [
                  "ERROR",
                  "WARN"
                ],
                "type": "string",
                "default": "ERROR"
              }
            },
            "additionalProperties": false
          },
          {
            "type": "object",
            "required": [
              "code",
              "message",
              "severity",
              "details"
            ],
            "properties": {
              "code": {
                "type": "string",
                "const": "SYNC_PROCESSING_FAILED"
              },
              "details": {
                "type": "object",
                "required": [
                  "retryable",
                  "errorType"
                ],
                "properties": {
                  "errorType": {
                    "type": "string",
                    "const": "SyncProcessingError"
                  },
                  "retryable": {
                    "type": "boolean",
                    "const": true
                  }
                },
                "additionalProperties": false
              },
              "message": {
                "type": "string",
                "minLength": 1
              },
              "severity": {
                "enum": [
                  "ERROR",
                  "WARN"
                ],
                "type": "string",
                "default": "ERROR"
              }
            },
            "additionalProperties": false
          },
          {
            "type": "object",
            "required": [
              "code",
              "message",
              "severity",
              "details"
            ],
            "properties": {
              "code": {
                "enum": [
                  "SYNC_WARNING",
                  "TRANSACTION_LIMIT_REACHED"
                ],
                "type": "string"
              },
              "details": {
                "type": "object",
                "required": [
                  "errorType"
                ],
                "properties": {
                  "errorType": {
                    "type": "string",
                    "const": "SyncWarning"
                  }
                },
                "additionalProperties": false
              },
              "message": {
                "type": "string",
                "minLength": 1
              },
              "severity": {
                "enum": [
                  "ERROR",
                  "WARN"
                ],
                "type": "string",
                "default": "ERROR"
              }
            },
            "additionalProperties": false
          }
        ]
      }
    },
    "transactionCount": {
      "type": "integer",
      "maximum": 9007199254740991,
      "minimum": -9007199254740991
    }
  },
  "additionalProperties": false
}
list_wallets annotations
{
  "title": "List Wallets",
  "readOnlyHint": true,
  "openWorldHint": false,
  "idempotentHint": true,
  "destructiveHint": false
}
list_journal_line_assignment_options — List Journal Line Assignment Options
Advertised by the server during the last successful anonymous check.
Advertised read-only

Find ledger accounts, saved counterparties, or responsibility centers (departments or projects) assignable to an accounting entry line.

list_journal_line_assignment_options input schema
{
  "type": "object",
  "required": [
    "workspaceRef",
    "portfolioRef",
    "type"
  ],
  "properties": {
    "page": {
      "type": "integer",
      "maximum": 9007199254740991,
      "minimum": 1,
      "description": "Page number, starting at 1 Only for type counterparty."
    },
    "type": {
      "enum": [
        "ledger_account",
        "counterparty",
        "responsibility_center"
      ],
      "type": "string",
      "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."
    },
    "limit": {
      "type": "integer",
      "maximum": 100,
      "minimum": 1,
      "description": "Maximum items to return, maximum 100. Preferred MCP pagination field. Only for type counterparty."
    },
    "search": {
      "type": "string",
      "minLength": 1,
      "description": "Filter by name (also matches account number for ledger accounts)"
    },
    "pageSize": {
      "type": "integer",
      "maximum": 100,
      "minimum": 1,
      "description": "Deprecated alias for limit, maximum 100. Prefer limit for new MCP calls. Only for type counterparty."
    },
    "portfolioRef": {
      "type": "string",
      "minLength": 1,
      "description": "Portfolio name or slug inside that workspace. Call list_portfolios to resolve it."
    },
    "workspaceRef": {
      "type": "string",
      "minLength": 1,
      "description": "Workspace name or slug. Call list_workspaces to resolve it."
    }
  },
  "additionalProperties": false
}
list_journal_line_assignment_options output schema
{
  "type": "object",
  "oneOf": [
    {
      "type": "object",
      "required": [
        "type",
        "accounts"
      ],
      "properties": {
        "type": {
          "type": "string",
          "const": "ledger_account"
        },
        "accounts": {
          "$ref": "#/properties/accounts"
        }
      },
      "additionalProperties": false
    },
    {
      "type": "object",
      "required": [
        "type",
        "counterparties",
        "total",
        "hasMore"
      ],
      "properties": {
        "type": {
          "type": "string",
          "const": "counterparty"
        },
        "total": {
          "$ref": "#/properties/total"
        },
        "hasMore": {
          "$ref": "#/properties/hasMore"
        },
        "counterparties": {
          "$ref": "#/properties/counterparties"
        }
      },
      "additionalProperties": false
    },
    {
      "type": "object",
      "required": [
        "type",
        "responsibilityCenters"
      ],
      "properties": {
        "type": {
          "type": "string",
          "const": "responsibility_center"
        },
        "responsibilityCenters": {
          "$ref": "#/properties/responsibilityCenters"
        }
      },
      "additionalProperties": false
    }
  ],
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "required": [
    "type"
  ],
  "properties": {
    "type": {
      "enum": [
        "ledger_account",
        "counterparty",
        "responsibility_center"
      ],
      "type": "string"
    },
    "total": {
      "type": "number"
    },
    "hasMore": {
      "type": "boolean"
    },
    "accounts": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "accountNumber",
          "name",
          "accountType",
          "currency",
          "isActive"
        ],
        "properties": {
          "name": {
            "type": "string"
          },
          "subType": {
            "type": "string"
          },
          "currency": {
            "type": "string"
          },
          "isActive": {
            "type": "boolean"
          },
          "accountType": {
            "type": "string"
          },
          "accountNumber": {
            "type": "string"
          }
        },
        "additionalProperties": false
      }
    },
    "counterparties": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "name",
          "type",
          "isActive"
        ],
        "properties": {
          "name": {
            "type": "string"
          },
          "type": {
            "type": "string"
          },
          "isActive": {
            "type": "boolean"
          }
        },
        "additionalProperties": false
      }
    },
    "responsibilityCenters": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "name"
        ],
        "properties": {
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "responsibilityCenterType": {
            "type": "object",
            "required": [
              "key",
              "name",
              "kind"
            ],
            "properties": {
              "key": {
                "type": "string"
              },
              "kind": {
                "enum": [
                  "COST",
                  "REVENUE",
                  "PROFIT",
                  "INVESTMENT"
                ],
                "type": "string"
              },
              "name": {
                "type": "string"
              }
            },
            "additionalProperties": false
          }
        },
        "additionalProperties": false
      }
    }
  },
  "additionalProperties": false
}
list_journal_line_assignment_options annotations
{
  "title": "List Journal Line Assignment Options",
  "readOnlyHint": true,
  "openWorldHint": false,
  "idempotentHint": true,
  "destructiveHint": false
}
edit_transaction — Edit Transaction
Advertised by the server during the last successful anonymous check.
Open-world

Create manual source transactions (signed wallet movements; duplicate hashes refused; accounting asynchronous), or change one accounting transaction: memo/tags/type, journal lines or unit fair market value. Read line numbers/list_journal_line_assignment_options first. Track requestIds or waitForCompletion for fields/FMV edits.

edit_transaction input schema
{
  "type": "object",
  "$defs": {
    "RawWalletTransactionImportRequestDto__schema0": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "number"
        },
        {
          "type": "boolean"
        },
        {
          "type": "null"
        },
        {
          "type": "array",
          "items": {
            "$ref": "#/$defs/RawWalletTransactionImportRequestDto__schema0"
          }
        },
        {
          "type": "object",
          "propertyNames": {
            "type": "string"
          },
          "additionalProperties": {
            "$ref": "#/$defs/RawWalletTransactionImportRequestDto__schema0"
          }
        }
      ]
    }
  },
  "required": [
    "workspaceRef",
    "portfolioRef",
    "operation"
  ],
  "properties": {
    "memo": {
      "type": [
        "string",
        "null"
      ],
      "description": "New memo; pass null to clear it Only for operation update_fields."
    },
    "tags": {
      "type": "array",
      "items": {
        "type": "string",
        "minLength": 1
      },
      "description": "Replace ALL tags. Only for operation update_fields."
    },
    "reason": {
      "type": "string",
      "minLength": 1,
      "description": "Immutable root reason whose nonempty bytes are preserved exactly; use ptx:<uuid> for transaction references Only for operation set_fmv_override."
    },
    "wallet": {
      "type": "object",
      "required": [
        "chainId",
        "walletAddress"
      ],
      "properties": {
        "chainId": {
          "type": "string",
          "minLength": 1,
          "description": "Chain ID"
        },
        "walletAddress": {
          "type": "string",
          "minLength": 1,
          "description": "Wallet address"
        }
      },
      "description": "Only for operation create_manual; required for each.",
      "additionalProperties": false
    },
    "assetId": {
      "type": "string",
      "minLength": 1,
      "description": "Asset ID from read tools (e.g. eth_1). Only for operation set_fmv_override; required for each."
    },
    "subType": {
      "type": "string",
      "minLength": 1,
      "description": "New operation sub-type (requires operationType) Only for operation update_fields."
    },
    "operation": {
      "enum": [
        "create_manual",
        "update_fields",
        "update_journal_line",
        "set_fmv_override"
      ],
      "type": "string",
      "description": "create_manual: Create manual sources. update_fields: Edit memo/tags/type. update_journal_line: Assign journal line. set_fmv_override: Override unit FMV."
    },
    "timeoutMs": {
      "type": "integer",
      "maximum": 60000,
      "minimum": 1000,
      "description": "Wait ms; default 30000. Only for operation update_fields, set_fmv_override."
    },
    "lineNumber": {
      "type": "integer",
      "maximum": 9007199254740991,
      "minimum": 1,
      "description": "Journal entry line number (1-based) Only for operation update_journal_line; required for each."
    },
    "quoteSource": {
      "type": "string",
      "minLength": 1,
      "description": "Price source/reason. Only for operation set_fmv_override."
    },
    "portfolioRef": {
      "type": "string",
      "minLength": 1,
      "description": "Portfolio name or slug inside that workspace. Call list_portfolios to resolve it."
    },
    "transactions": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "timestamp",
          "transfers"
        ],
        "properties": {
          "memo": {
            "type": "string",
            "description": "Memo."
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1
            },
            "maxItems": 50,
            "description": "Tags."
          },
          "source": {
            "type": "string",
            "minLength": 1,
            "description": "Source."
          },
          "txHash": {
            "type": "string",
            "minLength": 1,
            "description": "Required blockchain hash; else generated."
          },
          "details": {
            "$ref": "#/$defs/RawWalletTransactionImportRequestDto__schema0",
            "default": {},
            "description": "Source-specific raw JSON details"
          },
          "timestamp": {
            "anyOf": [
              {
                "type": "string",
                "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",
                "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(?:Z))$"
              }
            ],
            "description": "ISO timestamp."
          },
          "transfers": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "chainId",
                "tokenAddress",
                "type",
                "value",
                "fromAddress",
                "toAddress"
              ],
              "properties": {
                "type": {
                  "enum": [
                    "IN",
                    "OUT",
                    "GAS"
                  ],
                  "type": "string",
                  "description": "Transfer direction/type"
                },
                "value": {
                  "type": "string",
                  "pattern": "^-?\\d+(\\.\\d+)?$",
                  "description": "Transfer quantity as a decimal string"
                },
                "chainId": {
                  "type": "string",
                  "minLength": 1,
                  "description": "Chain ID for the token identity"
                },
                "toAddress": {
                  "type": "string",
                  "minLength": 1,
                  "description": "Recipient address"
                },
                "valueQuote": {
                  "type": "string",
                  "pattern": "^-?\\d+(\\.\\d+)?$",
                  "description": "Transfer value in the quote currency"
                },
                "fromAddress": {
                  "type": "string",
                  "minLength": 1,
                  "description": "Sender address"
                },
                "quoteSource": {
                  "type": "string",
                  "minLength": 1,
                  "description": "Quote source"
                },
                "tokenAddress": {
                  "type": "string",
                  "minLength": 1,
                  "description": "Token contract or asset address"
                },
                "quoteCurrency": {
                  "type": "string",
                  "minLength": 1,
                  "description": "Quote currency"
                },
                "toAddressLabel": {
                  "type": "string",
                  "minLength": 1,
                  "description": "Recipient label"
                },
                "fromAddressLabel": {
                  "type": "string",
                  "minLength": 1,
                  "description": "Sender label"
                }
              },
              "additionalProperties": false
            },
            "minItems": 1,
            "description": "Transfers."
          },
          "blockHeight": {
            "type": "string",
            "pattern": "^\\d+$",
            "description": "Required for blockchain; omit for exchange/bank."
          }
        },
        "additionalProperties": false
      },
      "maxItems": 500,
      "minItems": 1,
      "description": "valueQuote: signed TOTAL FMV, not unit price Only for operation create_manual; required for each."
    },
    "workspaceRef": {
      "type": "string",
      "minLength": 1,
      "description": "Workspace name or slug. Call list_workspaces to resolve it."
    },
    "accountNumber": {
      "type": "string",
      "minLength": 1,
      "description": "Account number from list_journal_line_assignment_options (ledger_account). Only for operation update_journal_line."
    },
    "newValueQuote": {
      "type": "string",
      "pattern": "^-?\\d+(\\.\\d+)?$",
      "description": "Exact unit price in base currency. Only for operation set_fmv_override; required for each."
    },
    "operationType": {
      "enum": [
        "DEPOSIT_FIAT",
        "INCOME",
        "REFUND",
        "REBATE",
        "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",
      "description": "New accounting operation type Only for operation update_fields."
    },
    "quoteCurrency": {
      "type": "string",
      "minLength": 1,
      "description": "Currency; default base currency. Only for operation set_fmv_override."
    },
    "transactionId": {
      "type": "string",
      "minLength": 1,
      "description": "Portfolio transaction ID Only for operation update_fields, update_journal_line, set_fmv_override; required for each."
    },
    "pollIntervalMs": {
      "type": "integer",
      "maximum": 5000,
      "minimum": 100,
      "description": "Poll ms; default 500. Only for operation update_fields, set_fmv_override."
    },
    "counterpartyName": {
      "anyOf": [
        {
          "type": "string",
          "minLength": 1
        },
        {
          "type": "null"
        }
      ],
      "description": "Counterparty name to assign; pass null to unset Only for operation update_journal_line."
    },
    "waitForCompletion": {
      "type": "boolean",
      "description": "Wait for final state. Only for operation update_fields, set_fmv_override."
    },
    "responsibilityCenterAssignments": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "responsibilityCenterTypeKey",
          "responsibilityCenterName"
        ],
        "properties": {
          "responsibilityCenterName": {
            "type": "string",
            "minLength": 1,
            "description": "Center name."
          },
          "responsibilityCenterTypeKey": {
            "type": "string",
            "minLength": 1,
            "description": "Dimension key, e.g. primary."
          }
        },
        "additionalProperties": false
      },
      "description": "Replace assignments, one per dimension; [] clears all. Keys/names: list_journal_line_assignment_options (responsibility_center). Only for operation update_journal_line."
    }
  },
  "additionalProperties": false
}
edit_transaction output schema
{
  "type": "object",
  "anyOf": [
    {
      "type": "object",
      "required": [
        "created",
        "replaced",
        "skipped",
        "failed",
        "operation"
      ],
      "properties": {
        "failed": {
          "$ref": "#/properties/failed"
        },
        "created": {
          "$ref": "#/properties/created"
        },
        "skipped": {
          "$ref": "#/properties/skipped"
        },
        "replaced": {
          "$ref": "#/properties/replaced"
        },
        "operation": {
          "type": "string",
          "const": "create_manual"
        }
      },
      "additionalProperties": false
    },
    {
      "type": "object",
      "required": [
        "operation",
        "transactionId",
        "results"
      ],
      "properties": {
        "results": {
          "$ref": "#/properties/results"
        },
        "requests": {
          "$ref": "#/properties/requests"
        },
        "statuses": {
          "$ref": "#/properties/statuses"
        },
        "completed": {
          "$ref": "#/properties/completed"
        },
        "operation": {
          "type": "string",
          "const": "update_fields"
        },
        "finalState": {
          "$ref": "#/properties/finalState"
        },
        "transactionId": {
          "$ref": "#/properties/transactionId"
        },
        "primaryRequestId": {
          "$ref": "#/properties/primaryRequestId"
        }
      },
      "additionalProperties": false
    },
    {
      "type": "object",
      "required": [
        "operation",
        "transactionId",
        "lineNumber",
        "results"
      ],
      "properties": {
        "results": {
          "$ref": "#/properties/results"
        },
        "operation": {
          "type": "string",
          "const": "update_journal_line"
        },
        "lineNumber": {
          "$ref": "#/properties/lineNumber"
        },
        "transactionId": {
          "$ref": "#/properties/transactionId"
        }
      },
      "additionalProperties": false
    },
    {
      "type": "object",
      "required": [
        "status",
        "requestId",
        "transactionId",
        "operation"
      ],
      "properties": {
        "status": {
          "$ref": "#/properties/status"
        },
        "requests": {
          "$ref": "#/properties/requests"
        },
        "statuses": {
          "$ref": "#/properties/statuses"
        },
        "completed": {
          "$ref": "#/properties/completed"
        },
        "operation": {
          "type": "string",
          "const": "set_fmv_override"
        },
        "requestId": {
          "$ref": "#/properties/requestId"
        },
        "finalState": {
          "$ref": "#/properties/finalState"
        },
        "transactionId": {
          "$ref": "#/properties/transactionId"
        }
      },
      "additionalProperties": false
    },
    {
      "type": "object",
      "required": [
        "status",
        "success",
        "transactionId",
        "operation"
      ],
      "properties": {
        "error": {
          "$ref": "#/properties/error"
        },
        "status": {
          "$ref": "#/properties/status"
        },
        "success": {
          "$ref": "#/properties/success"
        },
        "operation": {
          "type": "string",
          "const": "set_fmv_override"
        },
        "transactionId": {
          "$ref": "#/properties/transactionId"
        }
      },
      "additionalProperties": false
    }
  ],
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "required": [
    "operation"
  ],
  "properties": {
    "error": {
      "type": "object",
      "required": [
        "name",
        "message"
      ],
      "properties": {
        "name": {
          "type": "string"
        },
        "message": {
          "type": "string"
        }
      },
      "additionalProperties": false
    },
    "failed": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "txHash",
          "error"
        ],
        "properties": {
          "error": {
            "type": "string",
            "minLength": 1
          },
          "txHash": {
            "type": "string",
            "minLength": 1
          }
        },
        "additionalProperties": false
      }
    },
    "status": {
      "enum": [
        "queued",
        "completed"
      ],
      "type": "string"
    },
    "created": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "txHash"
        ],
        "properties": {
          "txHash": {
            "type": "string",
            "minLength": 1
          }
        },
        "additionalProperties": false
      }
    },
    "results": {
      "type": "array",
      "items": {
        "oneOf": [
          {
            "type": "object",
            "required": [
              "status",
              "requestId",
              "field"
            ],
            "properties": {
              "field": {
                "type": "string"
              },
              "status": {
                "type": "string",
                "const": "queued"
              },
              "requestId": {
                "type": "string"
              }
            },
            "additionalProperties": false
          },
          {
            "type": "object",
            "required": [
              "status",
              "success",
              "field"
            ],
            "properties": {
              "error": {
                "type": "object",
                "required": [
                  "name",
                  "message"
                ],
                "properties": {
                  "name": {
                    "type": "string"
                  },
                  "message": {
                    "type": "string"
                  }
                },
                "additionalProperties": false
              },
              "field": {
                "type": "string"
              },
              "status": {
                "type": "string",
                "const": "completed"
              },
              "success": {
                "type": "boolean"
              }
            },
            "additionalProperties": false
          }
        ]
      }
    },
    "skipped": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "txHash",
          "reason"
        ],
        "properties": {
          "reason": {
            "type": "string",
            "minLength": 1
          },
          "txHash": {
            "type": "string",
            "minLength": 1
          }
        },
        "additionalProperties": false
      }
    },
    "success": {
      "type": "boolean"
    },
    "replaced": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "txHash"
        ],
        "properties": {
          "txHash": {
            "type": "string",
            "minLength": 1
          }
        },
        "additionalProperties": false
      }
    },
    "requests": {
      "anyOf": [
        {
          "type": "object",
          "required": [
            "primary",
            "all"
          ],
          "properties": {
            "all": {
              "type": "array",
              "items": {
                "anyOf": [
                  {
                    "type": "object",
                    "required": [
                      "field",
                      "requestId",
                      "status"
                    ],
                    "properties": {
                      "field": {
                        "type": "string"
                      },
                      "status": {
                        "type": "string",
                        "const": "queued"
                      },
                      "requestId": {
                        "type": "string"
                      }
                    },
                    "additionalProperties": false
                  },
                  {
                    "type": "object",
                    "required": [
                      "requestId",
                      "type",
                      "status",
                      "progress",
                      "createdAt",
                      "updatedAt",
                      "field"
                    ],
                    "properties": {
                      "type": {
                        "enum": [
                          "sync",
                          "export",
                          "recompute",
                          "reclassify"
                        ],
                        "type": "string"
                      },
                      "error": {
                        "type": "object",
                        "required": [
                          "error"
                        ],
                        "properties": {
                          "error": {
                            "type": "object",
                            "required": [
                              "code",
                              "message",
                              "requestId"
                            ],
                            "properties": {
                              "code": {
                                "type": "string"
                              },
                              "details": {
                                "type": "object",
                                "propertyNames": {
                                  "type": "string"
                                },
                                "additionalProperties": {}
                              },
                              "message": {
                                "type": "string"
                              },
                              "requestId": {
                                "type": "string"
                              }
                            },
                            "additionalProperties": false
                          }
                        },
                        "additionalProperties": false
                      },
                      "field": {
                        "type": "string"
                      },
                      "result": {
                        "type": "object",
                        "required": [
                          "downloadUrl",
                          "fileSize",
                          "format"
                        ],
                        "properties": {
                          "format": {
                            "enum": [
                              "xlsx",
                              "pdf",
                              "json"
                            ],
                            "type": "string"
                          },
                          "fileSize": {
                            "type": "number"
                          },
                          "downloadUrl": {
                            "type": "string"
                          }
                        },
                        "additionalProperties": false
                      },
                      "status": {
                        "enum": [
                          "pending",
                          "active",
                          "delayed",
                          "completed",
                          "failed"
                        ],
                        "type": "string"
                      },
                      "progress": {
                        "type": "number"
                      },
                      "createdAt": {
                        "type": "string",
                        "format": "date-time"
                      },
                      "requestId": {
                        "type": "string"
                      },
                      "updatedAt": {
                        "type": "string",
                        "format": "date-time"
                      },
                      "finishedOn": {
                        "type": "number"
                      },
                      "appProgress": {
                        "type": "object",
                        "required": [
                          "completed",
                          "total",
                          "transactionsSynced"
                        ],
                        "properties": {
                          "total": {
                            "type": "number"
                          },
                          "completed": {
                            "type": "number"
                          },
                          "transactionsSynced": {
                            "type": "number"
                          }
                        },
                        "additionalProperties": false
                      },
                      "completedAt": {
                        "type": "string",
                        "format": "date-time"
                      },
                      "returnValue": {}
                    },
                    "additionalProperties": false
                  }
                ]
              }
            },
            "primary": {
              "type": "string"
            }
          },
          "additionalProperties": false
        },
        {
          "type": "object",
          "required": [
            "primary",
            "all"
          ],
          "properties": {
            "all": {
              "type": "array",
              "items": {
                "type": "object",
                "required": [
                  "requestId",
                  "type",
                  "status",
                  "progress",
                  "createdAt",
                  "updatedAt"
                ],
                "properties": {
                  "type": {
                    "enum": [
                      "sync",
                      "export",
                      "recompute",
                      "reclassify"
                    ],
                    "type": "string"
                  },
                  "error": {
                    "type": "object",
                    "required": [
                      "error"
                    ],
                    "properties": {
                      "error": {
                        "type": "object",
                        "required": [
                          "code",
                          "message",
                          "requestId"
                        ],
                        "properties": {
                          "code": {
                            "type": "string"
                          },
                          "details": {
                            "type": "object",
                            "propertyNames": {
                              "type": "string"
                            },
                            "additionalProperties": {}
                          },
                          "message": {
                            "type": "string"
                          },
                          "requestId": {
                            "type": "string"
                          }
                        },
                        "additionalProperties": false
                      }
                    },
                    "additionalProperties": false
                  },
                  "result": {
                    "type": "object",
                    "required": [
                      "downloadUrl",
                      "fileSize",
                      "format"
                    ],
                    "properties": {
                      "format": {
                        "enum": [
                          "xlsx",
                          "pdf",
                          "json"
                        ],
                        "type": "string"
                      },
                      "fileSize": {
                        "type": "number"
                      },
                      "downloadUrl": {
                        "type": "string"
                      }
                    },
                    "additionalProperties": false
                  },
                  "status": {
                    "enum": [
                      "pending",
                      "active",
                      "delayed",
                      "completed",
                      "failed"
                    ],
                    "type": "string"
                  },
                  "progress": {
                    "type": "number"
                  },
                  "createdAt": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "requestId": {
                    "type": "string"
                  },
                  "updatedAt": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "finishedOn": {
                    "type": "number"
                  },
                  "appProgress": {
                    "type": "object",
                    "required": [
                      "completed",
                      "total",
                      "transactionsSynced"
                    ],
                    "properties": {
                      "total": {
                        "type": "number"
                      },
                      "completed": {
                        "type": "number"
                      },
                      "transactionsSynced": {
                        "type": "number"
                      }
                    },
                    "additionalProperties": false
                  },
                  "completedAt": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "returnValue": {}
                },
                "additionalProperties": false
              }
            },
            "primary": {
              "type": "string"
            }
          },
          "additionalProperties": false
        }
      ]
    },
    "statuses": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "requestId",
          "type",
          "status",
          "progress",
          "createdAt",
          "updatedAt"
        ],
        "properties": {
          "type": {
            "enum": [
              "sync",
              "export",
              "recompute",
              "reclassify"
            ],
            "type": "string"
          },
          "error": {
            "type": "object",
            "required": [
              "error"
            ],
            "properties": {
              "error": {
                "type": "object",
                "required": [
                  "code",
                  "message",
                  "requestId"
                ],
                "properties": {
                  "code": {
                    "type": "string"
                  },
                  "details": {
                    "type": "object",
                    "propertyNames": {
                      "type": "string"
                    },
                    "additionalProperties": {}
                  },
                  "message": {
                    "type": "string"
                  },
                  "requestId": {
                    "type": "string"
                  }
                },
                "additionalProperties": false
              }
            },
            "additionalProperties": false
          },
          "result": {
            "type": "object",
            "required": [
              "downloadUrl",
              "fileSize",
              "format"
            ],
            "properties": {
              "format": {
                "enum": [
                  "xlsx",
                  "pdf",
                  "json"
                ],
                "type": "string"
              },
              "fileSize": {
                "type": "number"
              },
              "downloadUrl": {
                "type": "string"
              }
            },
            "additionalProperties": false
          },
          "status": {
            "enum": [
              "pending",
              "active",
              "delayed",
              "completed",
              "failed"
            ],
            "type": "string"
          },
          "progress": {
            "type": "number"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "requestId": {
            "type": "string"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "finishedOn": {
            "type": "number"
          },
          "appProgress": {
            "type": "object",
            "required": [
              "completed",
              "total",
              "transactionsSynced"
            ],
            "properties": {
              "total": {
                "type": "number"
              },
              "completed": {
                "type": "number"
              },
              "transactionsSynced": {
                "type": "number"
              }
            },
            "additionalProperties": false
          },
          "completedAt": {
            "type": "string",
            "format": "date-time"
          },
          "returnValue": {}
        },
        "additionalProperties": false
      }
    },
    "completed": {
      "type": "boolean"
    },
    "operation": {
      "enum": [
        "create_manual",
        "update_fields",
        "update_journal_line",
        "set_fmv_override"
      ],
      "type": "string"
    },
    "requestId": {
      "type": "string"
    },
    "finalState": {
      "type": "object",
      "required": [
        "hasError",
        "errorTypes",
        "suggestedAction"
      ],
      "properties": {
        "hasError": {
          "type": "boolean"
        },
        "errorTypes": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "operationType": {
          "type": "string"
        },
        "suggestedAction": {},
        "classificationState": {
          "type": "string"
        }
      },
      "additionalProperties": false
    },
    "lineNumber": {
      "type": "number"
    },
    "transactionId": {
      "type": "string"
    },
    "primaryRequestId": {
      "type": "string"
    }
  },
  "additionalProperties": false
}
edit_transaction annotations
{
  "title": "Edit Transaction",
  "readOnlyHint": false,
  "openWorldHint": true,
  "idempotentHint": false,
  "destructiveHint": false
}
import_adjustment_journals — Import Adjustment Journals
Advertised by the server during the last successful anonymous check.
Open-world

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.

import_adjustment_journals input schema
{
  "type": "object",
  "required": [
    "workspaceRef",
    "portfolioRef",
    "action",
    "contentBase64",
    "fileName"
  ],
  "properties": {
    "action": {
      "enum": [
        "preview",
        "post"
      ],
      "type": "string",
      "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."
    },
    "fileName": {
      "type": "string",
      "pattern": "^[^/\\\\]+\\.(?:csv|xlsx)$",
      "maxLength": 255,
      "minLength": 1,
      "description": "Original CSV or XLSX source filename."
    },
    "resolutions": {
      "type": "array",
      "items": {
        "anyOf": [
          {
            "type": "object",
            "required": [
              "accountNumber",
              "kind",
              "locator"
            ],
            "properties": {
              "kind": {
                "type": "string",
                "const": "account",
                "description": "Kind of reference this row fixes."
              },
              "locator": {
                "oneOf": [
                  {
                    "type": "object",
                    "required": [
                      "format",
                      "lineNumber"
                    ],
                    "properties": {
                      "format": {
                        "type": "string",
                        "const": "csv",
                        "description": "Source file format."
                      },
                      "lineNumber": {
                        "type": "integer",
                        "maximum": 9007199254740991,
                        "minimum": 1,
                        "description": "1-based line number in the CSV file."
                      }
                    },
                    "additionalProperties": false
                  },
                  {
                    "type": "object",
                    "required": [
                      "format",
                      "rowNumber",
                      "sheetName"
                    ],
                    "properties": {
                      "format": {
                        "type": "string",
                        "const": "xlsx",
                        "description": "Source file format."
                      },
                      "rowNumber": {
                        "type": "integer",
                        "maximum": 9007199254740991,
                        "minimum": 1,
                        "description": "1-based row number within the sheet."
                      },
                      "sheetName": {
                        "type": "string",
                        "minLength": 1,
                        "description": "Worksheet the row belongs to."
                      }
                    },
                    "additionalProperties": false
                  }
                ]
              },
              "accountNumber": {
                "type": "string",
                "minLength": 1,
                "description": "Ledger account to use for that row, from list_journal_line_assignment_options (type: ledger_account)."
              }
            },
            "additionalProperties": false
          },
          {
            "type": "object",
            "required": [
              "externalId",
              "kind",
              "locator"
            ],
            "properties": {
              "kind": {
                "type": "string",
                "const": "counterparty",
                "description": "Kind of reference this row fixes."
              },
              "locator": {
                "oneOf": [
                  {
                    "type": "object",
                    "required": [
                      "format",
                      "lineNumber"
                    ],
                    "properties": {
                      "format": {
                        "type": "string",
                        "const": "csv",
                        "description": "Source file format."
                      },
                      "lineNumber": {
                        "type": "integer",
                        "maximum": 9007199254740991,
                        "minimum": 1,
                        "description": "1-based line number in the CSV file."
                      }
                    },
                    "additionalProperties": false
                  },
                  {
                    "type": "object",
                    "required": [
                      "format",
                      "rowNumber",
                      "sheetName"
                    ],
                    "properties": {
                      "format": {
                        "type": "string",
                        "const": "xlsx",
                        "description": "Source file format."
                      },
                      "rowNumber": {
                        "type": "integer",
                        "maximum": 9007199254740991,
                        "minimum": 1,
                        "description": "1-based row number within the sheet."
                      },
                      "sheetName": {
                        "type": "string",
                        "minLength": 1,
                        "description": "Worksheet the row belongs to."
                      }
                    },
                    "additionalProperties": false
                  }
                ]
              },
              "externalId": {
                "type": "string",
                "minLength": 1,
                "description": "Counterparty's external identifier, as recorded on the counterparty."
              }
            },
            "additionalProperties": false
          },
          {
            "type": "object",
            "required": [
              "kind",
              "locator",
              "name"
            ],
            "properties": {
              "kind": {
                "type": "string",
                "const": "counterparty",
                "description": "Kind of reference this row fixes."
              },
              "name": {
                "type": "string",
                "minLength": 1,
                "description": "Counterparty name to use for that row, from list_journal_line_assignment_options (type: counterparty)."
              },
              "locator": {
                "oneOf": [
                  {
                    "type": "object",
                    "required": [
                      "format",
                      "lineNumber"
                    ],
                    "properties": {
                      "format": {
                        "type": "string",
                        "const": "csv",
                        "description": "Source file format."
                      },
                      "lineNumber": {
                        "type": "integer",
                        "maximum": 9007199254740991,
                        "minimum": 1,
                        "description": "1-based line number in the CSV file."
                      }
                    },
                    "additionalProperties": false
                  },
                  {
                    "type": "object",
                    "required": [
                      "format",
                      "rowNumber",
                      "sheetName"
                    ],
                    "properties": {
                      "format": {
                        "type": "string",
                        "const": "xlsx",
                        "description": "Source file format."
                      },
                      "rowNumber": {
                        "type": "integer",
                        "maximum": 9007199254740991,
                        "minimum": 1,
                        "description": "1-based row number within the sheet."
                      },
                      "sheetName": {
                        "type": "string",
                        "minLength": 1,
                        "description": "Worksheet the row belongs to."
                      }
                    },
                    "additionalProperties": false
                  }
                ]
              }
            },
            "additionalProperties": false
          },
          {
            "type": "object",
            "required": [
              "centerName",
              "kind",
              "locator",
              "typeKey"
            ],
            "properties": {
              "kind": {
                "type": "string",
                "const": "responsibilityCenter",
                "description": "Kind of reference this row fixes."
              },
              "locator": {
                "oneOf": [
                  {
                    "type": "object",
                    "required": [
                      "format",
                      "lineNumber"
                    ],
                    "properties": {
                      "format": {
                        "type": "string",
                        "const": "csv",
                        "description": "Source file format."
                      },
                      "lineNumber": {
                        "type": "integer",
                        "maximum": 9007199254740991,
                        "minimum": 1,
                        "description": "1-based line number in the CSV file."
                      }
                    },
                    "additionalProperties": false
                  },
                  {
                    "type": "object",
                    "required": [
                      "format",
                      "rowNumber",
                      "sheetName"
                    ],
                    "properties": {
                      "format": {
                        "type": "string",
                        "const": "xlsx",
                        "description": "Source file format."
                      },
                      "rowNumber": {
                        "type": "integer",
                        "maximum": 9007199254740991,
                        "minimum": 1,
                        "description": "1-based row number within the sheet."
                      },
                      "sheetName": {
                        "type": "string",
                        "minLength": 1,
                        "description": "Worksheet the row belongs to."
                      }
                    },
                    "additionalProperties": false
                  }
                ]
              },
              "typeKey": {
                "type": "string",
                "minLength": 1,
                "description": "Responsibility center type the name belongs to, such as costCenter."
              },
              "centerName": {
                "type": "string",
                "minLength": 1,
                "description": "Responsibility center to use for that row, from list_journal_line_assignment_options (type: responsibility_center)."
              }
            },
            "additionalProperties": false
          }
        ]
      },
      "description": "Only for action post; required for each."
    },
    "portfolioRef": {
      "type": "string",
      "minLength": 1,
      "description": "Portfolio name or slug inside that workspace. Call list_portfolios to resolve it."
    },
    "previewToken": {
      "type": "string",
      "pattern": "^[0-9a-f]{64}$",
      "description": "Token returned by the matching preview, proving the file has not changed since. Only for action post; required for each."
    },
    "workspaceRef": {
      "type": "string",
      "minLength": 1,
      "description": "Workspace name or slug. Call list_workspaces to resolve it."
    },
    "contentBase64": {
      "type": "string",
      "minLength": 1,
      "description": "CSV or XLSX source file content as base64-encoded bytes (max 5 MiB)."
    }
  },
  "additionalProperties": false
}
import_adjustment_journals output schema
{
  "type": "object",
  "$defs": {
    "AjIssue": {
      "anyOf": [
        {
          "anyOf": [
            {
              "type": "object",
              "required": [
                "code"
              ],
              "properties": {
                "code": {
                  "enum": [
                    "ADJUSTMENT_JOURNAL_SOURCE_LAYOUT_INVALID",
                    "ADJUSTMENT_JOURNAL_SOURCE_UNREADABLE"
                  ],
                  "type": "string"
                }
              },
              "additionalProperties": false
            },
            {
              "type": "object",
              "required": [
                "code",
                "locator"
              ],
              "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": {
                  "type": "string",
                  "minLength": 1
                },
                "entryId": {
                  "type": "string",
                  "minLength": 1
                },
                "locator": {
                  "$ref": "#/$defs/AjLocator"
                }
              },
              "additionalProperties": false
            }
          ]
        },
        {
          "type": "object",
          "required": [
            "accountNumber",
            "code",
            "kind",
            "locator"
          ],
          "properties": {
            "code": {
              "enum": [
                "ADJUSTMENT_JOURNAL_ACCOUNT_NOT_FOUND_OR_INELIGIBLE",
                "ADJUSTMENT_JOURNAL_ACCOUNT_AMBIGUOUS",
                "ADJUSTMENT_JOURNAL_ACCOUNT_BASE_CURRENCY_REQUIRED"
              ],
              "type": "string"
            },
            "kind": {
              "type": "string",
              "const": "account"
            },
            "locator": {
              "$ref": "#/$defs/AjLocator"
            },
            "accountNumber": {
              "type": "string",
              "minLength": 1
            }
          },
          "additionalProperties": false
        },
        {
          "type": "object",
          "required": [
            "code",
            "kind",
            "locator",
            "reference"
          ],
          "properties": {
            "code": {
              "enum": [
                "ADJUSTMENT_JOURNAL_COUNTERPARTY_NOT_FOUND_OR_INELIGIBLE",
                "ADJUSTMENT_JOURNAL_COUNTERPARTY_AMBIGUOUS"
              ],
              "type": "string"
            },
            "kind": {
              "type": "string",
              "const": "counterparty"
            },
            "locator": {
              "$ref": "#/$defs/AjLocator"
            },
            "reference": {
              "oneOf": [
                {
                  "type": "object",
                  "required": [
                    "externalId",
                    "kind"
                  ],
                  "properties": {
                    "kind": {
                      "type": "string",
                      "const": "external-id"
                    },
                    "name": {
                      "type": "string",
                      "minLength": 1
                    },
                    "externalId": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "additionalProperties": false
                },
                {
                  "type": "object",
                  "required": [
                    "kind",
                    "name"
                  ],
                  "properties": {
                    "kind": {
                      "type": "string",
                      "const": "name"
                    },
                    "name": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "additionalProperties": false
                }
              ]
            }
          },
          "additionalProperties": false
        },
        {
          "type": "object",
          "required": [
            "code",
            "kind",
            "locator",
            "name",
            "typeKey"
          ],
          "properties": {
            "code": {
              "enum": [
                "ADJUSTMENT_JOURNAL_RESPONSIBILITY_CENTER_NOT_FOUND_OR_INELIGIBLE",
                "ADJUSTMENT_JOURNAL_RESPONSIBILITY_CENTER_AMBIGUOUS"
              ],
              "type": "string"
            },
            "kind": {
              "type": "string",
              "const": "responsibilityCenter"
            },
            "name": {
              "type": "string",
              "minLength": 1
            },
            "locator": {
              "$ref": "#/$defs/AjLocator"
            },
            "typeKey": {
              "type": "string",
              "minLength": 1
            }
          },
          "additionalProperties": false
        }
      ]
    },
    "AjLocator": {
      "oneOf": [
        {
          "type": "object",
          "required": [
            "format",
            "lineNumber"
          ],
          "properties": {
            "format": {
              "type": "string",
              "const": "csv"
            },
            "lineNumber": {
              "type": "integer",
              "maximum": 9007199254740991,
              "minimum": 1
            }
          },
          "additionalProperties": false
        },
        {
          "type": "object",
          "required": [
            "format",
            "rowNumber",
            "sheetName"
          ],
          "properties": {
            "format": {
              "type": "string",
              "const": "xlsx"
            },
            "rowNumber": {
              "type": "integer",
              "maximum": 9007199254740991,
              "minimum": 1
            },
            "sheetName": {
              "type": "string",
              "minLength": 1
            }
          },
          "additionalProperties": false
        }
      ]
    },
    "AjFullIssues": {
      "type": "object",
      "required": [
        "mode",
        "items",
        "candidates"
      ],
      "properties": {
        "mode": {
          "type": "string",
          "const": "full"
        },
        "items": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/AjIssue"
          }
        },
        "candidates": {
          "type": "array",
          "items": {
            "oneOf": [
              {
                "type": "object",
                "required": [
                  "accountNumber",
                  "kind",
                  "name"
                ],
                "properties": {
                  "kind": {
                    "type": "string",
                    "const": "account"
                  },
                  "name": {
                    "type": "string",
                    "minLength": 1
                  },
                  "accountNumber": {
                    "type": "string",
                    "minLength": 1
                  }
                },
                "additionalProperties": false
              },
              {
                "type": "object",
                "required": [
                  "kind",
                  "name"
                ],
                "properties": {
                  "kind": {
                    "type": "string",
                    "const": "counterparty"
                  },
                  "name": {
                    "type": "string",
                    "minLength": 1
                  },
                  "externalId": {
                    "type": "string",
                    "minLength": 1
                  }
                },
                "additionalProperties": false
              },
              {
                "type": "object",
                "required": [
                  "kind",
                  "name",
                  "typeKey",
                  "typeName"
                ],
                "properties": {
                  "kind": {
                    "type": "string",
                    "const": "responsibilityCenter"
                  },
                  "name": {
                    "type": "string",
                    "minLength": 1
                  },
                  "typeKey": {
                    "type": "string",
                    "minLength": 1
                  },
                  "typeName": {
                    "type": "string",
                    "minLength": 1
                  }
                },
                "additionalProperties": false
              }
            ]
          }
        }
      },
      "additionalProperties": false
    },
    "AjPostJournal": {
      "type": "object",
      "required": [
        "sourceEntryId",
        "transactionId"
      ],
      "properties": {
        "sourceEntryId": {
          "type": "string",
          "minLength": 1
        },
        "transactionId": {
          "type": "string",
          "minLength": 1
        }
      },
      "additionalProperties": false
    },
    "AjIssueSummary": {
      "type": "object",
      "required": [
        "mode",
        "counts",
        "examples",
        "omittedIssueCount",
        "omittedCandidateCount",
        "nextAction"
      ],
      "properties": {
        "mode": {
          "type": "string",
          "const": "summary"
        },
        "counts": {
          "type": "array",
          "items": {
            "type": "object",
            "required": [
              "code",
              "count"
            ],
            "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": {
                "type": "integer",
                "maximum": 9007199254740991,
                "minimum": 0
              }
            },
            "additionalProperties": false
          }
        },
        "examples": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/AjIssue"
          },
          "maxItems": 5
        },
        "nextAction": {
          "type": "string",
          "const": "Correct the source file, then preview the complete file again before posting."
        },
        "omittedIssueCount": {
          "type": "integer",
          "maximum": 9007199254740991,
          "minimum": 0
        },
        "omittedCandidateCount": {
          "type": "integer",
          "maximum": 9007199254740991,
          "minimum": 0
        }
      },
      "additionalProperties": false
    },
    "AjPreviewJournal": {
      "type": "object",
      "required": [
        "credit",
        "debit",
        "effectiveDate",
        "entryId"
      ],
      "properties": {
        "memo": {
          "type": "string",
          "minLength": 1
        },
        "debit": {
          "type": "string",
          "pattern": "^-?\\d+(\\.\\d+)?$"
        },
        "credit": {
          "type": "string",
          "pattern": "^-?\\d+(\\.\\d+)?$"
        },
        "entryId": {
          "type": "string",
          "minLength": 1
        },
        "effectiveDate": {
          "type": "string",
          "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
        }
      },
      "additionalProperties": false
    },
    "AjPreviewSummary": {
      "type": "object",
      "required": [
        "baseCurrency",
        "journalCount",
        "sourceRowCount",
        "totalCredit",
        "totalDebit"
      ],
      "properties": {
        "totalDebit": {
          "type": "string",
          "pattern": "^-?\\d+(\\.\\d+)?$"
        },
        "totalCredit": {
          "type": "string",
          "pattern": "^-?\\d+(\\.\\d+)?$"
        },
        "baseCurrency": {
          "type": "string",
          "minLength": 1
        },
        "journalCount": {
          "type": "integer",
          "maximum": 9007199254740991,
          "minimum": 0
        },
        "sourceRowCount": {
          "type": "integer",
          "maximum": 9007199254740991,
          "minimum": 0
        }
      },
      "additionalProperties": false
    }
  },
  "oneOf": [
    {
      "type": "object",
      "required": [
        "action",
        "previewToken",
        "readyToPost",
        "summary",
        "journals",
        "omittedJournalCount",
        "issues"
      ],
      "properties": {
        "action": {
          "type": "string",
          "const": "preview"
        },
        "issues": {
          "oneOf": [
            {
              "$ref": "#/$defs/AjFullIssues"
            },
            {
              "$ref": "#/$defs/AjIssueSummary"
            }
          ]
        },
        "summary": {
          "$ref": "#/$defs/AjPreviewSummary"
        },
        "journals": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/AjPreviewJournal"
          },
          "maxItems": 3
        },
        "readyToPost": {
          "type": "boolean"
        },
        "previewToken": {
          "type": "string",
          "pattern": "^[0-9a-f]{64}$"
        },
        "omittedJournalCount": {
          "type": "integer",
          "maximum": 9007199254740991,
          "minimum": 0
        }
      },
      "additionalProperties": false
    },
    {
      "type": "object",
      "required": [
        "action",
        "importRef",
        "createdJournalCount",
        "journals",
        "omittedJournalCount"
      ],
      "properties": {
        "action": {
          "type": "string",
          "const": "post"
        },
        "journals": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/AjPostJournal"
          },
          "maxItems": 3
        },
        "importRef": {
          "type": "string",
          "pattern": "^adjustment-journal-import-[a-z0-9-]+$",
          "maxLength": 128,
          "minLength": 1
        },
        "createdJournalCount": {
          "type": "integer",
          "maximum": 9007199254740991,
          "minimum": 1
        },
        "omittedJournalCount": {
          "type": "integer",
          "maximum": 9007199254740991,
          "minimum": 0
        }
      },
      "additionalProperties": false
    }
  ],
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "required": [
    "action",
    "journals",
    "omittedJournalCount"
  ],
  "properties": {
    "action": {
      "enum": [
        "preview",
        "post"
      ],
      "type": "string"
    },
    "issues": {
      "oneOf": [
        {
          "$ref": "#/$defs/AjFullIssues"
        },
        {
          "$ref": "#/$defs/AjIssueSummary"
        }
      ]
    },
    "summary": {
      "$ref": "#/$defs/AjPreviewSummary"
    },
    "journals": {
      "anyOf": [
        {
          "type": "array",
          "items": {
            "$ref": "#/$defs/AjPreviewJournal"
          },
          "maxItems": 3
        },
        {
          "type": "array",
          "items": {
            "$ref": "#/$defs/AjPostJournal"
          },
          "maxItems": 3
        }
      ]
    },
    "importRef": {
      "type": "string",
      "pattern": "^adjustment-journal-import-[a-z0-9-]+$",
      "maxLength": 128,
      "minLength": 1
    },
    "readyToPost": {
      "type": "boolean"
    },
    "previewToken": {
      "type": "string",
      "pattern": "^[0-9a-f]{64}$"
    },
    "createdJournalCount": {
      "type": "integer",
      "maximum": 9007199254740991,
      "minimum": 1
    },
    "omittedJournalCount": {
      "type": "integer",
      "maximum": 9007199254740991,
      "minimum": 0
    }
  },
  "additionalProperties": false
}
import_adjustment_journals annotations
{
  "title": "Import Adjustment Journals",
  "readOnlyHint": false,
  "openWorldHint": true,
  "idempotentHint": false,
  "destructiveHint": false
}
get_sync_status — Get Sync Status
Advertised by the server during the last successful anonymous check.
Advertised read-only

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.

get_sync_status input schema
{
  "type": "object",
  "required": [
    "workspaceRef",
    "portfolioRef"
  ],
  "properties": {
    "portfolioRef": {
      "type": "string",
      "description": "Portfolio exact name or slug"
    },
    "workspaceRef": {
      "type": "string",
      "description": "Workspace exact name or slug"
    }
  },
  "additionalProperties": false
}
get_sync_status output schema
{
  "type": "object",
  "required": [
    "status",
    "wallets",
    "updatedAt"
  ],
  "properties": {
    "status": {
      "enum": [
        "pending",
        "processing",
        "completed",
        "failed"
      ],
      "type": "string"
    },
    "wallets": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "syncMessages",
          "chainId",
          "address",
          "status",
          "progressPercent"
        ],
        "properties": {
          "status": {
            "enum": [
              "pending",
              "processing",
              "completed",
              "failed"
            ],
            "type": "string"
          },
          "address": {
            "type": "string"
          },
          "chainId": {
            "type": "string"
          },
          "lastSyncAt": {
            "type": "string",
            "format": "date-time"
          },
          "errorMessage": {
            "type": "string"
          },
          "syncMessages": {
            "type": "array",
            "items": {
              "oneOf": [
                {
                  "type": "object",
                  "required": [
                    "code",
                    "message",
                    "severity",
                    "details"
                  ],
                  "properties": {
                    "code": {
                      "type": "string",
                      "const": "EXCHANGE_RECONNECT_REQUIRED"
                    },
                    "details": {
                      "type": "object",
                      "required": [
                        "provider",
                        "reconnectRequired",
                        "errorType"
                      ],
                      "properties": {
                        "provider": {
                          "type": "string",
                          "minLength": 1
                        },
                        "errorType": {
                          "type": "string",
                          "const": "ExternalServiceAuthenticationError"
                        },
                        "reconnectRequired": {
                          "type": "boolean",
                          "const": true
                        }
                      },
                      "additionalProperties": false
                    },
                    "message": {
                      "type": "string",
                      "minLength": 1
                    },
                    "severity": {
                      "enum": [
                        "ERROR",
                        "WARN"
                      ],
                      "type": "string",
                      "default": "ERROR"
                    }
                  },
                  "additionalProperties": false
                },
                {
                  "type": "object",
                  "required": [
                    "code",
                    "message",
                    "severity",
                    "details"
                  ],
                  "properties": {
                    "code": {
                      "type": "string",
                      "const": "SYNC_PROCESSING_FAILED"
                    },
                    "details": {
                      "type": "object",
                      "required": [
                        "retryable",
                        "errorType"
                      ],
                      "properties": {
                        "errorType": {
                          "type": "string",
                          "const": "SyncProcessingError"
                        },
                        "retryable": {
                          "type": "boolean",
                          "const": true
                        }
                      },
                      "additionalProperties": false
                    },
                    "message": {
                      "type": "string",
                      "minLength": 1
                    },
                    "severity": {
                      "enum": [
                        "ERROR",
                        "WARN"
                      ],
                      "type": "string",
                      "default": "ERROR"
                    }
                  },
                  "additionalProperties": false
                },
                {
                  "type": "object",
                  "required": [
                    "code",
                    "message",
                    "severity",
                    "details"
                  ],
                  "properties": {
                    "code": {
                      "enum": [
                        "SYNC_WARNING",
                        "TRANSACTION_LIMIT_REACHED"
                      ],
                      "type": "string"
                    },
                    "details": {
                      "type": "object",
                      "required": [
                        "errorType"
                      ],
                      "properties": {
                        "errorType": {
                          "type": "string",
                          "const": "SyncWarning"
                        }
                      },
                      "additionalProperties": false
                    },
                    "message": {
                      "type": "string",
                      "minLength": 1
                    },
                    "severity": {
                      "enum": [
                        "ERROR",
                        "WARN"
                      ],
                      "type": "string",
                      "default": "ERROR"
                    }
                  },
                  "additionalProperties": false
                }
              ]
            }
          },
          "progressPercent": {
            "type": "number",
            "maximum": 100,
            "minimum": 0
          },
          "totalTransactions": {
            "type": "integer",
            "maximum": 9007199254740991,
            "minimum": -9007199254740991
          },
          "transactionsSynced": {
            "type": "integer",
            "maximum": 9007199254740991,
            "minimum": -9007199254740991
          }
        },
        "additionalProperties": false
      }
    },
    "startedAt": {
      "type": "string",
      "format": "date-time"
    },
    "updatedAt": {
      "type": "string",
      "format": "date-time"
    },
    "completedAt": {
      "type": "string",
      "format": "date-time"
    }
  },
  "additionalProperties": false
}
get_sync_status annotations
{
  "title": "Get Sync Status",
  "readOnlyHint": true,
  "openWorldHint": false,
  "idempotentHint": true,
  "destructiveHint": false
}
incremental_sync — Incremental Sync
Advertised by the server during the last successful anonymous check.
Open-world

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.

incremental_sync input schema
{
  "type": "object",
  "required": [
    "workspaceRef",
    "portfolioRef"
  ],
  "properties": {
    "wallets": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "chainId",
          "walletAddress"
        ],
        "properties": {
          "chainId": {
            "type": "string",
            "description": "Exact chain ID for the wallet"
          },
          "walletAddress": {
            "type": "string",
            "description": "Exact case-sensitive wallet address"
          }
        },
        "additionalProperties": false
      },
      "description": "Optional exact wallet pairs; omit to sync every wallet in the portfolio"
    },
    "portfolioRef": {
      "type": "string",
      "description": "Portfolio exact name or slug"
    },
    "workspaceRef": {
      "type": "string",
      "description": "Workspace exact name or slug"
    }
  },
  "additionalProperties": false
}
incremental_sync output schema
{
  "type": "object",
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "required": [
    "portfolioSlug",
    "requestId"
  ],
  "properties": {
    "requestId": {
      "type": "string"
    },
    "portfolioSlug": {
      "type": "string"
    }
  },
  "additionalProperties": false
}
incremental_sync annotations
{
  "title": "Incremental Sync",
  "readOnlyHint": false,
  "openWorldHint": true,
  "idempotentHint": false,
  "destructiveHint": false
}
full_resync — Full Resync (DANGER — wipes & rebuilds history)
Advertised by the server during the last successful anonymous check.
Advertised destructiveOpen-world

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.

full_resync input schema
{
  "type": "object",
  "required": [
    "workspaceRef",
    "portfolioRef"
  ],
  "properties": {
    "wallets": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "chainId",
          "walletAddress"
        ],
        "properties": {
          "chainId": {
            "type": "string",
            "description": "Exact chain ID for the wallet"
          },
          "walletAddress": {
            "type": "string",
            "description": "Exact case-sensitive wallet address"
          }
        },
        "additionalProperties": false
      },
      "description": "Optional exact wallet pairs; omit to wipe and rebuild every wallet in the portfolio"
    },
    "portfolioRef": {
      "type": "string",
      "description": "Portfolio exact name or slug"
    },
    "workspaceRef": {
      "type": "string",
      "description": "Workspace exact name or slug"
    }
  },
  "additionalProperties": false
}
full_resync output schema
{
  "type": "object",
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "required": [
    "portfolioSlug",
    "requestId"
  ],
  "properties": {
    "requestId": {
      "type": "string"
    },
    "portfolioSlug": {
      "type": "string"
    }
  },
  "additionalProperties": false
}
full_resync annotations
{
  "title": "Full Resync (DANGER — wipes & rebuilds history)",
  "readOnlyHint": false,
  "openWorldHint": true,
  "idempotentHint": false,
  "destructiveHint": true
}
list_portfolio_transactions — List Portfolio Transactions
Advertised by the server during the last successful anonymous check.
Advertised read-only

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 one transaction in full instead: classification, journal entry, cost-basis links, and (rawWithDetails) its sanitized event logs and contract calls.

list_portfolio_transactions input schema
{
  "type": "object",
  "required": [
    "workspaceRef",
    "portfolioRef"
  ],
  "properties": {
    "sort": {
      "enum": [
        "timestamp",
        "-timestamp"
      ],
      "type": "string",
      "default": "-timestamp",
      "description": "Timestamp sort. Prefix with - for descending order."
    },
    "limit": {
      "anyOf": [
        {
          "type": "integer",
          "maximum": 100,
          "minimum": 1,
          "description": "Maximum Portfolio Transactions to return, maximum 100."
        },
        {
          "type": "string",
          "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)$",
          "description": "Maximum Portfolio Transactions to return, maximum 100. Numeric strings are accepted for MCP client compatibility."
        }
      ],
      "description": "Maximum Portfolio Transactions to return, maximum 100."
    },
    "isSpam": {
      "type": "boolean",
      "description": "true: transfers involve spam tokens; false: non-spam only"
    },
    "search": {
      "type": "string",
      "minLength": 1,
      "description": "Free-text search over memo, tx hash, transaction ID"
    },
    "status": {
      "type": "array",
      "items": {
        "enum": [
          "PROPOSED",
          "ERROR",
          "POSTED",
          "CLOSED"
        ],
        "type": "string"
      },
      "minItems": 1,
      "description": "Filter by status, e.g. [\"POSTED\"]"
    },
    "toDate": {
      "anyOf": [
        {
          "type": "string",
          "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",
          "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(?:Z))$"
        }
      ],
      "description": "Optional ISO timestamp upper bound"
    },
    "txHash": {
      "type": "string",
      "minLength": 1,
      "description": "Filter by exact on-chain transaction hash"
    },
    "address": {
      "type": "string",
      "minLength": 1,
      "description": "Match transfer from/to address (case-insensitive)"
    },
    "chainId": {
      "type": "string",
      "minLength": 1,
      "description": "Public wallet chain ID."
    },
    "hasLots": {
      "type": "boolean",
      "description": "true: produced cost-basis lots; false: did not"
    },
    "include": {
      "enum": [
        "raw",
        "rawWithDetails"
      ],
      "type": "string",
      "description": "Include grouped contributing raw source transactions; rawWithDetails adds sanitized provider details and requires transactionId"
    },
    "subType": {
      "type": "array",
      "items": {
        "type": "string",
        "minLength": 1
      },
      "minItems": 1,
      "description": "Filter by operation sub-type (case-insensitive)"
    },
    "chainIds": {
      "type": "array",
      "items": {
        "type": "string",
        "minLength": 1
      },
      "minItems": 1,
      "description": "Optional chain ID filters"
    },
    "fromDate": {
      "anyOf": [
        {
          "type": "string",
          "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",
          "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(?:Z))$"
        }
      ],
      "description": "Optional ISO timestamp lower bound"
    },
    "hasError": {
      "type": "boolean",
      "description": "true: has a processing error; false: error-free"
    },
    "maxValue": {
      "type": "string",
      "pattern": "^-?\\d+(\\.\\d+)?$",
      "description": "Maximum transfer fiat quote value (inclusive), as a decimal string"
    },
    "minValue": {
      "type": "string",
      "pattern": "^-?\\d+(\\.\\d+)?$",
      "description": "Minimum transfer fiat quote value (inclusive), as a decimal string"
    },
    "assetRefs": {
      "type": "array",
      "items": {
        "type": "string",
        "minLength": 1
      },
      "minItems": 1,
      "description": "Filter by asset symbol (case-insensitive)"
    },
    "errorType": {
      "type": "array",
      "items": {
        "type": "string",
        "minLength": 1
      },
      "minItems": 1,
      "description": "Filter by error/warning code, e.g. [\"FmvNotAvailable\"]"
    },
    "pageToken": {
      "type": "string",
      "minLength": 1,
      "description": "Opaque token returned by the previous list response."
    },
    "counterparty": {
      "type": "array",
      "items": {
        "type": "string",
        "minLength": 1
      },
      "minItems": 1,
      "description": "Filter by counterparty name (case-insensitive)"
    },
    "portfolioRef": {
      "type": "string",
      "minLength": 1,
      "description": "Portfolio name or slug inside that workspace. Call list_portfolios to resolve it."
    },
    "workspaceRef": {
      "type": "string",
      "minLength": 1,
      "description": "Workspace name or slug. Call list_workspaces to resolve it."
    },
    "operationType": {
      "type": "array",
      "items": {
        "enum": [
          "DEPOSIT_FIAT",
          "INCOME",
          "REFUND",
          "REBATE",
          "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,
      "description": "Filter by operation type, e.g. [\"UNCATEGORIZED\"]"
    },
    "transactionId": {
      "type": "string",
      "minLength": 1,
      "description": "Look up one transaction by handle instead of listing"
    },
    "walletAddress": {
      "type": "string",
      "minLength": 1,
      "description": "Public wallet address on the selected chain."
    },
    "defiPositionKey": {
      "type": "string",
      "minLength": 1,
      "description": "Filter by protocol-defined DeFi position key"
    },
    "hasJournalEntry": {
      "type": "boolean",
      "description": "true: has a non-empty journal entry; false: does not"
    },
    "defiPositionWalletAddress": {
      "type": "string",
      "minLength": 1,
      "description": "Filter by DeFi position wallet address"
    },
    "defiPositionWalletChainId": {
      "type": "string",
      "minLength": 1,
      "description": "Filter by DeFi position wallet chain ID"
    },
    "responsibilityCenterTypeKeys": {
      "type": "array",
      "items": {
        "type": "string",
        "pattern": "^[a-z0-9]+(_[a-z0-9]+)*$",
        "description": "Stable responsibility-center type key. It uses lowercase alphanumeric snake_case segments."
      },
      "minItems": 1,
      "description": "Filter by journal-line responsibility-center type key (e.g. primary, goal; from list_journal_line_assignment_options)"
    }
  },
  "additionalProperties": false
}
list_portfolio_transactions output schema
{
  "type": "object",
  "$defs": {
    "shared0": {
      "type": "object",
      "required": [
        "chainId",
        "address",
        "type"
      ],
      "properties": {
        "name": {
          "type": "string"
        },
        "type": {
          "enum": [
            "BLOCKCHAIN",
            "EXCHANGE",
            "BANK"
          ],
          "type": "string"
        },
        "address": {
          "type": "string"
        },
        "chainId": {
          "type": "string"
        }
      },
      "additionalProperties": false
    },
    "shared1": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/shared2"
      }
    },
    "shared2": {
      "type": "object",
      "required": [
        "txIndex",
        "type",
        "from",
        "to",
        "token",
        "value"
      ],
      "properties": {
        "to": {
          "$ref": "#/$defs/shared3"
        },
        "defi": {
          "$ref": "#/$defs/shared9"
        },
        "from": {
          "$ref": "#/$defs/shared3"
        },
        "type": {
          "enum": [
            "IN",
            "OUT",
            "GAS",
            "SELF"
          ],
          "type": "string"
        },
        "quote": {
          "$ref": "#/$defs/shared6"
        },
        "token": {
          "$ref": "#/$defs/shared4"
        },
        "value": {
          "type": "string",
          "pattern": "^-?\\d+(\\.\\d+)?$"
        },
        "txIndex": {
          "type": "integer",
          "maximum": 9007199254740991,
          "minimum": 0
        },
        "portfolioTransactionId": {
          "type": "string"
        }
      },
      "additionalProperties": false
    },
    "shared3": {
      "type": "object",
      "required": [
        "address"
      ],
      "properties": {
        "label": {
          "type": "string"
        },
        "address": {
          "type": "string"
        }
      },
      "additionalProperties": false
    },
    "shared4": {
      "type": "object",
      "required": [
        "chainId",
        "address",
        "assetId",
        "symbol",
        "type",
        "decimals",
        "isSpam"
      ],
      "properties": {
        "type": {
          "$ref": "#/$defs/shared5"
        },
        "isSpam": {
          "type": "boolean"
        },
        "symbol": {
          "type": "string"
        },
        "address": {
          "type": "string"
        },
        "assetId": {
          "type": "string"
        },
        "chainId": {
          "type": "string"
        },
        "decimals": {
          "type": "integer",
          "maximum": 9007199254740991,
          "minimum": 0
        },
        "representsTokenAddress": {
          "type": "string"
        },
        "stablecoinPeggedFiatCurrency": {
          "type": "string"
        }
      },
      "additionalProperties": false
    },
    "shared5": {
      "anyOf": [
        {
          "type": "string",
          "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"
        }
      ]
    },
    "shared6": {
      "type": "object",
      "properties": {
        "meta": {
          "$ref": "#/$defs/shared7"
        },
        "value": {
          "type": "string",
          "pattern": "^-?\\d+(\\.\\d+)?$"
        },
        "source": {
          "type": "string"
        },
        "currency": {
          "type": "string"
        }
      },
      "additionalProperties": false
    },
    "shared7": {
      "type": "object",
      "required": [
        "s"
      ],
      "properties": {
        "s": {
          "$ref": "#/$defs/shared8"
        },
        "ts": {
          "type": "integer",
          "maximum": 8210266876799,
          "minimum": 1
        }
      },
      "additionalProperties": false
    },
    "shared8": {
      "enum": [
        "SYNC_SOURCE",
        "FMV_ENGINE",
        "DERIVED_REPRESENTED",
        "DERIVED_SIBLING",
        "POLICY",
        "MANUAL"
      ],
      "type": "string"
    },
    "shared9": {
      "type": "object",
      "properties": {
        "operation": {
          "$ref": "#/$defs/shared10"
        },
        "tokenRole": {
          "$ref": "#/$defs/shared11"
        },
        "positionRef": {
          "type": "string"
        }
      },
      "additionalProperties": false
    },
    "shared10": {
      "anyOf": [
        {
          "type": "string",
          "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"
        }
      ]
    },
    "shared11": {
      "anyOf": [
        {
          "type": "string",
          "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"
        }
      ]
    },
    "shared12": {
      "type": "object",
      "required": [
        "state"
      ],
      "properties": {
        "state": {
          "enum": [
            "categorized",
            "uncategorized",
            "error"
          ],
          "type": "string"
        },
        "detail": {
          "type": "string"
        },
        "reason": {
          "type": "string"
        },
        "suggestedAction": {
          "$ref": "#/$defs/shared13"
        }
      },
      "additionalProperties": false
    },
    "shared13": {
      "type": "object",
      "required": [
        "description"
      ],
      "properties": {
        "tool": {
          "type": "string"
        },
        "description": {
          "type": "string"
        }
      },
      "additionalProperties": false
    },
    "shared14": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/shared15"
      }
    },
    "shared15": {
      "type": "object",
      "required": [
        "type",
        "txHash",
        "chainId",
        "txIndex",
        "walletTransactionId",
        "fromAddress",
        "toAddress",
        "value",
        "tokenAddress",
        "isSpam",
        "walletName",
        "walletAddress"
      ],
      "properties": {
        "type": {
          "type": "string"
        },
        "value": {
          "type": "string"
        },
        "isSpam": {
          "type": "boolean"
        },
        "txHash": {
          "type": "string"
        },
        "assetId": {
          "type": "string"
        },
        "chainId": {
          "type": "string"
        },
        "txIndex": {
          "type": "integer",
          "maximum": 9007199254740991,
          "minimum": -9007199254740991
        },
        "quoteMeta": {
          "$ref": "#/$defs/shared7"
        },
        "toAddress": {
          "type": "string"
        },
        "valueQuote": {
          "type": "string"
        },
        "walletName": {
          "type": "string"
        },
        "assetSymbol": {
          "type": "string"
        },
        "fromAddress": {
          "type": "string"
        },
        "quoteSource": {
          "type": "string"
        },
        "tokenAddress": {
          "type": "string"
        },
        "defiOperation": {
          "type": "string"
        },
        "quoteCurrency": {
          "type": "string"
        },
        "walletAddress": {
          "type": "string"
        },
        "defiPositionId": {
          "type": "string"
        },
        "toAddressLabel": {
          "type": "string"
        },
        "defiPositionRef": {
          "type": "string"
        },
        "fromAddressLabel": {
          "type": "string"
        },
        "walletTransactionId": {
          "type": "string"
        },
        "stablecoinPeggedFiatCurrency": {
          "type": "string"
        }
      },
      "additionalProperties": false
    },
    "shared16": {
      "type": "object",
      "required": [
        "wallet",
        "walletType",
        "rawTransactionId",
        "rawTransactionSource",
        "blockHeight",
        "timestamp"
      ],
      "properties": {
        "wallet": {
          "$ref": "#/$defs/shared17"
        },
        "timestamp": {
          "type": "string"
        },
        "walletType": {
          "enum": [
            "BLOCKCHAIN",
            "EXCHANGE",
            "BANK"
          ],
          "type": "string"
        },
        "blockHeight": {
          "type": "string"
        },
        "rawTransactionId": {
          "type": "string"
        },
        "rawTransactionSource": {
          "type": "string"
        }
      },
      "additionalProperties": false
    },
    "shared17": {
      "type": "object",
      "required": [
        "chainId",
        "address"
      ],
      "properties": {
        "address": {
          "type": "string"
        },
        "chainId": {
          "type": "string"
        }
      },
      "additionalProperties": false
    },
    "shared18": {
      "type": "object",
      "required": [
        "pairId",
        "side",
        "counterpartPortfolioName",
        "counterpartPortfolioSlug",
        "counterpartPortfolioTransactionId",
        "counterpartOperationType",
        "counterpartStatus",
        "lotLinkCount",
        "outputCompleteness"
      ],
      "properties": {
        "side": {
          "enum": [
            "SEND",
            "RECEIVE"
          ],
          "type": "string"
        },
        "pairId": {
          "type": "string"
        },
        "treatment": {
          "type": "string"
        },
        "lotLinkCount": {
          "type": "integer",
          "maximum": 9007199254740991,
          "minimum": 0
        },
        "counterpartStatus": {
          "enum": [
            "PROPOSED",
            "ERROR",
            "POSTED",
            "CLOSED"
          ],
          "type": "string"
        },
        "counterpartSubType": {
          "type": "string"
        },
        "outputCompleteness": {
          "$ref": "#/$defs/shared19"
        },
        "counterpartOperationType": {
          "type": "string"
        },
        "counterpartPortfolioName": {
          "type": "string"
        },
        "counterpartPortfolioSlug": {
          "type": "string",
          "pattern": "^[a-z0-9-]+$",
          "minLength": 1
        },
        "counterpartPortfolioTransactionId": {
          "type": "string"
        }
      },
      "additionalProperties": false
    },
    "shared19": {
      "oneOf": [
        {
          "$ref": "#/$defs/shared20"
        },
        {
          "$ref": "#/$defs/shared21"
        }
      ]
    },
    "shared20": {
      "type": "object",
      "required": [
        "kind",
        "reasons"
      ],
      "properties": {
        "kind": {
          "type": "string",
          "const": "COMPLETE"
        },
        "reasons": {
          "type": "array",
          "items": false,
          "maxItems": 0
        }
      },
      "additionalProperties": false
    },
    "shared21": {
      "type": "object",
      "required": [
        "kind",
        "reasons"
      ],
      "properties": {
        "kind": {
          "type": "string",
          "const": "INCOMPLETE"
        },
        "reasons": {
          "$ref": "#/$defs/shared22"
        }
      },
      "additionalProperties": false
    },
    "shared22": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/shared23"
      },
      "minItems": 1
    },
    "shared23": {
      "type": "object",
      "required": [
        "code",
        "message"
      ],
      "properties": {
        "code": {
          "$ref": "#/$defs/shared24"
        },
        "message": {
          "type": "string",
          "minLength": 1
        },
        "endpoint": {
          "enum": [
            "SEND",
            "RECEIVE"
          ],
          "type": "string"
        }
      },
      "additionalProperties": false
    },
    "shared24": {
      "enum": [
        "INVALID_ENDPOINT_ROLE",
        "UNSUPPORTED_TREATMENT",
        "TREATMENT_MISMATCH",
        "ENDPOINT_ERROR",
        "MISSING_JOURNAL",
        "MISSING_LINEAGE",
        "MISSING_DISPOSAL",
        "MISSING_ACQUISITION",
        "LOT_COUNT_MISMATCH"
      ],
      "type": "string"
    },
    "JournalEntryResponseDto": {
      "type": "object",
      "required": [
        "id",
        "timestamp",
        "status",
        "isAdjustment",
        "lines"
      ],
      "properties": {
        "id": {
          "type": "string"
        },
        "memo": {
          "type": "string"
        },
        "lines": {
          "type": "array",
          "items": {
            "type": "object",
            "required": [
              "lineNumber",
              "entryType",
              "fiatAmount",
              "responsibilityCenterAssignments"
            ],
            "properties": {
              "lot": {
                "type": "object",
                "required": [
                  "id",
                  "entryId",
                  "entryKind",
                  "lotMethod"
                ],
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "entryId": {
                    "type": "string"
                  },
                  "entryKind": {
                    "type": "string"
                  },
                  "lotMethod": {
                    "type": "string"
                  }
                },
                "additionalProperties": false
              },
              "memo": {
                "type": "string"
              },
              "assetId": {
                "type": "string"
              },
              "transfer": {
                "type": "object",
                "properties": {
                  "txHash": {
                    "type": "string"
                  },
                  "chainId": {
                    "type": "string"
                  },
                  "txIndex": {
                    "type": "integer",
                    "maximum": 9007199254740991,
                    "minimum": -9007199254740991
                  }
                },
                "additionalProperties": false
              },
              "entryType": {
                "type": "string"
              },
              "fiatAmount": {
                "type": "string"
              },
              "lineNumber": {
                "type": "integer",
                "maximum": 9007199254740991,
                "minimum": -9007199254740991
              },
              "accountName": {
                "type": "string"
              },
              "accountType": {
                "type": "string"
              },
              "assetAmount": {
                "type": "string"
              },
              "assetSymbol": {
                "type": "string"
              },
              "accountNumber": {
                "type": "string"
              },
              "accountSubType": {
                "type": "string"
              },
              "counterpartyName": {
                "type": "string"
              },
              "accountNormalBalanceType": {
                "type": "string"
              },
              "responsibilityCenterAssignments": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "responsibilityCenterTypeId",
                    "responsibilityCenterId",
                    "value",
                    "responsibilityCenterType",
                    "responsibilityCenterName",
                    "percentageBps"
                  ],
                  "properties": {
                    "value": {
                      "type": "string"
                    },
                    "percentageBps": {
                      "type": "integer",
                      "maximum": 9007199254740991,
                      "minimum": -9007199254740991
                    },
                    "responsibilityCenterId": {
                      "type": "string"
                    },
                    "responsibilityCenterCode": {
                      "type": "string"
                    },
                    "responsibilityCenterName": {
                      "type": "string"
                    },
                    "responsibilityCenterType": {
                      "type": "object",
                      "required": [
                        "key",
                        "name",
                        "kind"
                      ],
                      "properties": {
                        "key": {
                          "type": "string"
                        },
                        "kind": {
                          "enum": [
                            "COST",
                            "REVENUE",
                            "PROFIT",
                            "INVESTMENT"
                          ],
                          "type": "string"
                        },
                        "name": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": false
                    },
                    "responsibilityCenterTypeId": {
                      "type": "string"
                    }
                  },
                  "additionalProperties": false
                }
              }
            },
            "additionalProperties": false
          }
        },
        "status": {
          "type": "string"
        },
        "subType": {
          "type": "string"
        },
        "timestamp": {
          "type": "string"
        },
        "systemNotes": {
          "type": "string"
        },
        "isAdjustment": {
          "type": "boolean"
        },
        "operationType": {
          "type": "string"
        },
        "portfolioTransactionId": {
          "type": "string"
        },
        "adjustmentJournalImportProvenance": {
          "type": "object",
          "required": [
            "importRef",
            "sourceFile",
            "sourceRows"
          ],
          "properties": {
            "importRef": {
              "type": "string",
              "pattern": "^adjustment-journal-import-[a-z0-9-]+$",
              "maxLength": 128,
              "minLength": 1
            },
            "sourceFile": {
              "type": "object",
              "required": [
                "name",
                "uploadedAt",
                "uploader"
              ],
              "properties": {
                "name": {
                  "type": "string",
                  "minLength": 1
                },
                "uploader": {
                  "type": "object",
                  "required": [
                    "name"
                  ],
                  "properties": {
                    "name": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "additionalProperties": false
                },
                "uploadedAt": {
                  "type": "string",
                  "format": "date-time"
                }
              },
              "additionalProperties": false
            },
            "sourceRows": {
              "type": "array",
              "items": {
                "type": "object",
                "required": [
                  "appliedResolutions",
                  "entryId",
                  "journalLineNumber",
                  "locator",
                  "normalizedValues",
                  "sourceRowHash"
                ],
                "properties": {
                  "entryId": {
                    "type": "string",
                    "minLength": 1
                  },
                  "locator": {
                    "oneOf": [
                      {
                        "type": "object",
                        "required": [
                          "format",
                          "lineNumber"
                        ],
                        "properties": {
                          "format": {
                            "type": "string",
                            "const": "csv"
                          },
                          "lineNumber": {
                            "type": "integer",
                            "maximum": 9007199254740991,
                            "minimum": 1
                          }
                        },
                        "additionalProperties": false
                      },
                      {
                        "type": "object",
                        "required": [
                          "format",
                          "rowNumber",
                          "sheetName"
                        ],
                        "properties": {
                          "format": {
                            "type": "string",
                            "const": "xlsx"
                          },
                          "rowNumber": {
                            "type": "integer",
                            "maximum": 9007199254740991,
                            "minimum": 1
                          },
                          "sheetName": {
                            "type": "string",
                            "minLength": 1
                          }
                        },
                        "additionalProperties": false
                      }
                    ]
                  },
                  "sourceRowHash": {
                    "type": "string",
                    "minLength": 1
                  },
                  "normalizedValues": {
                    "anyOf": [
                      {
                        "type": "object",
                        "required": [
                          "schemaVersion",
                          "values"
                        ],
                        "properties": {
                          "values": {
                            "type": "object",
                            "propertyNames": {
                              "anyOf": [
                                {
                                  "enum": [
                                    "accountNumber",
                                    "amount",
                                    "counterpartyExternalId",
                                    "counterpartyName",
                                    "direction",
                                    "effectiveDate",
                                    "entryId",
                                    "memo"
                                  ],
                                  "type": "string"
                                },
                                {
                                  "type": "string",
                                  "pattern": "^responsibilityCenter:[a-z0-9]+(_[a-z0-9]+)*$"
                                }
                              ]
                            },
                            "additionalProperties": {
                              "type": [
                                "string",
                                "null"
                              ]
                            }
                          },
                          "schemaVersion": {
                            "type": "number",
                            "const": 1
                          }
                        },
                        "additionalProperties": false
                      },
                      {
                        "type": "object",
                        "required": [
                          "schemaVersion",
                          "values"
                        ],
                        "properties": {
                          "values": {
                            "type": "object",
                            "propertyNames": {
                              "anyOf": [
                                {
                                  "enum": [
                                    "accountNumber",
                                    "amount",
                                    "counterpartyExternalId",
                                    "counterpartyName",
                                    "direction",
                                    "effectiveAt",
                                    "effectiveDate",
                                    "entryId",
                                    "memo"
                                  ],
                                  "type": "string"
                                },
                                {
                                  "type": "string",
                                  "pattern": "^responsibilityCenter:[a-z0-9]+(_[a-z0-9]+)*$"
                                }
                              ]
                            },
                            "additionalProperties": {
                              "type": [
                                "string",
                                "null"
                              ]
                            }
                          },
                          "schemaVersion": {
                            "type": "number",
                            "const": 2
                          }
                        },
                        "additionalProperties": false
                      }
                    ]
                  },
                  "journalLineNumber": {
                    "type": "integer",
                    "maximum": 9007199254740991,
                    "minimum": 1
                  },
                  "appliedResolutions": {
                    "type": "object",
                    "required": [
                      "schemaVersion",
                      "values"
                    ],
                    "properties": {
                      "values": {
                        "type": "object",
                        "propertyNames": {
                          "anyOf": [
                            {
                              "enum": [
                                "accountNumber",
                                "counterpartyExternalId",
                                "counterpartyName"
                              ],
                              "type": "string"
                            },
                            {
                              "type": "string",
                              "pattern": "^responsibilityCenter:[a-z0-9]+(_[a-z0-9]+)*$"
                            }
                          ]
                        },
                        "additionalProperties": {
                          "type": "string",
                          "minLength": 1
                        }
                      },
                      "schemaVersion": {
                        "type": "number",
                        "const": 1
                      }
                    },
                    "additionalProperties": false
                  }
                },
                "additionalProperties": false
              },
              "minItems": 1
            }
          },
          "additionalProperties": false
        }
      },
      "additionalProperties": false
    },
    "RawTransactionCompleteDto": {
      "type": "object",
      "required": [
        "id",
        "wallet",
        "hash",
        "blockHeight",
        "timestamp",
        "processingState",
        "walletOperations"
      ],
      "properties": {
        "id": {
          "type": "string",
          "minLength": 1
        },
        "hash": {
          "type": "string"
        },
        "memo": {
          "type": "string"
        },
        "wallet": {
          "$ref": "#/$defs/shared0"
        },
        "timestamp": {
          "type": "string",
          "format": "date-time"
        },
        "blockHeight": {
          "type": "string",
          "pattern": "^\\d+$"
        },
        "processingState": {
          "enum": [
            "PROCESSED",
            "PARTIAL",
            "UNPROCESSED"
          ],
          "type": "string"
        },
        "walletOperations": {
          "$ref": "#/$defs/shared1"
        }
      },
      "additionalProperties": false
    },
    "RawTransactionWithDetailsDto__schema0": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "number"
        },
        {
          "type": "boolean"
        },
        {
          "type": "null"
        },
        {
          "type": "array",
          "items": {
            "$ref": "#/$defs/RawTransactionWithDetailsDto__schema0"
          }
        },
        {
          "type": "object",
          "propertyNames": {
            "type": "string"
          },
          "additionalProperties": {
            "$ref": "#/$defs/RawTransactionWithDetailsDto__schema0"
          }
        }
      ]
    }
  },
  "anyOf": [
    {
      "type": "object",
      "required": [
        "data",
        "pagination",
        "resultType"
      ],
      "properties": {
        "data": {
          "$ref": "#/properties/data"
        },
        "pagination": {
          "$ref": "#/properties/pagination"
        },
        "resultType": {
          "type": "string",
          "const": "transactionList"
        }
      },
      "additionalProperties": false
    },
    {
      "type": "object",
      "required": [
        "id",
        "operationType",
        "classification",
        "timestamp",
        "status",
        "tags",
        "fileAttachments",
        "walletOperations",
        "resultType"
      ],
      "properties": {
        "id": {
          "$ref": "#/properties/id"
        },
        "memo": {
          "$ref": "#/properties/memo"
        },
        "tags": {
          "$ref": "#/properties/tags"
        },
        "status": {
          "$ref": "#/properties/status"
        },
        "subType": {
          "$ref": "#/properties/subType"
        },
        "timestamp": {
          "$ref": "#/properties/timestamp"
        },
        "resultType": {
          "type": "string",
          "const": "transaction"
        },
        "systemNotes": {
          "$ref": "#/properties/systemNotes"
        },
        "errorDetails": {
          "$ref": "#/properties/errorDetails"
        },
        "errorMessage": {
          "$ref": "#/properties/errorMessage"
        },
        "journalEntry": {
          "$ref": "#/properties/journalEntry"
        },
        "walletSource": {
          "$ref": "#/properties/walletSource"
        },
        "operationType": {
          "$ref": "#/properties/operationType"
        },
        "classification": {
          "$ref": "#/properties/classification"
        },
        "fileAttachments": {
          "$ref": "#/properties/fileAttachments"
        },
        "rawTransactions": {
          "$ref": "#/properties/rawTransactions"
        },
        "intercompanyPair": {
          "$ref": "#/properties/intercompanyPair"
        },
        "walletOperations": {
          "$ref": "#/properties/walletOperations"
        },
        "portfolioTransactionContext": {
          "$ref": "#/properties/portfolioTransactionContext"
        }
      },
      "additionalProperties": false
    }
  ],
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "required": [
    "resultType"
  ],
  "properties": {
    "id": {
      "type": "string"
    },
    "data": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "id",
          "operationType",
          "classification",
          "timestamp",
          "status",
          "tags",
          "fileAttachments",
          "walletOperations"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "memo": {
            "type": "string"
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "status": {
            "type": "string"
          },
          "subType": {
            "type": "string"
          },
          "timestamp": {
            "type": "string"
          },
          "systemNotes": {
            "type": "string"
          },
          "errorDetails": {
            "type": "array",
            "items": {}
          },
          "errorMessage": {
            "type": "string"
          },
          "journalEntry": {
            "$ref": "#/$defs/JournalEntryResponseDto"
          },
          "walletSource": {
            "$ref": "#/$defs/shared16"
          },
          "operationType": {
            "type": "string"
          },
          "classification": {
            "$ref": "#/$defs/shared12"
          },
          "fileAttachments": {
            "type": "array",
            "items": {}
          },
          "rawTransactions": {
            "type": "array",
            "items": {
              "$ref": "#/$defs/RawTransactionCompleteDto"
            }
          },
          "intercompanyPair": {
            "$ref": "#/$defs/shared18"
          },
          "walletOperations": {
            "$ref": "#/$defs/shared14"
          },
          "portfolioTransactionContext": {
            "type": "object",
            "propertyNames": {
              "type": "string"
            },
            "additionalProperties": {}
          }
        },
        "additionalProperties": false
      }
    },
    "memo": {
      "type": "string"
    },
    "tags": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "status": {
      "type": "string"
    },
    "subType": {
      "type": "string"
    },
    "timestamp": {
      "type": "string"
    },
    "pagination": {
      "type": "object",
      "required": [
        "pageSize"
      ],
      "properties": {
        "pageSize": {
          "type": "integer",
          "maximum": 9007199254740991,
          "minimum": 1
        },
        "nextPageToken": {
          "type": "string",
          "minLength": 1
        }
      },
      "additionalProperties": false
    },
    "resultType": {
      "enum": [
        "transactionList",
        "transaction"
      ],
      "type": "string"
    },
    "systemNotes": {
      "type": "string"
    },
    "errorDetails": {
      "type": "array",
      "items": {}
    },
    "errorMessage": {
      "type": "string"
    },
    "journalEntry": {
      "$ref": "#/$defs/JournalEntryResponseDto"
    },
    "walletSource": {
      "type": "object",
      "required": [
        "wallet",
        "walletType",
        "rawTransactionId",
        "rawTransactionSource",
        "blockHeight",
        "timestamp"
      ],
      "properties": {
        "wallet": {
          "$ref": "#/$defs/shared17"
        },
        "timestamp": {
          "type": "string"
        },
        "walletType": {
          "enum": [
            "BLOCKCHAIN",
            "EXCHANGE",
            "BANK"
          ],
          "type": "string"
        },
        "blockHeight": {
          "type": "string"
        },
        "rawTransactionId": {
          "type": "string"
        },
        "rawTransactionSource": {
          "type": "string"
        }
      },
      "additionalProperties": false
    },
    "operationType": {
      "type": "string"
    },
    "classification": {
      "type": "object",
      "required": [
        "state"
      ],
      "properties": {
        "state": {
          "enum": [
            "categorized",
            "uncategorized",
            "error"
          ],
          "type": "string"
        },
        "detail": {
          "type": "string"
        },
        "reason": {
          "type": "string"
        },
        "suggestedAction": {
          "$ref": "#/$defs/shared13"
        }
      },
      "additionalProperties": false
    },
    "fileAttachments": {
      "type": "array",
      "items": {}
    },
    "rawTransactions": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "id",
          "wallet",
          "hash",
          "blockHeight",
          "timestamp",
          "processingState",
          "walletOperations"
        ],
        "properties": {
          "id": {
            "type": "string",
            "minLength": 1
          },
          "hash": {
            "type": "string"
          },
          "memo": {
            "type": "string"
          },
          "wallet": {
            "$ref": "#/$defs/shared0"
          },
          "details": {
            "$ref": "#/$defs/RawTransactionWithDetailsDto__schema0"
          },
          "timestamp": {
            "type": "string",
            "format": "date-time"
          },
          "blockHeight": {
            "type": "string",
            "pattern": "^\\d+$"
          },
          "processingState": {
            "enum": [
              "PROCESSED",
              "PARTIAL",
              "UNPROCESSED"
            ],
            "type": "string"
          },
          "walletOperations": {
            "$ref": "#/$defs/shared1"
          }
        },
        "additionalProperties": false
      }
    },
    "intercompanyPair": {
      "type": "object",
      "required": [
        "pairId",
        "side",
        "counterpartPortfolioName",
        "counterpartPortfolioSlug",
        "counterpartPortfolioTransactionId",
        "counterpartOperationType",
        "counterpartStatus",
        "lotLinkCount",
        "outputCompleteness"
      ],
      "properties": {
        "side": {
          "enum": [
            "SEND",
            "RECEIVE"
          ],
          "type": "string"
        },
        "pairId": {
          "type": "string"
        },
        "treatment": {
          "type": "string"
        },
        "lotLinkCount": {
          "type": "integer",
          "maximum": 9007199254740991,
          "minimum": 0
        },
        "counterpartStatus": {
          "enum": [
            "PROPOSED",
            "ERROR",
            "POSTED",
            "CLOSED"
          ],
          "type": "string"
        },
        "counterpartSubType": {
          "type": "string"
        },
        "outputCompleteness": {
          "$ref": "#/$defs/shared19"
        },
        "counterpartOperationType": {
          "type": "string"
        },
        "counterpartPortfolioName": {
          "type": "string"
        },
        "counterpartPortfolioSlug": {
          "type": "string",
          "pattern": "^[a-z0-9-]+$",
          "minLength": 1
        },
        "counterpartPortfolioTransactionId": {
          "type": "string"
        }
      },
      "additionalProperties": false
    },
    "walletOperations": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/shared15"
      }
    },
    "portfolioTransactionContext": {
      "type": "object",
      "propertyNames": {
        "type": "string"
      },
      "additionalProperties": {}
    }
  },
  "additionalProperties": false
}
list_portfolio_transactions annotations
{
  "title": "List Portfolio Transactions",
  "readOnlyHint": true,
  "openWorldHint": false,
  "idempotentHint": true,
  "destructiveHint": false
}
list_raw_transactions — List Raw Transactions
Advertised by the server during the last successful anonymous check.
Advertised read-only

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).

list_raw_transactions input schema
{
  "type": "object",
  "required": [
    "workspaceRef",
    "portfolioRef"
  ],
  "properties": {
    "sort": {
      "enum": [
        "timestamp",
        "-timestamp"
      ],
      "type": "string",
      "default": "-timestamp",
      "description": "Timestamp order. Use timestamp for ascending or -timestamp for descending; defaults to -timestamp."
    },
    "limit": {
      "anyOf": [
        {
          "type": "integer",
          "maximum": 100,
          "minimum": 1,
          "description": "Maximum raw transaction summaries to return, maximum 100."
        },
        {
          "type": "string",
          "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)$",
          "description": "Maximum raw transaction summaries to return, maximum 100. Numeric strings are accepted for MCP client compatibility."
        }
      ],
      "description": "Maximum raw transaction summaries to return, maximum 100."
    },
    "toDate": {
      "anyOf": [
        {
          "type": "string",
          "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",
          "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(?:Z))$"
        }
      ],
      "description": "Latest transaction timestamp to include, as an ISO 8601 datetime."
    },
    "txHash": {
      "type": "string",
      "description": "Exact on-chain transaction hash."
    },
    "chainId": {
      "type": "string",
      "minLength": 1,
      "description": "Blockchain to filter by, such as eth-mainnet. Call list_chains for the supported set."
    },
    "chainIds": {
      "type": "array",
      "items": {
        "type": "string",
        "minLength": 1
      },
      "description": "Blockchains to filter by, such as eth-mainnet. Call list_chains for the supported set."
    },
    "fromDate": {
      "anyOf": [
        {
          "type": "string",
          "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",
          "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(?:Z))$"
        }
      ],
      "description": "Earliest transaction timestamp to include, as an ISO 8601 datetime."
    },
    "pageToken": {
      "type": "string",
      "minLength": 1,
      "description": "Opaque token returned by the previous list response."
    },
    "portfolioRef": {
      "type": "string",
      "minLength": 1,
      "description": "Portfolio name or slug inside that workspace. Call list_portfolios to resolve it."
    },
    "workspaceRef": {
      "type": "string",
      "minLength": 1,
      "description": "Workspace name or slug. Call list_workspaces to resolve it."
    },
    "walletAddress": {
      "type": "string",
      "minLength": 1,
      "description": "Wallet to filter by. Supply chainId alongside it."
    },
    "includeDetails": {
      "type": "boolean",
      "default": false,
      "description": "With rawTransactionId, also return blockchain event logs and decoded contract calls"
    },
    "processingState": {
      "enum": [
        "PROCESSED",
        "PARTIAL",
        "UNPROCESSED"
      ],
      "type": "string",
      "description": "Keep only source transactions in this processing state."
    },
    "rawTransactionId": {
      "type": "string",
      "minLength": 1,
      "description": "Look up one source transaction by handle instead of listing"
    },
    "includeSpamTokens": {
      "type": "boolean",
      "default": false,
      "description": "Include transactions whose operations contain only spam tokens; defaults to false."
    }
  },
  "additionalProperties": false
}
list_raw_transactions output schema
{
  "type": "object",
  "$defs": {
    "RawTransactionWithDetailsDto__schema0": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "number"
        },
        {
          "type": "boolean"
        },
        {
          "type": "null"
        },
        {
          "type": "array",
          "items": {
            "$ref": "#/$defs/RawTransactionWithDetailsDto__schema0"
          }
        },
        {
          "type": "object",
          "propertyNames": {
            "type": "string"
          },
          "additionalProperties": {
            "$ref": "#/$defs/RawTransactionWithDetailsDto__schema0"
          }
        }
      ]
    }
  },
  "anyOf": [
    {
      "type": "object",
      "required": [
        "data",
        "pagination",
        "resultType"
      ],
      "properties": {
        "data": {
          "$ref": "#/properties/data"
        },
        "pagination": {
          "$ref": "#/properties/pagination"
        },
        "resultType": {
          "type": "string",
          "const": "rawTransactionList"
        }
      },
      "additionalProperties": false
    },
    {
      "type": "object",
      "required": [
        "id",
        "wallet",
        "hash",
        "blockHeight",
        "timestamp",
        "processingState",
        "walletOperations",
        "resultType"
      ],
      "properties": {
        "id": {
          "$ref": "#/properties/id"
        },
        "hash": {
          "$ref": "#/properties/hash"
        },
        "memo": {
          "$ref": "#/properties/memo"
        },
        "wallet": {
          "$ref": "#/properties/wallet"
        },
        "details": {
          "$ref": "#/properties/details"
        },
        "timestamp": {
          "$ref": "#/properties/timestamp"
        },
        "resultType": {
          "type": "string",
          "const": "rawTransaction"
        },
        "blockHeight": {
          "$ref": "#/properties/blockHeight"
        },
        "processingState": {
          "$ref": "#/properties/processingState"
        },
        "walletOperations": {
          "$ref": "#/properties/walletOperations"
        }
      },
      "additionalProperties": false
    }
  ],
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "required": [
    "resultType"
  ],
  "properties": {
    "id": {
      "type": "string",
      "minLength": 1
    },
    "data": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "id",
          "wallet",
          "hash",
          "blockHeight",
          "timestamp",
          "processingState"
        ],
        "properties": {
          "id": {
            "type": "string",
            "minLength": 1
          },
          "hash": {
            "type": "string"
          },
          "memo": {
            "type": "string"
          },
          "wallet": {
            "type": "object",
            "required": [
              "chainId",
              "address",
              "type"
            ],
            "properties": {
              "name": {
                "type": "string"
              },
              "type": {
                "enum": [
                  "BLOCKCHAIN",
                  "EXCHANGE",
                  "BANK"
                ],
                "type": "string"
              },
              "address": {
                "type": "string"
              },
              "chainId": {
                "type": "string"
              }
            },
            "additionalProperties": false
          },
          "timestamp": {
            "type": "string",
            "format": "date-time"
          },
          "blockHeight": {
            "type": "string",
            "pattern": "^\\d+$"
          },
          "processingState": {
            "enum": [
              "PROCESSED",
              "PARTIAL",
              "UNPROCESSED"
            ],
            "type": "string"
          }
        },
        "additionalProperties": false
      }
    },
    "hash": {
      "type": "string"
    },
    "memo": {
      "type": "string"
    },
    "wallet": {
      "type": "object",
      "required": [
        "chainId",
        "address",
        "type"
      ],
      "properties": {
        "name": {
          "type": "string"
        },
        "type": {
          "enum": [
            "BLOCKCHAIN",
            "EXCHANGE",
            "BANK"
          ],
          "type": "string"
        },
        "address": {
          "type": "string"
        },
        "chainId": {
          "type": "string"
        }
      },
      "additionalProperties": false
    },
    "details": {
      "$ref": "#/$defs/RawTransactionWithDetailsDto__schema0"
    },
    "timestamp": {
      "type": "string",
      "format": "date-time"
    },
    "pagination": {
      "type": "object",
      "required": [
        "pageSize"
      ],
      "properties": {
        "pageSize": {
          "type": "integer",
          "maximum": 9007199254740991,
          "minimum": 1
        },
        "nextPageToken": {
          "type": "string",
          "minLength": 1
        }
      },
      "additionalProperties": false
    },
    "resultType": {
      "enum": [
        "rawTransactionList",
        "rawTransaction"
      ],
      "type": "string"
    },
    "blockHeight": {
      "type": "string",
      "pattern": "^\\d+$"
    },
    "processingState": {
      "enum": [
        "PROCESSED",
        "PARTIAL",
        "UNPROCESSED"
      ],
      "type": "string"
    },
    "walletOperations": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "txIndex",
          "type",
          "from",
          "to",
          "token",
          "value"
        ],
        "properties": {
          "to": {
            "type": "object",
            "required": [
              "address"
            ],
            "properties": {
              "label": {
                "type": "string"
              },
              "address": {
                "type": "string"
              }
            },
            "additionalProperties": false
          },
          "defi": {
            "type": "object",
            "properties": {
              "operation": {
                "anyOf": [
                  {
                    "type": "string",
                    "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"
                  }
                ]
              },
              "tokenRole": {
                "anyOf": [
                  {
                    "type": "string",
                    "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"
                  }
                ]
              },
              "positionRef": {
                "type": "string"
              }
            },
            "additionalProperties": false
          },
          "from": {
            "type": "object",
            "required": [
              "address"
            ],
            "properties": {
              "label": {
                "type": "string"
              },
              "address": {
                "type": "string"
              }
            },
            "additionalProperties": false
          },
          "type": {
            "enum": [
              "IN",
              "OUT",
              "GAS",
              "SELF"
            ],
            "type": "string"
          },
          "quote": {
            "type": "object",
            "properties": {
              "meta": {
                "type": "object",
                "required": [
                  "s"
                ],
                "properties": {
                  "s": {
                    "enum": [
                      "SYNC_SOURCE",
                      "FMV_ENGINE",
                      "DERIVED_REPRESENTED",
                      "DERIVED_SIBLING",
                      "POLICY",
                      "MANUAL"
                    ],
                    "type": "string"
                  },
                  "ts": {
                    "type": "integer",
                    "maximum": 8210266876799,
                    "minimum": 1
                  }
                },
                "additionalProperties": false
              },
              "value": {
                "type": "string",
                "pattern": "^-?\\d+(\\.\\d+)?$"
              },
              "source": {
                "type": "string"
              },
              "currency": {
                "type": "string"
              }
            },
            "additionalProperties": false
          },
          "token": {
            "type": "object",
            "required": [
              "chainId",
              "address",
              "assetId",
              "symbol",
              "type",
              "decimals",
              "isSpam"
            ],
            "properties": {
              "type": {
                "anyOf": [
                  {
                    "type": "string",
                    "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"
                  }
                ]
              },
              "isSpam": {
                "type": "boolean"
              },
              "symbol": {
                "type": "string"
              },
              "address": {
                "type": "string"
              },
              "assetId": {
                "type": "string"
              },
              "chainId": {
                "type": "string"
              },
              "decimals": {
                "type": "integer",
                "maximum": 9007199254740991,
                "minimum": 0
              },
              "representsTokenAddress": {
                "type": "string"
              },
              "stablecoinPeggedFiatCurrency": {
                "type": "string"
              }
            },
            "additionalProperties": false
          },
          "value": {
            "type": "string",
            "pattern": "^-?\\d+(\\.\\d+)?$"
          },
          "txIndex": {
            "type": "integer",
            "maximum": 9007199254740991,
            "minimum": 0
          },
          "portfolioTransactionId": {
            "type": "string"
          }
        },
        "additionalProperties": false
      }
    }
  },
  "additionalProperties": false
}
list_raw_transactions annotations
{
  "title": "List Raw Transactions",
  "readOnlyHint": true,
  "openWorldHint": false,
  "idempotentHint": true,
  "destructiveHint": false
}
get_filter_options — Get Filter Options
Advertised by the server during the last successful anonymous check.
Advertised read-only

List the available values for one portfolio filter—such as accounts, wallets, assets, transaction status, or warnings—before building a filtered query.

get_filter_options input schema
{
  "type": "object",
  "required": [
    "workspaceRef",
    "portfolioRef",
    "filterName"
  ],
  "properties": {
    "mode": {
      "enum": [
        "from",
        "to"
      ],
      "type": "string",
      "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."
    },
    "filter": {
      "type": "string",
      "maxLength": 4000,
      "description": "Human-readable Portfolio Transactions filter expression. Only for filterName portfolio-transaction-status-counts."
    },
    "isSpam": {
      "type": "boolean",
      "description": "Filter assets by effective portfolio spam classification, including portfolio token preferences. Selected-value hydration retains its classification metadata. Only for filterName portfolio-transaction-assets."
    },
    "search": {
      "type": "string",
      "description": "Optional case-insensitive text search applied by the provider to labels, addresses, names, or other provider-owned searchable fields. Not for filterName capital-gains-assets, income-expense-assets, accounts, portfolio-transaction-period, payment-request-coding."
    },
    "pageSize": {
      "type": "integer",
      "default": 50,
      "maximum": 9007199254740991,
      "minimum": 1,
      "description": "Requested number of resources to return. Oversized values are clamped to the route limit. Not for filterName capital-gains-assets, income-expense-assets, accounts, portfolio-transaction-period, payment-request-coding."
    },
    "selected": {
      "anyOf": [
        {
          "type": "string",
          "minLength": 1,
          "description": "Stable option value that is already selected in the FilterBar. Example: from:eth-mainnet:0xabc."
        },
        {
          "type": "array",
          "items": {
            "type": "string",
            "minLength": 1,
            "description": "Stable option value that is already selected in the FilterBar. Example: from:eth-mainnet:0xabc."
          }
        }
      ],
      "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 capital-gains-assets, income-expense-assets, accounts, portfolio-transaction-period, payment-request-coding."
    },
    "pageToken": {
      "type": "string",
      "minLength": 1,
      "description": "Opaque token returned by the previous list response. Not for filterName capital-gains-assets, income-expense-assets, accounts, portfolio-transaction-period, payment-request-coding."
    },
    "filterName": {
      "enum": [
        "income-expense-subtypes",
        "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",
        "raw-transaction-processing-states",
        "capital-gains-assets",
        "income-expense-assets",
        "accounts",
        "portfolio-transaction-period",
        "payment-request-coding"
      ],
      "type": "string",
      "description": "Public filter option provider name."
    },
    "reportType": {
      "enum": [
        "profit-and-loss",
        "income-expense"
      ],
      "type": "string",
      "description": "Count effective counterparties from this report, including address matches. Omit to count stored journal assignments for portfolio transactions. Only for filterName portfolio-transaction-counterparties."
    },
    "portfolioRef": {
      "type": "string",
      "minLength": 1,
      "description": "Portfolio name or slug inside that workspace. Call list_portfolios to resolve it."
    },
    "workspaceRef": {
      "type": "string",
      "minLength": 1,
      "description": "Workspace name or slug. Call list_workspaces to resolve it."
    }
  },
  "description": "Flattened filter options request schema for all registered filter providers.",
  "additionalProperties": false
}
get_filter_options output schema
{
  "type": "object",
  "$defs": {
    "shared0": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/shared1"
      }
    },
    "shared1": {
      "oneOf": [
        {
          "$ref": "#/$defs/shared2"
        },
        {
          "$ref": "#/$defs/shared3"
        },
        {
          "$ref": "#/$defs/shared18"
        },
        {
          "$ref": "#/$defs/shared20"
        },
        {
          "$ref": "#/$defs/shared21"
        },
        {
          "$ref": "#/$defs/shared22"
        },
        {
          "$ref": "#/$defs/shared23"
        },
        {
          "$ref": "#/$defs/shared24"
        },
        {
          "$ref": "#/$defs/shared25"
        },
        {
          "$ref": "#/$defs/shared26"
        },
        {
          "$ref": "#/$defs/shared27"
        },
        {
          "$ref": "#/$defs/shared28"
        }
      ]
    },
    "shared2": {
      "type": "object",
      "required": [
        "optionKind",
        "value",
        "label"
      ],
      "properties": {
        "label": {
          "type": "string",
          "minLength": 1
        },
        "value": {
          "type": "string",
          "minLength": 1
        },
        "optionKind": {
          "type": "string",
          "const": "incomeExpenseSubtype"
        }
      },
      "additionalProperties": false
    },
    "shared3": {
      "type": "object",
      "required": [
        "optionKind",
        "value",
        "label",
        "transfersCount",
        "identity"
      ],
      "properties": {
        "label": {
          "type": "string",
          "minLength": 1
        },
        "value": {
          "type": "string",
          "minLength": 1
        },
        "metrics": {
          "$ref": "#/$defs/shared13"
        },
        "identity": {
          "$ref": "#/$defs/shared4"
        },
        "optionKind": {
          "type": "string",
          "const": "portfolioTransactionAddress"
        },
        "transfersCount": {
          "type": "integer",
          "maximum": 9007199254740991,
          "minimum": 0
        }
      },
      "additionalProperties": false
    },
    "shared4": {
      "oneOf": [
        {
          "$ref": "#/$defs/shared5"
        },
        {
          "$ref": "#/$defs/shared6"
        },
        {
          "$ref": "#/$defs/shared7"
        },
        {
          "$ref": "#/$defs/shared11"
        },
        {
          "$ref": "#/$defs/shared12"
        }
      ]
    },
    "shared5": {
      "type": "object",
      "required": [
        "category",
        "address"
      ],
      "properties": {
        "address": {
          "type": "string",
          "minLength": 1
        },
        "chainId": {
          "type": "string",
          "minLength": 1
        },
        "category": {
          "type": "string",
          "const": "counterparty"
        },
        "chainName": {
          "type": "string",
          "minLength": 1
        }
      },
      "additionalProperties": false
    },
    "shared6": {
      "type": "object",
      "required": [
        "category",
        "address",
        "addressBookItemType"
      ],
      "properties": {
        "address": {
          "type": "string",
          "minLength": 1
        },
        "category": {
          "type": "string",
          "const": "addressBook"
        },
        "addressBookItemType": {
          "enum": [
            "CUSTOMER",
            "VENDOR",
            "EMPLOYEE",
            "OTHER"
          ],
          "type": "string"
        }
      },
      "additionalProperties": false
    },
    "shared7": {
      "type": "object",
      "required": [
        "category",
        "address",
        "walletName",
        "walletType",
        "childAddresses"
      ],
      "properties": {
        "address": {
          "type": "string",
          "minLength": 1
        },
        "chainId": {
          "type": "string",
          "minLength": 1
        },
        "category": {
          "type": "string",
          "const": "wallet"
        },
        "chainName": {
          "type": "string",
          "minLength": 1
        },
        "walletName": {
          "type": "string"
        },
        "walletType": {
          "enum": [
            "BLOCKCHAIN",
            "EXCHANGE",
            "BANK"
          ],
          "type": "string"
        },
        "childAddresses": {
          "$ref": "#/$defs/shared9"
        },
        "walletOwnerPortfolio": {
          "$ref": "#/$defs/shared8"
        }
      },
      "additionalProperties": false
    },
    "shared8": {
      "type": "object",
      "required": [
        "slug",
        "name"
      ],
      "properties": {
        "name": {
          "type": "string",
          "minLength": 1
        },
        "slug": {
          "type": "string",
          "pattern": "^[a-z0-9-]+$",
          "minLength": 1
        }
      },
      "additionalProperties": false
    },
    "shared9": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/shared10"
      }
    },
    "shared10": {
      "type": "object",
      "required": [
        "address",
        "chainId"
      ],
      "properties": {
        "address": {
          "type": "string",
          "minLength": 1
        },
        "chainId": {
          "type": "string",
          "minLength": 1
        }
      },
      "additionalProperties": false
    },
    "shared11": {
      "type": "object",
      "required": [
        "category",
        "address"
      ],
      "properties": {
        "address": {
          "type": "string",
          "minLength": 1
        },
        "chainId": {
          "type": "string",
          "minLength": 1
        },
        "category": {
          "type": "string",
          "const": "raw"
        },
        "chainName": {
          "type": "string",
          "minLength": 1
        }
      },
      "additionalProperties": false
    },
    "shared12": {
      "type": "object",
      "required": [
        "category"
      ],
      "properties": {
        "category": {
          "type": "string",
          "const": "unlabelled"
        }
      },
      "additionalProperties": false
    },
    "shared13": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/shared14"
      }
    },
    "shared14": {
      "oneOf": [
        {
          "$ref": "#/$defs/shared15"
        },
        {
          "$ref": "#/$defs/shared16"
        },
        {
          "$ref": "#/$defs/shared17"
        }
      ]
    },
    "shared15": {
      "type": "object",
      "required": [
        "metricKind",
        "value",
        "unit"
      ],
      "properties": {
        "unit": {
          "type": "string"
        },
        "value": {
          "type": "string"
        },
        "metricKind": {
          "type": "string",
          "const": "count"
        }
      },
      "additionalProperties": false
    },
    "shared16": {
      "type": "object",
      "required": [
        "metricKind",
        "value",
        "currency"
      ],
      "properties": {
        "value": {
          "type": "string"
        },
        "currency": {
          "type": "string"
        },
        "metricKind": {
          "type": "string",
          "const": "money"
        }
      },
      "additionalProperties": false
    },
    "shared17": {
      "type": "object",
      "required": [
        "metricKind",
        "value",
        "unit"
      ],
      "properties": {
        "unit": {
          "type": "string",
          "const": "%"
        },
        "value": {
          "type": "string"
        },
        "metricKind": {
          "type": "string",
          "const": "percentage"
        }
      },
      "additionalProperties": false
    },
    "shared18": {
      "type": "object",
      "required": [
        "optionKind",
        "value",
        "label",
        "accountNumber",
        "name",
        "accountType",
        "subType",
        "currency",
        "transactionCount",
        "metrics"
      ],
      "properties": {
        "name": {
          "type": "string",
          "minLength": 1
        },
        "label": {
          "type": "string",
          "minLength": 1
        },
        "value": {
          "type": "string",
          "minLength": 1
        },
        "assetId": {
          "type": "string",
          "minLength": 1
        },
        "metrics": {
          "$ref": "#/$defs/shared19"
        },
        "subType": {
          "type": "string",
          "minLength": 1
        },
        "currency": {
          "type": "string",
          "minLength": 1
        },
        "optionKind": {
          "type": "string",
          "const": "portfolioTransactionAccountName"
        },
        "accountType": {
          "enum": [
            "ASSET",
            "LIABILITY",
            "EQUITY",
            "INCOME",
            "EXPENSE"
          ],
          "type": "string"
        },
        "accountNumber": {
          "type": "string",
          "minLength": 1
        },
        "transactionCount": {
          "type": "integer",
          "maximum": 9007199254740991,
          "minimum": 0
        }
      },
      "additionalProperties": false
    },
    "shared19": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/shared14"
      },
      "minItems": 1
    },
    "shared20": {
      "type": "object",
      "required": [
        "optionKind",
        "value",
        "assetId",
        "symbol",
        "name",
        "totalValue",
        "quoteCurrency",
        "isSpam",
        "metrics"
      ],
      "properties": {
        "name": {
          "type": "string",
          "minLength": 1
        },
        "value": {
          "type": "string",
          "minLength": 1
        },
        "isSpam": {
          "type": "boolean"
        },
        "symbol": {
          "type": "string",
          "minLength": 1
        },
        "assetId": {
          "type": "string",
          "minLength": 1
        },
        "metrics": {
          "$ref": "#/$defs/shared13"
        },
        "optionKind": {
          "type": "string",
          "const": "portfolioTransactionAsset"
        },
        "totalValue": {
          "type": "string",
          "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$"
        },
        "quoteCurrency": {
          "type": "string",
          "minLength": 1
        }
      },
      "additionalProperties": false
    },
    "shared21": {
      "type": "object",
      "required": [
        "optionKind",
        "value",
        "label",
        "name",
        "counterpartyId",
        "lineCount",
        "metrics"
      ],
      "properties": {
        "name": {
          "type": "string",
          "minLength": 1
        },
        "label": {
          "type": "string",
          "minLength": 1
        },
        "value": {
          "type": "string",
          "minLength": 1
        },
        "metrics": {
          "$ref": "#/$defs/shared19"
        },
        "lineCount": {
          "type": "integer",
          "maximum": 9007199254740991,
          "minimum": 0
        },
        "optionKind": {
          "type": "string",
          "const": "portfolioTransactionCounterparty"
        },
        "counterpartyId": {
          "type": "string",
          "minLength": 1
        }
      },
      "additionalProperties": false
    },
    "shared22": {
      "type": "object",
      "required": [
        "optionKind",
        "value",
        "chainId",
        "address",
        "displayName",
        "chainName",
        "walletType",
        "operationsCount",
        "tokenCount",
        "isBalanceMatch"
      ],
      "properties": {
        "value": {
          "type": "string",
          "minLength": 1
        },
        "address": {
          "type": "string",
          "minLength": 1
        },
        "chainId": {
          "type": "string",
          "minLength": 1
        },
        "metrics": {
          "$ref": "#/$defs/shared13"
        },
        "chainName": {
          "type": "string",
          "minLength": 1
        },
        "optionKind": {
          "type": "string",
          "const": "portfolioTransactionWallet"
        },
        "tokenCount": {
          "type": "integer",
          "maximum": 9007199254740991,
          "minimum": 0
        },
        "valueQuote": {
          "type": "string",
          "minLength": 1
        },
        "walletType": {
          "enum": [
            "BLOCKCHAIN",
            "EXCHANGE",
            "BANK"
          ],
          "type": "string"
        },
        "displayName": {
          "type": "string",
          "minLength": 1
        },
        "isBalanceMatch": {
          "type": "boolean"
        },
        "operationsCount": {
          "type": "integer",
          "maximum": 9007199254740991,
          "minimum": 0
        },
        "lastTransactionTimestamp": {
          "type": "string",
          "format": "date-time"
        }
      },
      "additionalProperties": false
    },
    "shared23": {
      "type": "object",
      "required": [
        "optionKind",
        "value",
        "label",
        "responsibilityCenterName",
        "responsibilityCenterTypeKey",
        "responsibilityCenterTypeName",
        "responsibilityCenterKind",
        "transactionCount",
        "metrics"
      ],
      "properties": {
        "label": {
          "type": "string",
          "minLength": 1
        },
        "value": {
          "type": "string",
          "minLength": 1
        },
        "metrics": {
          "$ref": "#/$defs/shared19"
        },
        "optionKind": {
          "type": "string",
          "const": "portfolioTransactionResponsibilityCenter"
        },
        "transactionCount": {
          "type": "integer",
          "maximum": 9007199254740991,
          "minimum": 0
        },
        "responsibilityCenterCode": {
          "type": "string",
          "minLength": 1
        },
        "responsibilityCenterKind": {
          "enum": [
            "COST",
            "REVENUE",
            "PROFIT",
            "INVESTMENT"
          ],
          "type": "string"
        },
        "responsibilityCenterName": {
          "type": "string",
          "minLength": 1
        },
        "responsibilityCenterTypeKey": {
          "type": "string",
          "pattern": "^[a-z0-9]+(_[a-z0-9]+)*$"
        },
        "responsibilityCenterTypeName": {
          "type": "string",
          "minLength": 1
        }
      },
      "additionalProperties": false
    },
    "shared24": {
      "type": "object",
      "required": [
        "optionKind",
        "value",
        "label",
        "transactionCount",
        "metrics"
      ],
      "properties": {
        "label": {
          "type": "string",
          "minLength": 1
        },
        "value": {
          "enum": [
            "withLots",
            "withoutLots"
          ],
          "type": "string"
        },
        "metrics": {
          "$ref": "#/$defs/shared13"
        },
        "optionKind": {
          "type": "string",
          "const": "portfolioTransactionLotPresence"
        },
        "transactionCount": {
          "type": "integer",
          "maximum": 9007199254740991,
          "minimum": 0
        }
      },
      "additionalProperties": false
    },
    "shared25": {
      "type": "object",
      "required": [
        "optionKind",
        "value",
        "label",
        "transactionCount",
        "metrics"
      ],
      "properties": {
        "label": {
          "type": "string",
          "minLength": 1
        },
        "value": {
          "enum": [
            "withJournalEntries",
            "withoutJournalEntries"
          ],
          "type": "string"
        },
        "metrics": {
          "$ref": "#/$defs/shared13"
        },
        "optionKind": {
          "type": "string",
          "const": "portfolioTransactionJournalEntryPresence"
        },
        "transactionCount": {
          "type": "integer",
          "maximum": 9007199254740991,
          "minimum": 0
        }
      },
      "additionalProperties": false
    },
    "shared26": {
      "type": "object",
      "required": [
        "optionKind",
        "value",
        "label",
        "transactionCount",
        "metrics"
      ],
      "properties": {
        "label": {
          "type": "string",
          "minLength": 1
        },
        "value": {
          "enum": [
            "PROPOSED",
            "ERROR",
            "POSTED",
            "CLOSED"
          ],
          "type": "string"
        },
        "metrics": {
          "$ref": "#/$defs/shared13"
        },
        "optionKind": {
          "type": "string",
          "const": "portfolioTransactionStatusCount"
        },
        "transactionCount": {
          "type": "integer",
          "maximum": 9007199254740991,
          "minimum": 0
        }
      },
      "additionalProperties": false
    },
    "shared27": {
      "type": "object",
      "required": [
        "optionKind",
        "value",
        "label",
        "transactionCount",
        "metrics"
      ],
      "properties": {
        "label": {
          "type": "string",
          "minLength": 1
        },
        "value": {
          "type": "string",
          "minLength": 1
        },
        "metrics": {
          "$ref": "#/$defs/shared19"
        },
        "optionKind": {
          "type": "string",
          "const": "portfolioTransactionWarning"
        },
        "transactionCount": {
          "type": "integer",
          "maximum": 9007199254740991,
          "minimum": 0
        }
      },
      "additionalProperties": false
    },
    "shared28": {
      "type": "object",
      "required": [
        "optionKind",
        "value",
        "label",
        "transactionCount",
        "isLowerBound",
        "metrics"
      ],
      "properties": {
        "label": {
          "type": "string",
          "minLength": 1
        },
        "value": {
          "enum": [
            "PARTIAL",
            "UNPROCESSED"
          ],
          "type": "string"
        },
        "metrics": {
          "$ref": "#/$defs/shared13"
        },
        "optionKind": {
          "type": "string",
          "const": "rawTransactionProcessingState"
        },
        "isLowerBound": {
          "type": "boolean"
        },
        "transactionCount": {
          "type": "integer",
          "maximum": 9007199254740991,
          "minimum": 0
        }
      },
      "additionalProperties": false
    },
    "shared29": {
      "type": "object",
      "required": [
        "pageSize"
      ],
      "properties": {
        "pageSize": {
          "type": "integer",
          "maximum": 9007199254740991,
          "minimum": 1
        },
        "nextPageToken": {
          "type": "string",
          "minLength": 1
        }
      },
      "additionalProperties": false
    },
    "shared30": {
      "type": "object",
      "required": [
        "pageSize"
      ],
      "properties": {
        "pageSize": {
          "type": "number"
        }
      },
      "additionalProperties": false
    },
    "shared31": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/shared32"
      }
    },
    "shared32": {
      "type": "object",
      "required": [
        "optionKind",
        "value",
        "assetId",
        "symbol",
        "name",
        "totalValue",
        "quoteCurrency",
        "isSpam",
        "metrics"
      ],
      "properties": {
        "name": {
          "type": "string",
          "minLength": 1
        },
        "value": {
          "type": "string",
          "minLength": 1
        },
        "isSpam": {
          "type": "boolean",
          "const": false
        },
        "symbol": {
          "type": "string",
          "minLength": 1
        },
        "assetId": {
          "type": "string",
          "minLength": 1
        },
        "metrics": {
          "$ref": "#/$defs/shared13"
        },
        "optionKind": {
          "type": "string",
          "const": "capitalGainsAsset"
        },
        "totalValue": {
          "type": "string",
          "pattern": "^-?\\d+(\\.\\d+)?$"
        },
        "quoteCurrency": {
          "type": "string",
          "minLength": 1
        }
      },
      "additionalProperties": false
    },
    "shared33": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/shared34"
      }
    },
    "shared34": {
      "type": "object",
      "required": [
        "optionKind",
        "value",
        "assetId",
        "symbol",
        "name",
        "totalValue",
        "quoteCurrency",
        "isSpam",
        "metrics"
      ],
      "properties": {
        "name": {
          "type": "string",
          "minLength": 1
        },
        "value": {
          "type": "string",
          "minLength": 1
        },
        "isSpam": {
          "type": "boolean"
        },
        "symbol": {
          "type": "string",
          "minLength": 1
        },
        "assetId": {
          "type": "string",
          "minLength": 1
        },
        "metrics": {
          "$ref": "#/$defs/shared13"
        },
        "optionKind": {
          "type": "string",
          "const": "incomeExpenseAsset"
        },
        "totalValue": {
          "type": "string",
          "pattern": "^-?\\d+(\\.\\d+)?$"
        },
        "quoteCurrency": {
          "type": "string",
          "minLength": 1
        }
      },
      "additionalProperties": false
    },
    "shared35": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/shared36"
      }
    },
    "shared36": {
      "type": "object",
      "required": [
        "value",
        "label",
        "accountNumber",
        "name"
      ],
      "properties": {
        "name": {
          "type": "string",
          "minLength": 1
        },
        "label": {
          "type": "string",
          "minLength": 1
        },
        "value": {
          "type": "string",
          "minLength": 1
        },
        "accountNumber": {
          "type": "string",
          "minLength": 1
        }
      },
      "additionalProperties": false
    },
    "shared37": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/shared38"
      }
    },
    "shared38": {
      "type": "object",
      "required": [
        "value",
        "label"
      ],
      "properties": {
        "label": {
          "type": "string",
          "minLength": 1
        },
        "value": {
          "enum": [
            "ASSET",
            "LIABILITY",
            "EQUITY",
            "INCOME",
            "EXPENSE"
          ],
          "type": "string"
        }
      },
      "additionalProperties": false
    },
    "shared39": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/shared40"
      }
    },
    "shared40": {
      "type": "object",
      "required": [
        "value",
        "label"
      ],
      "properties": {
        "label": {
          "type": "string",
          "minLength": 1
        },
        "value": {
          "type": "string",
          "minLength": 1
        }
      },
      "additionalProperties": false
    },
    "shared41": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/shared42"
      }
    },
    "shared42": {
      "type": "object",
      "required": [
        "value",
        "label"
      ],
      "properties": {
        "label": {
          "type": "string",
          "minLength": 1
        },
        "value": {
          "enum": [
            "DR",
            "CR"
          ],
          "type": "string"
        }
      },
      "additionalProperties": false
    },
    "shared43": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/shared44"
      }
    },
    "shared44": {
      "type": "object",
      "required": [
        "value",
        "label",
        "chainId",
        "address",
        "name"
      ],
      "properties": {
        "name": {
          "type": "string"
        },
        "label": {
          "type": "string",
          "minLength": 1
        },
        "value": {
          "type": "string",
          "minLength": 1
        },
        "address": {
          "type": "string",
          "minLength": 1
        },
        "chainId": {
          "type": "string",
          "minLength": 1
        }
      },
      "additionalProperties": false
    },
    "shared45": {
      "type": "object",
      "required": [
        "value",
        "label"
      ],
      "properties": {
        "label": {
          "type": "string",
          "const": "No wallet"
        },
        "value": {
          "type": "string",
          "const": "noWallet"
        }
      },
      "additionalProperties": false
    },
    "shared46": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/shared47"
      }
    },
    "shared47": {
      "type": "object",
      "required": [
        "value",
        "label",
        "assetId",
        "symbol"
      ],
      "properties": {
        "label": {
          "type": "string",
          "minLength": 1
        },
        "value": {
          "type": "string",
          "minLength": 1
        },
        "symbol": {
          "type": "string",
          "minLength": 1
        },
        "assetId": {
          "type": "string",
          "minLength": 1
        }
      },
      "additionalProperties": false
    },
    "shared48": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/shared49"
      }
    },
    "shared49": {
      "type": "object",
      "required": [
        "value",
        "label"
      ],
      "properties": {
        "label": {
          "type": "string",
          "minLength": 1
        },
        "value": {
          "enum": [
            "active",
            "archived"
          ],
          "type": "string"
        }
      },
      "additionalProperties": false
    },
    "shared50": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/shared51"
      }
    },
    "shared51": {
      "type": "object",
      "required": [
        "value",
        "label"
      ],
      "properties": {
        "label": {
          "type": "string",
          "minLength": 1
        },
        "value": {
          "enum": [
            "withLabel",
            "withoutLabel"
          ],
          "type": "string"
        }
      },
      "additionalProperties": false
    },
    "shared52": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/shared53"
      }
    },
    "shared53": {
      "type": "object",
      "required": [
        "value",
        "label"
      ],
      "properties": {
        "label": {
          "type": "string",
          "minLength": 1
        },
        "value": {
          "enum": [
            "parent",
            "leaf"
          ],
          "type": "string"
        }
      },
      "additionalProperties": false
    },
    "shared54": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/shared55"
      }
    },
    "shared55": {
      "type": "object",
      "required": [
        "value",
        "label"
      ],
      "properties": {
        "label": {
          "type": "string",
          "minLength": 1
        },
        "value": {
          "enum": [
            "SYSTEM_MANAGED",
            "SYSTEM_DEFAULT",
            "USER_MANAGED"
          ],
          "type": "string"
        }
      },
      "additionalProperties": false
    },
    "shared56": {
      "type": "object",
      "required": [
        "minTimestamp",
        "maxTimestamp"
      ],
      "properties": {
        "maxTimestamp": {
          "type": "string",
          "format": "date-time"
        },
        "minTimestamp": {
          "type": "string",
          "format": "date-time"
        }
      },
      "additionalProperties": false
    },
    "shared57": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/shared58"
      }
    },
    "shared58": {
      "type": "object",
      "required": [
        "optionKind",
        "value",
        "label",
        "paymentRequestCount",
        "metrics"
      ],
      "properties": {
        "label": {
          "type": "string",
          "minLength": 1
        },
        "value": {
          "type": "string",
          "minLength": 1
        },
        "account": {
          "$ref": "#/$defs/shared59"
        },
        "metrics": {
          "$ref": "#/$defs/shared19"
        },
        "optionKind": {
          "type": "string",
          "const": "paymentRequestLedgerAccount"
        },
        "paymentRequestCount": {
          "type": "integer",
          "maximum": 9007199254740991,
          "minimum": 0
        }
      },
      "additionalProperties": false
    },
    "shared59": {
      "type": "object",
      "required": [
        "accountNumber",
        "name"
      ],
      "properties": {
        "name": {
          "type": "string",
          "minLength": 1
        },
        "accountNumber": {
          "type": "string",
          "minLength": 1
        }
      },
      "additionalProperties": false
    },
    "shared60": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/shared61"
      }
    },
    "shared61": {
      "type": "object",
      "required": [
        "key",
        "name",
        "kind",
        "options"
      ],
      "properties": {
        "key": {
          "type": "string",
          "pattern": "^[a-z0-9]+(_[a-z0-9]+)*$"
        },
        "kind": {
          "enum": [
            "COST",
            "REVENUE",
            "PROFIT",
            "INVESTMENT"
          ],
          "type": "string"
        },
        "name": {
          "type": "string",
          "minLength": 1
        },
        "options": {
          "$ref": "#/$defs/shared62"
        }
      },
      "additionalProperties": false
    },
    "shared62": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/shared63"
      }
    },
    "shared63": {
      "type": "object",
      "required": [
        "optionKind",
        "value",
        "label",
        "paymentRequestCount",
        "metrics"
      ],
      "properties": {
        "label": {
          "type": "string",
          "minLength": 1
        },
        "value": {
          "type": "string",
          "minLength": 1
        },
        "metrics": {
          "$ref": "#/$defs/shared19"
        },
        "optionKind": {
          "type": "string",
          "const": "paymentRequestResponsibilityCenter"
        },
        "paymentRequestCount": {
          "type": "integer",
          "maximum": 9007199254740991,
          "minimum": 0
        },
        "responsibilityCenter": {
          "$ref": "#/$defs/shared64"
        }
      },
      "additionalProperties": false
    },
    "shared64": {
      "type": "object",
      "required": [
        "name"
      ],
      "properties": {
        "code": {
          "type": "string",
          "minLength": 1
        },
        "name": {
          "type": "string",
          "minLength": 1
        }
      },
      "additionalProperties": false
    }
  },
  "anyOf": [
    {
      "type": "object",
      "required": [
        "data",
        "pagination",
        "cacheStatus",
        "revisionHash"
      ],
      "properties": {
        "data": {
          "$ref": "#/$defs/shared0"
        },
        "pagination": {
          "$ref": "#/$defs/shared29"
        },
        "cacheStatus": {
          "enum": [
            "hit",
            "miss",
            "stale",
            "bypass"
          ],
          "type": "string"
        },
        "revisionHash": {
          "type": "string"
        }
      },
      "additionalProperties": false
    },
    {
      "type": "object",
      "required": [
        "data",
        "pagination",
        "cacheStatus",
        "revisionHash"
      ],
      "properties": {
        "data": {
          "type": "array",
          "items": {},
          "maxItems": 0,
          "minItems": 0
        },
        "pagination": {
          "$ref": "#/$defs/shared30"
        },
        "cacheStatus": {
          "type": "string",
          "const": "hit"
        },
        "revisionHash": {
          "type": "string"
        }
      },
      "additionalProperties": false
    },
    {
      "type": "object",
      "required": [
        "data",
        "cacheStatus",
        "revisionHash"
      ],
      "properties": {
        "data": {
          "$ref": "#/$defs/shared31"
        },
        "cacheStatus": {
          "enum": [
            "hit",
            "miss",
            "stale",
            "bypass"
          ],
          "type": "string"
        },
        "revisionHash": {
          "type": "string"
        }
      },
      "additionalProperties": false
    },
    {
      "type": "object",
      "required": [
        "data",
        "cacheStatus",
        "revisionHash"
      ],
      "properties": {
        "data": {
          "$ref": "#/$defs/shared33"
        },
        "cacheStatus": {
          "enum": [
            "hit",
            "miss",
            "stale",
            "bypass"
          ],
          "type": "string"
        },
        "revisionHash": {
          "type": "string"
        }
      },
      "additionalProperties": false
    },
    {
      "type": "object",
      "required": [
        "accountNumbers",
        "accountTypes",
        "subTypes",
        "normalBalanceTypes",
        "wallets",
        "includeNoWallet",
        "assets",
        "currencies",
        "statuses",
        "paymentLabelStates",
        "hierarchy",
        "origins",
        "cacheStatus",
        "revisionHash"
      ],
      "properties": {
        "assets": {
          "$ref": "#/$defs/shared46"
        },
        "origins": {
          "$ref": "#/$defs/shared54"
        },
        "wallets": {
          "$ref": "#/$defs/shared43"
        },
        "statuses": {
          "$ref": "#/$defs/shared48"
        },
        "subTypes": {
          "$ref": "#/$defs/shared39"
        },
        "hierarchy": {
          "$ref": "#/$defs/shared52"
        },
        "currencies": {
          "$ref": "#/$defs/shared46"
        },
        "cacheStatus": {
          "enum": [
            "hit",
            "miss",
            "stale",
            "bypass"
          ],
          "type": "string"
        },
        "accountTypes": {
          "$ref": "#/$defs/shared37"
        },
        "revisionHash": {
          "type": "string"
        },
        "accountNumbers": {
          "$ref": "#/$defs/shared35"
        },
        "includeNoWallet": {
          "$ref": "#/$defs/shared45"
        },
        "normalBalanceTypes": {
          "$ref": "#/$defs/shared41"
        },
        "paymentLabelStates": {
          "$ref": "#/$defs/shared50"
        }
      },
      "additionalProperties": false
    },
    {
      "type": "object",
      "required": [
        "cacheStatus",
        "revisionHash"
      ],
      "properties": {
        "period": {
          "$ref": "#/$defs/shared56"
        },
        "cacheStatus": {
          "enum": [
            "hit",
            "miss",
            "stale",
            "bypass"
          ],
          "type": "string"
        },
        "revisionHash": {
          "type": "string"
        }
      },
      "additionalProperties": false
    },
    {
      "type": "object",
      "required": [
        "ledgerAccounts",
        "responsibilityCenterTypes",
        "cacheStatus",
        "revisionHash"
      ],
      "properties": {
        "cacheStatus": {
          "enum": [
            "hit",
            "miss",
            "stale",
            "bypass"
          ],
          "type": "string"
        },
        "revisionHash": {
          "type": "string"
        },
        "ledgerAccounts": {
          "$ref": "#/$defs/shared57"
        },
        "responsibilityCenterTypes": {
          "$ref": "#/$defs/shared60"
        }
      },
      "additionalProperties": false
    }
  ],
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "required": [
    "cacheStatus",
    "revisionHash"
  ],
  "properties": {
    "data": {
      "anyOf": [
        {
          "anyOf": [
            {
              "anyOf": [
                {
                  "$ref": "#/$defs/shared0"
                },
                {
                  "type": "array",
                  "items": {},
                  "maxItems": 0,
                  "minItems": 0
                }
              ]
            },
            {
              "$ref": "#/$defs/shared31"
            }
          ]
        },
        {
          "$ref": "#/$defs/shared33"
        }
      ]
    },
    "assets": {
      "$ref": "#/$defs/shared46"
    },
    "period": {
      "$ref": "#/$defs/shared56"
    },
    "origins": {
      "$ref": "#/$defs/shared54"
    },
    "wallets": {
      "$ref": "#/$defs/shared43"
    },
    "statuses": {
      "$ref": "#/$defs/shared48"
    },
    "subTypes": {
      "$ref": "#/$defs/shared39"
    },
    "hierarchy": {
      "$ref": "#/$defs/shared52"
    },
    "currencies": {
      "$ref": "#/$defs/shared46"
    },
    "pagination": {
      "anyOf": [
        {
          "$ref": "#/$defs/shared29"
        },
        {
          "$ref": "#/$defs/shared30"
        }
      ]
    },
    "cacheStatus": {
      "enum": [
        "hit",
        "miss",
        "stale",
        "bypass"
      ],
      "type": "string"
    },
    "accountTypes": {
      "$ref": "#/$defs/shared37"
    },
    "revisionHash": {
      "type": "string"
    },
    "accountNumbers": {
      "$ref": "#/$defs/shared35"
    },
    "ledgerAccounts": {
      "$ref": "#/$defs/shared57"
    },
    "includeNoWallet": {
      "$ref": "#/$defs/shared45"
    },
    "normalBalanceTypes": {
      "$ref": "#/$defs/shared41"
    },
    "paymentLabelStates": {
      "$ref": "#/$defs/shared50"
    },
    "responsibilityCenterTypes": {
      "$ref": "#/$defs/shared60"
    }
  },
  "additionalProperties": false
}
get_filter_options annotations
{
  "title": "Get Filter Options",
  "readOnlyHint": true,
  "openWorldHint": false,
  "idempotentHint": true,
  "destructiveHint": false
}
get_portfolio_issue_summary — Get Portfolio Issue Summary
Advertised by the server during the last successful anonymous check.
Advertised read-only

Summarize accounting problems that need review with exact counts for uncategorized, errored, and spam-related transactions, plus examples of uncategorized and errored transactions.

get_portfolio_issue_summary input schema
{
  "type": "object",
  "required": [
    "workspaceRef",
    "portfolioRef"
  ],
  "properties": {
    "portfolioRef": {
      "type": "string",
      "description": "Portfolio exact name or slug"
    },
    "workspaceRef": {
      "type": "string",
      "description": "Workspace exact name or slug"
    }
  },
  "additionalProperties": false
}
get_portfolio_issue_summary output schema
{
  "type": "object",
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "required": [
    "isClean",
    "counts",
    "errorsByType",
    "samples"
  ],
  "properties": {
    "counts": {
      "type": "object",
      "required": [
        "total",
        "uncategorized",
        "withErrors",
        "spamInvolved"
      ],
      "properties": {
        "total": {
          "type": "integer",
          "maximum": 9007199254740991,
          "minimum": 0
        },
        "withErrors": {
          "type": "integer",
          "maximum": 9007199254740991,
          "minimum": 0
        },
        "spamInvolved": {
          "type": "integer",
          "maximum": 9007199254740991,
          "minimum": 0
        },
        "uncategorized": {
          "type": "integer",
          "maximum": 9007199254740991,
          "minimum": 0
        }
      },
      "additionalProperties": false
    },
    "isClean": {
      "type": "boolean"
    },
    "samples": {
      "type": "object",
      "required": [
        "uncategorized",
        "errors"
      ],
      "properties": {
        "errors": {
          "type": "array",
          "items": {
            "type": "object",
            "required": [
              "id",
              "operationType",
              "classification",
              "timestamp",
              "status",
              "tags"
            ],
            "properties": {
              "id": {
                "type": "string"
              },
              "memo": {
                "type": "string"
              },
              "tags": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "status": {
                "type": "string"
              },
              "subType": {
                "type": "string"
              },
              "timestamp": {
                "type": "string"
              },
              "errorDetails": {
                "type": "array",
                "items": {}
              },
              "errorMessage": {
                "type": "string"
              },
              "operationType": {
                "type": "string"
              },
              "classification": {
                "type": "object",
                "required": [
                  "state"
                ],
                "properties": {
                  "state": {
                    "enum": [
                      "categorized",
                      "uncategorized",
                      "error"
                    ],
                    "type": "string"
                  },
                  "detail": {
                    "type": "string"
                  },
                  "reason": {
                    "type": "string"
                  },
                  "suggestedAction": {
                    "type": "object",
                    "required": [
                      "description"
                    ],
                    "properties": {
                      "tool": {
                        "type": "string"
                      },
                      "description": {
                        "type": "string"
                      }
                    },
                    "additionalProperties": false
                  }
                },
                "additionalProperties": false
              }
            },
            "additionalProperties": false
          }
        },
        "uncategorized": {
          "type": "array",
          "items": {
            "type": "object",
            "required": [
              "id",
              "operationType",
              "classification",
              "timestamp",
              "status",
              "tags"
            ],
            "properties": {
              "id": {
                "type": "string"
              },
              "memo": {
                "type": "string"
              },
              "tags": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "status": {
                "type": "string"
              },
              "subType": {
                "type": "string"
              },
              "timestamp": {
                "type": "string"
              },
              "errorDetails": {
                "type": "array",
                "items": {}
              },
              "errorMessage": {
                "type": "string"
              },
              "operationType": {
                "type": "string"
              },
              "classification": {
                "type": "object",
                "required": [
                  "state"
                ],
                "properties": {
                  "state": {
                    "enum": [
                      "categorized",
                      "uncategorized",
                      "error"
                    ],
                    "type": "string"
                  },
                  "detail": {
                    "type": "string"
                  },
                  "reason": {
                    "type": "string"
                  },
                  "suggestedAction": {
                    "type": "object",
                    "required": [
                      "description"
                    ],
                    "properties": {
                      "tool": {
                        "type": "string"
                      },
                      "description": {
                        "type": "string"
                      }
                    },
                    "additionalProperties": false
                  }
                },
                "additionalProperties": false
              }
            },
            "additionalProperties": false
          }
        }
      },
      "additionalProperties": false
    },
    "errorsByType": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "errorType",
          "count"
        ],
        "properties": {
          "count": {
            "type": "integer",
            "maximum": 9007199254740991,
            "minimum": 0
          },
          "errorType": {
            "type": "string"
          }
        },
        "additionalProperties": false
      }
    }
  },
  "additionalProperties": false
}
get_portfolio_issue_summary annotations
{
  "title": "Get Portfolio Issue Summary",
  "readOnlyHint": true,
  "openWorldHint": false,
  "idempotentHint": true,
  "destructiveHint": false
}
confirm_transaction — Confirm Portfolio Transaction
Advertised by the server during the last successful anonymous check.
Open-world

Post a proposed accounting transaction to the books; this queued action returns a requestId.

confirm_transaction input schema
{
  "type": "object",
  "required": [
    "workspaceRef",
    "portfolioRef",
    "transactionId"
  ],
  "properties": {
    "portfolioRef": {
      "type": "string",
      "description": "Portfolio exact name or slug"
    },
    "workspaceRef": {
      "type": "string",
      "description": "Workspace exact name or slug"
    },
    "transactionId": {
      "type": "string",
      "description": "Portfolio transaction ID"
    }
  },
  "additionalProperties": false
}
confirm_transaction output schema
{
  "type": "object",
  "oneOf": [
    {
      "type": "object",
      "required": [
        "status",
        "requestId",
        "transactionId"
      ],
      "properties": {
        "status": {
          "type": "string",
          "const": "queued"
        },
        "requestId": {
          "type": "string"
        },
        "transactionId": {
          "type": "string"
        }
      },
      "additionalProperties": false
    },
    {
      "type": "object",
      "required": [
        "status",
        "success",
        "transactionId"
      ],
      "properties": {
        "error": {
          "type": "object",
          "required": [
            "name",
            "message"
          ],
          "properties": {
            "name": {
              "type": "string"
            },
            "message": {
              "type": "string"
            }
          },
          "additionalProperties": false
        },
        "status": {
          "type": "string",
          "const": "completed"
        },
        "success": {
          "type": "boolean"
        },
        "transactionId": {
          "type": "string"
        }
      },
      "additionalProperties": false
    }
  ],
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "required": [
    "status",
    "transactionId"
  ],
  "properties": {
    "error": {
      "type": "object",
      "required": [
        "name",
        "message"
      ],
      "properties": {
        "name": {
          "type": "string"
        },
        "message": {
          "type": "string"
        }
      },
      "additionalProperties": false
    },
    "status": {
      "enum": [
        "queued",
        "completed"
      ],
      "type": "string"
    },
    "success": {
      "type": "boolean"
    },
    "requestId": {
      "type": "string"
    },
    "transactionId": {
      "type": "string"
    }
  },
  "additionalProperties": false
}
confirm_transaction annotations
{
  "title": "Confirm Portfolio Transaction",
  "readOnlyHint": false,
  "openWorldHint": true,
  "idempotentHint": false,
  "destructiveHint": false
}
reprocess_transaction — Reprocess Portfolio Transaction
Advertised by the server during the last successful anonymous check.
Advertised destructiveOpen-world

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.

reprocess_transaction input schema
{
  "type": "object",
  "required": [
    "workspaceRef",
    "portfolioRef",
    "transactionId"
  ],
  "properties": {
    "reason": {
      "type": "string",
      "minLength": 1,
      "description": "Optional immutable root reason; nonempty bytes are preserved exactly"
    },
    "timeoutMs": {
      "type": "integer",
      "maximum": 60000,
      "minimum": 1000,
      "description": "Maximum wait time in milliseconds"
    },
    "portfolioRef": {
      "type": "string",
      "minLength": 1,
      "description": "Portfolio name or slug"
    },
    "workspaceRef": {
      "type": "string",
      "minLength": 1,
      "description": "Workspace name or slug"
    },
    "transactionId": {
      "type": "string",
      "minLength": 1,
      "description": "Selected portfolio transaction ID to reprocess"
    },
    "pollIntervalMs": {
      "type": "integer",
      "maximum": 5000,
      "minimum": 100,
      "description": "Request-status polling interval in milliseconds"
    },
    "waitForCompletion": {
      "type": "boolean",
      "description": "Wait for the queued reprocess request to reach a terminal state before returning"
    }
  },
  "additionalProperties": false
}
reprocess_transaction output schema
{
  "type": "object",
  "oneOf": [
    {
      "type": "object",
      "required": [
        "status",
        "requestId",
        "transactionId"
      ],
      "properties": {
        "status": {
          "type": "string",
          "const": "queued"
        },
        "requests": {
          "type": "object",
          "required": [
            "primary",
            "all"
          ],
          "properties": {
            "all": {
              "type": "array",
              "items": {
                "type": "object",
                "required": [
                  "requestId",
                  "type",
                  "status",
                  "progress",
                  "createdAt",
                  "updatedAt"
                ],
                "properties": {
                  "type": {
                    "enum": [
                      "sync",
                      "export",
                      "recompute",
                      "reclassify"
                    ],
                    "type": "string"
                  },
                  "error": {
                    "type": "object",
                    "required": [
                      "error"
                    ],
                    "properties": {
                      "error": {
                        "type": "object",
                        "required": [
                          "code",
                          "message",
                          "requestId"
                        ],
                        "properties": {
                          "code": {
                            "type": "string"
                          },
                          "details": {
                            "type": "object",
                            "propertyNames": {
                              "type": "string"
                            },
                            "additionalProperties": {}
                          },
                          "message": {
                            "type": "string"
                          },
                          "requestId": {
                            "type": "string"
                          }
                        },
                        "additionalProperties": false
                      }
                    },
                    "additionalProperties": false
                  },
                  "result": {
                    "type": "object",
                    "required": [
                      "downloadUrl",
                      "fileSize",
                      "format"
                    ],
                    "properties": {
                      "format": {
                        "enum": [
                          "xlsx",
                          "pdf",
                          "json"
                        ],
                        "type": "string"
                      },
                      "fileSize": {
                        "type": "number"
                      },
                      "downloadUrl": {
                        "type": "string"
                      }
                    },
                    "additionalProperties": false
                  },
                  "status": {
                    "enum": [
                      "pending",
                      "active",
                      "delayed",
                      "completed",
                      "failed"
                    ],
                    "type": "string"
                  },
                  "progress": {
                    "type": "number"
                  },
                  "createdAt": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "requestId": {
                    "type": "string"
                  },
                  "updatedAt": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "finishedOn": {
                    "type": "number"
                  },
                  "appProgress": {
                    "type": "object",
                    "required": [
                      "completed",
                      "total",
                      "transactionsSynced"
                    ],
                    "properties": {
                      "total": {
                        "type": "number"
                      },
                      "completed": {
                        "type": "number"
                      },
                      "transactionsSynced": {
                        "type": "number"
                      }
                    },
                    "additionalProperties": false
                  },
                  "completedAt": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "returnValue": {}
                },
                "additionalProperties": false
              }
            },
            "primary": {
              "type": "string"
            }
          },
          "additionalProperties": false
        },
        "statuses": {
          "type": "array",
          "items": {
            "type": "object",
            "required": [
              "requestId",
              "type",
              "status",
              "progress",
              "createdAt",
              "updatedAt"
            ],
            "properties": {
              "type": {
                "enum": [
                  "sync",
                  "export",
                  "recompute",
                  "reclassify"
                ],
                "type": "string"
              },
              "error": {
                "type": "object",
                "required": [
                  "error"
                ],
                "properties": {
                  "error": {
                    "type": "object",
                    "required": [
                      "code",
                      "message",
                      "requestId"
                    ],
                    "properties": {
                      "code": {
                        "type": "string"
                      },
                      "details": {
                        "type": "object",
                        "propertyNames": {
                          "type": "string"
                        },
                        "additionalProperties": {}
                      },
                      "message": {
                        "type": "string"
                      },
                      "requestId": {
                        "type": "string"
                      }
                    },
                    "additionalProperties": false
                  }
                },
                "additionalProperties": false
              },
              "result": {
                "type": "object",
                "required": [
                  "downloadUrl",
                  "fileSize",
                  "format"
                ],
                "properties": {
                  "format": {
                    "enum": [
                      "xlsx",
                      "pdf",
                      "json"
                    ],
                    "type": "string"
                  },
                  "fileSize": {
                    "type": "number"
                  },
                  "downloadUrl": {
                    "type": "string"
                  }
                },
                "additionalProperties": false
              },
              "status": {
                "enum": [
                  "pending",
                  "active",
                  "delayed",
                  "completed",
                  "failed"
                ],
                "type": "string"
              },
              "progress": {
                "type": "number"
              },
              "createdAt": {
                "type": "string",
                "format": "date-time"
              },
              "requestId": {
                "type": "string"
              },
              "updatedAt": {
                "type": "string",
                "format": "date-time"
              },
              "finishedOn": {
                "type": "number"
              },
              "appProgress": {
                "type": "object",
                "required": [
                  "completed",
                  "total",
                  "transactionsSynced"
                ],
                "properties": {
                  "total": {
                    "type": "number"
                  },
                  "completed": {
                    "type": "number"
                  },
                  "transactionsSynced": {
                    "type": "number"
                  }
                },
                "additionalProperties": false
              },
              "completedAt": {
                "type": "string",
                "format": "date-time"
              },
              "returnValue": {}
            },
            "additionalProperties": false
          }
        },
        "completed": {
          "type": "boolean"
        },
        "requestId": {
          "type": "string"
        },
        "finalState": {
          "type": "object",
          "required": [
            "hasError",
            "errorTypes",
            "suggestedAction"
          ],
          "properties": {
            "hasError": {
              "type": "boolean"
            },
            "errorTypes": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "operationType": {
              "type": "string"
            },
            "suggestedAction": {},
            "classificationState": {
              "type": "string"
            }
          },
          "additionalProperties": false
        },
        "transactionId": {
          "type": "string"
        }
      },
      "additionalProperties": false
    },
    {
      "type": "object",
      "required": [
        "status",
        "success",
        "transactionId"
      ],
      "properties": {
        "error": {
          "type": "object",
          "required": [
            "name",
            "message"
          ],
          "properties": {
            "name": {
              "type": "string"
            },
            "message": {
              "type": "string"
            }
          },
          "additionalProperties": false
        },
        "status": {
          "type": "string",
          "const": "completed"
        },
        "success": {
          "type": "boolean"
        },
        "transactionId": {
          "type": "string"
        }
      },
      "additionalProperties": false
    }
  ],
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "required": [
    "status",
    "transactionId"
  ],
  "properties": {
    "error": {
      "type": "object",
      "required": [
        "name",
        "message"
      ],
      "properties": {
        "name": {
          "type": "string"
        },
        "message": {
          "type": "string"
        }
      },
      "additionalProperties": false
    },
    "status": {
      "enum": [
        "queued",
        "completed"
      ],
      "type": "string"
    },
    "success": {
      "type": "boolean"
    },
    "requests": {
      "type": "object",
      "required": [
        "primary",
        "all"
      ],
      "properties": {
        "all": {
          "type": "array",
          "items": {
            "type": "object",
            "required": [
              "requestId",
              "type",
              "status",
              "progress",
              "createdAt",
              "updatedAt"
            ],
            "properties": {
              "type": {
                "enum": [
                  "sync",
                  "export",
                  "recompute",
                  "reclassify"
                ],
                "type": "string"
              },
              "error": {
                "type": "object",
                "required": [
                  "error"
                ],
                "properties": {
                  "error": {
                    "type": "object",
                    "required": [
                      "code",
                      "message",
                      "requestId"
                    ],
                    "properties": {
                      "code": {
                        "type": "string"
                      },
                      "details": {
                        "type": "object",
                        "propertyNames": {
                          "type": "string"
                        },
                        "additionalProperties": {}
                      },
                      "message": {
                        "type": "string"
                      },
                      "requestId": {
                        "type": "string"
                      }
                    },
                    "additionalProperties": false
                  }
                },
                "additionalProperties": false
              },
              "result": {
                "type": "object",
                "required": [
                  "downloadUrl",
                  "fileSize",
                  "format"
                ],
                "properties": {
                  "format": {
                    "enum": [
                      "xlsx",
                      "pdf",
                      "json"
                    ],
                    "type": "string"
                  },
                  "fileSize": {
                    "type": "number"
                  },
                  "downloadUrl": {
                    "type": "string"
                  }
                },
                "additionalProperties": false
              },
              "status": {
                "enum": [
                  "pending",
                  "active",
                  "delayed",
                  "completed",
                  "failed"
                ],
                "type": "string"
              },
              "progress": {
                "type": "number"
              },
              "createdAt": {
                "type": "string",
                "format": "date-time"
              },
              "requestId": {
                "type": "string"
              },
              "updatedAt": {
                "type": "string",
                "format": "date-time"
              },
              "finishedOn": {
                "type": "number"
              },
              "appProgress": {
                "type": "object",
                "required": [
                  "completed",
                  "total",
                  "transactionsSynced"
                ],
                "properties": {
                  "total": {
                    "type": "number"
                  },
                  "completed": {
                    "type": "number"
                  },
                  "transactionsSynced": {
                    "type": "number"
                  }
                },
                "additionalProperties": false
              },
              "completedAt": {
                "type": "string",
                "format": "date-time"
              },
              "returnValue": {}
            },
            "additionalProperties": false
          }
        },
        "primary": {
          "type": "string"
        }
      },
      "additionalProperties": false
    },
    "statuses": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "requestId",
          "type",
          "status",
          "progress",
          "createdAt",
          "updatedAt"
        ],
        "properties": {
          "type": {
            "enum": [
              "sync",
              "export",
              "recompute",
              "reclassify"
            ],
            "type": "string"
          },
          "error": {
            "type": "object",
            "required": [
              "error"
            ],
            "properties": {
              "error": {
                "type": "object",
                "required": [
                  "code",
                  "message",
                  "requestId"
                ],
                "properties": {
                  "code": {
                    "type": "string"
                  },
                  "details": {
                    "type": "object",
                    "propertyNames": {
                      "type": "string"
                    },
                    "additionalProperties": {}
                  },
                  "message": {
                    "type": "string"
                  },
                  "requestId": {
                    "type": "string"
                  }
                },
                "additionalProperties": false
              }
            },
            "additionalProperties": false
          },
          "result": {
            "type": "object",
            "required": [
              "downloadUrl",
              "fileSize",
              "format"
            ],
            "properties": {
              "format": {
                "enum": [
                  "xlsx",
                  "pdf",
                  "json"
                ],
                "type": "string"
              },
              "fileSize": {
                "type": "number"
              },
              "downloadUrl": {
                "type": "string"
              }
            },
            "additionalProperties": false
          },
          "status": {
            "enum": [
              "pending",
              "active",
              "delayed",
              "completed",
              "failed"
            ],
            "type": "string"
          },
          "progress": {
            "type": "number"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "requestId": {
            "type": "string"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "finishedOn": {
            "type": "number"
          },
          "appProgress": {
            "type": "object",
            "required": [
              "completed",
              "total",
              "transactionsSynced"
            ],
            "properties": {
              "total": {
                "type": "number"
              },
              "completed": {
                "type": "number"
              },
              "transactionsSynced": {
                "type": "number"
              }
            },
            "additionalProperties": false
          },
          "completedAt": {
            "type": "string",
            "format": "date-time"
          },
          "returnValue": {}
        },
        "additionalProperties": false
      }
    },
    "completed": {
      "type": "boolean"
    },
    "requestId": {
      "type": "string"
    },
    "finalState": {
      "type": "object",
      "required": [
        "hasError",
        "errorTypes",
        "suggestedAction"
      ],
      "properties": {
        "hasError": {
          "type": "boolean"
        },
        "errorTypes": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "operationType": {
          "type": "string"
        },
        "suggestedAction": {},
        "classificationState": {
          "type": "string"
        }
      },
      "additionalProperties": false
    },
    "transactionId": {
      "type": "string"
    }
  },
  "additionalProperties": false
}
reprocess_transaction annotations
{
  "title": "Reprocess Portfolio Transaction",
  "readOnlyHint": false,
  "openWorldHint": true,
  "idempotentHint": false,
  "destructiveHint": true
}
preview_transaction_classification — Preview Transaction Classification
Advertised by the server during the last successful anonymous check.
Advertised read-only

Preview how selected wallet movements would be grouped and labeled as accounting transactions. Returns every proposal in order and saves nothing.

preview_transaction_classification input schema
{
  "type": "object",
  "required": [
    "workspaceRef",
    "portfolioRef",
    "operations"
  ],
  "properties": {
    "operations": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "portfolioTransactionId",
          "walletTransactionId",
          "txIndex"
        ],
        "properties": {
          "txIndex": {
            "type": "integer",
            "maximum": 2147483647,
            "minimum": 0,
            "description": "Position of the movement within that source transaction, from the same walletOperation."
          },
          "walletTransactionId": {
            "type": "string",
            "minLength": 1,
            "description": "Source transaction the wallet movement belongs to, from a walletOperation in a read tool result."
          },
          "portfolioTransactionId": {
            "type": "string",
            "minLength": 1,
            "description": "Accounting transaction the movement currently belongs to."
          }
        },
        "additionalProperties": false
      },
      "minItems": 1,
      "description": "Exact transfer-operation handles returned by transaction reads, including the accounting transaction each operation currently belongs to"
    },
    "portfolioRef": {
      "type": "string",
      "minLength": 1,
      "description": "Portfolio name or slug inside that workspace. Call list_portfolios to resolve it."
    },
    "workspaceRef": {
      "type": "string",
      "minLength": 1,
      "description": "Workspace name or slug. Call list_workspaces to resolve it."
    }
  },
  "additionalProperties": false
}
preview_transaction_classification output schema
{
  "type": "object",
  "required": [
    "transactions"
  ],
  "properties": {
    "transactions": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "operationType",
          "timestamp",
          "operations"
        ],
        "properties": {
          "subType": {
            "type": "string"
          },
          "timestamp": {
            "type": "string",
            "format": "date-time"
          },
          "operations": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "portfolioTransactionId",
                "walletTransactionId",
                "txIndex"
              ],
              "properties": {
                "txIndex": {
                  "type": "integer",
                  "maximum": 2147483647,
                  "minimum": 0
                },
                "walletTransactionId": {
                  "type": "string",
                  "minLength": 1
                },
                "portfolioTransactionId": {
                  "type": "string",
                  "minLength": 1
                }
              },
              "additionalProperties": false
            },
            "minItems": 1
          },
          "systemNotes": {
            "type": "string"
          },
          "operationType": {
            "enum": [
              "DEPOSIT_FIAT",
              "INCOME",
              "REFUND",
              "REBATE",
              "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"
          }
        },
        "additionalProperties": false
      }
    }
  },
  "additionalProperties": false
}
preview_transaction_classification annotations
{
  "title": "Preview Transaction Classification",
  "readOnlyHint": true,
  "openWorldHint": false,
  "idempotentHint": true,
  "destructiveHint": false
}
merge_transactions — Merge Portfolio Transactions
Advertised by the server during the last successful anonymous check.
Advertised destructiveOpen-world

Destructively combine wallet movements from several accounting transactions into one target transaction and reclassify it; preview the grouping first, then track the queued requestId.

merge_transactions input schema
{
  "type": "object",
  "required": [
    "workspaceRef",
    "portfolioRef",
    "transactionId",
    "operations",
    "operationType"
  ],
  "properties": {
    "reason": {
      "type": "string",
      "description": "Optional immutable root reason. Nonempty bytes are preserved exactly; use ptx:<uuid> for transaction references."
    },
    "subType": {
      "type": "string",
      "description": "Optional operation sub-type"
    },
    "operations": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "walletTransactionId",
          "txIndex",
          "portfolioTransactionId"
        ],
        "properties": {
          "txIndex": {
            "type": "integer",
            "description": "Transfer index within the wallet transaction"
          },
          "walletTransactionId": {
            "type": "string",
            "description": "Wallet transaction handle (from a walletOperation)"
          },
          "portfolioTransactionId": {
            "type": "string",
            "description": "Portfolio transaction the operation currently belongs to"
          }
        },
        "additionalProperties": false
      },
      "description": "Operations to merge into the target"
    },
    "portfolioRef": {
      "type": "string",
      "description": "Portfolio exact name or slug"
    },
    "workspaceRef": {
      "type": "string",
      "description": "Workspace exact name or slug"
    },
    "operationType": {
      "enum": [
        "DEPOSIT_FIAT",
        "INCOME",
        "REFUND",
        "REBATE",
        "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",
      "description": "Accounting operation type for the merged transaction"
    },
    "transactionId": {
      "type": "string",
      "description": "Target transaction the operations are merged into"
    }
  },
  "additionalProperties": false
}
merge_transactions output schema
{
  "type": "object",
  "oneOf": [
    {
      "type": "object",
      "required": [
        "status",
        "requestId",
        "transactionId"
      ],
      "properties": {
        "status": {
          "type": "string",
          "const": "queued"
        },
        "requestId": {
          "type": "string"
        },
        "transactionId": {
          "type": "string"
        }
      },
      "additionalProperties": false
    },
    {
      "type": "object",
      "required": [
        "status",
        "success",
        "transactionId"
      ],
      "properties": {
        "error": {
          "type": "object",
          "required": [
            "name",
            "message"
          ],
          "properties": {
            "name": {
              "type": "string"
            },
            "message": {
              "type": "string"
            }
          },
          "additionalProperties": false
        },
        "status": {
          "type": "string",
          "const": "completed"
        },
        "success": {
          "type": "boolean"
        },
        "transactionId": {
          "type": "string"
        }
      },
      "additionalProperties": false
    }
  ],
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "required": [
    "status",
    "transactionId"
  ],
  "properties": {
    "error": {
      "type": "object",
      "required": [
        "name",
        "message"
      ],
      "properties": {
        "name": {
          "type": "string"
        },
        "message": {
          "type": "string"
        }
      },
      "additionalProperties": false
    },
    "status": {
      "enum": [
        "queued",
        "completed"
      ],
      "type": "string"
    },
    "success": {
      "type": "boolean"
    },
    "requestId": {
      "type": "string"
    },
    "transactionId": {
      "type": "string"
    }
  },
  "additionalProperties": false
}
merge_transactions annotations
{
  "title": "Merge Portfolio Transactions",
  "readOnlyHint": false,
  "openWorldHint": true,
  "idempotentHint": false,
  "destructiveHint": true
}
split_transactions — Split Portfolio Transaction
Advertised by the server during the last successful anonymous check.
Advertised destructiveOpen-world

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.

split_transactions input schema
{
  "type": "object",
  "required": [
    "workspaceRef",
    "portfolioRef",
    "transactionId",
    "operations",
    "operationType"
  ],
  "properties": {
    "reason": {
      "type": "string",
      "description": "Optional immutable root reason. Nonempty bytes are preserved exactly; use ptx:<uuid> for transaction references."
    },
    "subType": {
      "type": "string",
      "description": "Optional operation sub-type"
    },
    "operations": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "walletTransactionId",
          "txIndex",
          "portfolioTransactionId"
        ],
        "properties": {
          "txIndex": {
            "type": "integer",
            "description": "Transfer index within the wallet transaction"
          },
          "walletTransactionId": {
            "type": "string",
            "description": "Wallet transaction handle (from a walletOperation)"
          },
          "portfolioTransactionId": {
            "type": "string",
            "description": "Portfolio transaction the operation currently belongs to"
          }
        },
        "additionalProperties": false
      },
      "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"
    },
    "portfolioRef": {
      "type": "string",
      "description": "Portfolio exact name or slug"
    },
    "workspaceRef": {
      "type": "string",
      "description": "Workspace exact name or slug"
    },
    "operationType": {
      "enum": [
        "DEPOSIT_FIAT",
        "INCOME",
        "REFUND",
        "REBATE",
        "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",
      "description": "Accounting operation type for the new transaction"
    },
    "transactionId": {
      "type": "string",
      "description": "Source transaction to split operations out of"
    }
  },
  "additionalProperties": false
}
split_transactions output schema
{
  "type": "object",
  "oneOf": [
    {
      "type": "object",
      "required": [
        "status",
        "requestId",
        "transactionId"
      ],
      "properties": {
        "status": {
          "type": "string",
          "const": "queued"
        },
        "requestId": {
          "type": "string"
        },
        "transactionId": {
          "type": "string"
        }
      },
      "additionalProperties": false
    },
    {
      "type": "object",
      "required": [
        "status",
        "success",
        "transactionId"
      ],
      "properties": {
        "error": {
          "type": "object",
          "required": [
            "name",
            "message"
          ],
          "properties": {
            "name": {
              "type": "string"
            },
            "message": {
              "type": "string"
            }
          },
          "additionalProperties": false
        },
        "status": {
          "type": "string",
          "const": "completed"
        },
        "success": {
          "type": "boolean"
        },
        "transactionId": {
          "type": "string"
        }
      },
      "additionalProperties": false
    }
  ],
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "required": [
    "status",
    "transactionId"
  ],
  "properties": {
    "error": {
      "type": "object",
      "required": [
        "name",
        "message"
      ],
      "properties": {
        "name": {
          "type": "string"
        },
        "message": {
          "type": "string"
        }
      },
      "additionalProperties": false
    },
    "status": {
      "enum": [
        "queued",
        "completed"
      ],
      "type": "string"
    },
    "success": {
      "type": "boolean"
    },
    "requestId": {
      "type": "string"
    },
    "transactionId": {
      "type": "string"
    }
  },
  "additionalProperties": false
}
split_transactions annotations
{
  "title": "Split Portfolio Transaction",
  "readOnlyHint": false,
  "openWorldHint": true,
  "idempotentHint": false,
  "destructiveHint": true
}
mark_token_spam — Mark Token as Spam
Advertised by the server during the last successful anonymous check.
Open-world

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.

mark_token_spam input schema
{
  "type": "object",
  "required": [
    "workspaceRef",
    "portfolioRef",
    "chainId",
    "tokenAddress"
  ],
  "properties": {
    "isSpam": {
      "type": "boolean",
      "description": "Spam flag to set (default true; false unmarks)"
    },
    "reason": {
      "type": "string",
      "description": "Optional immutable root reason. Nonempty bytes are preserved exactly; use ptx:<uuid> for transaction references."
    },
    "chainId": {
      "type": "string",
      "description": "Chain ID of the token (from a walletOperation)"
    },
    "portfolioRef": {
      "type": "string",
      "description": "Portfolio exact name or slug"
    },
    "tokenAddress": {
      "type": "string",
      "description": "Token contract address (from a walletOperation)"
    },
    "workspaceRef": {
      "type": "string",
      "description": "Workspace exact name or slug"
    }
  },
  "additionalProperties": false
}
mark_token_spam output schema
{
  "type": "object",
  "oneOf": [
    {
      "type": "object",
      "required": [
        "status",
        "requestId"
      ],
      "properties": {
        "status": {
          "type": "string",
          "const": "queued"
        },
        "requestId": {
          "type": "string"
        }
      },
      "additionalProperties": false
    },
    {
      "type": "object",
      "required": [
        "status",
        "success"
      ],
      "properties": {
        "error": {
          "type": "object",
          "required": [
            "name",
            "message"
          ],
          "properties": {
            "name": {
              "type": "string"
            },
            "message": {
              "type": "string"
            }
          },
          "additionalProperties": false
        },
        "status": {
          "type": "string",
          "const": "completed"
        },
        "success": {
          "type": "boolean"
        }
      },
      "additionalProperties": false
    }
  ],
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "required": [
    "status"
  ],
  "properties": {
    "error": {
      "type": "object",
      "required": [
        "name",
        "message"
      ],
      "properties": {
        "name": {
          "type": "string"
        },
        "message": {
          "type": "string"
        }
      },
      "additionalProperties": false
    },
    "status": {
      "enum": [
        "queued",
        "completed"
      ],
      "type": "string"
    },
    "success": {
      "type": "boolean"
    },
    "requestId": {
      "type": "string"
    }
  },
  "additionalProperties": false
}
mark_token_spam annotations
{
  "title": "Mark Token as Spam",
  "readOnlyHint": false,
  "openWorldHint": true,
  "idempotentHint": false,
  "destructiveHint": false
}
simulate_fiat_quote — Simulate Fiat Payout Quote
Advertised by the server during the last successful anonymous check.
Advertised read-only

Estimate exchange rates, processing fees, amount received, and corridor limits for a bank payout before sending money; compare supported rails such as ACH, SEPA, EFT, FPS, IMPS, or SWIFT.

simulate_fiat_quote input schema
{
  "type": "object",
  "required": [
    "workspaceRef",
    "portfolioRef",
    "network",
    "receivingAmount"
  ],
  "properties": {
    "network": {
      "enum": [
        "SWIFT",
        "ACH",
        "SEPA",
        "FPS",
        "EFT",
        "FAST",
        "CHATS",
        "KFTC",
        "ZENGIN",
        "INSTAPAY",
        "PESONET",
        "PROMPTPAY",
        "BECS",
        "IMPS",
        "NEFT",
        "BI-FAST",
        "UAEFTS",
        "SPEI",
        "SPID",
        "PIX"
      ],
      "type": "string",
      "description": "Fiat payout rail / bank method"
    },
    "portfolioRef": {
      "type": "string",
      "description": "Portfolio exact name or slug"
    },
    "workspaceRef": {
      "type": "string",
      "description": "Workspace exact name or slug"
    },
    "senderCurrency": {
      "enum": [
        "USDC",
        "USDT",
        "USDe"
      ],
      "type": "string",
      "description": "Stablecoin funding the payout (default USDC)"
    },
    "receivingAmount": {
      "type": "string",
      "description": "Amount the recipient should receive, as a decimal string in the receiving currency (e.g. \"500000\")"
    },
    "purposeOfPayment": {
      "enum": [
        "payment_for_goods",
        "payment_for_business_services",
        "payment_for_salary_or_benefits",
        "capital_investment_or_item",
        "other"
      ],
      "type": "string",
      "description": "Purpose-of-payment classification"
    },
    "receivingCurrency": {
      "type": "string",
      "description": "ISO 4217 receiving currency; defaults to the network default"
    },
    "recipientBankCountry": {
      "type": "string",
      "description": "ISO 3166-1 alpha-2 recipient bank country; defaults to the network default"
    }
  },
  "additionalProperties": false
}
simulate_fiat_quote output schema
{
  "type": "object",
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "required": [
    "status",
    "corridor"
  ],
  "properties": {
    "note": {
      "type": "string"
    },
    "quote": {
      "type": "object",
      "required": [
        "exchangeRate",
        "senderCurrency",
        "receivingCurrency",
        "processingFee",
        "itemizedFees",
        "totalReceivable",
        "quoteValiditySeconds",
        "summary"
      ],
      "properties": {
        "summary": {
          "type": "string"
        },
        "exchangeRate": {
          "type": "string"
        },
        "itemizedFees": {
          "type": "array",
          "items": {
            "type": "object",
            "required": [
              "key",
              "label",
              "amount"
            ],
            "properties": {
              "key": {
                "type": "string"
              },
              "label": {
                "type": "string"
              },
              "amount": {
                "type": "string"
              },
              "percentage": {
                "type": "string"
              }
            },
            "additionalProperties": false
          }
        },
        "processingFee": {
          "type": "string"
        },
        "senderCurrency": {
          "type": "string"
        },
        "totalReceivable": {
          "type": "string"
        },
        "receivingCurrency": {
          "type": "string"
        },
        "quoteValiditySeconds": {
          "type": "integer",
          "maximum": 9007199254740991,
          "minimum": -9007199254740991
        }
      },
      "additionalProperties": false
    },
    "status": {
      "enum": [
        "quoted",
        "corridor_unavailable",
        "amount_out_of_range",
        "limit_skipped"
      ],
      "type": "string"
    },
    "corridor": {
      "type": "object",
      "required": [
        "network",
        "receivingCurrency",
        "recipientBankCountry",
        "senderCurrency"
      ],
      "properties": {
        "network": {
          "type": "string"
        },
        "amountBounds": {
          "type": "object",
          "required": [
            "minAmount",
            "maxAmount"
          ],
          "properties": {
            "maxAmount": {
              "type": "string"
            },
            "minAmount": {
              "type": "string"
            }
          },
          "additionalProperties": false
        },
        "senderCurrency": {
          "type": "string"
        },
        "receivingCurrency": {
          "type": "string"
        },
        "recipientBankCountry": {
          "type": "string"
        }
      },
      "additionalProperties": false
    }
  },
  "additionalProperties": false
}
simulate_fiat_quote annotations
{
  "title": "Simulate Fiat Payout Quote",
  "readOnlyHint": true,
  "openWorldHint": false,
  "idempotentHint": true,
  "destructiveHint": false
}
get_journal_entry — Get Journal Entry
Advertised by the server during the last successful anonymous check.
Advertised read-only

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.

get_journal_entry input schema
{
  "type": "object",
  "required": [
    "workspaceRef",
    "portfolioRef",
    "journalEntryId"
  ],
  "properties": {
    "portfolioRef": {
      "type": "string",
      "description": "Portfolio exact name or slug"
    },
    "workspaceRef": {
      "type": "string",
      "description": "Workspace exact name or slug"
    },
    "journalEntryId": {
      "type": "string",
      "description": "Journal entry ID"
    }
  },
  "additionalProperties": false
}
get_journal_entry output schema
{
  "type": "object",
  "required": [
    "id",
    "timestamp",
    "status",
    "isAdjustment",
    "lines"
  ],
  "properties": {
    "id": {
      "type": "string"
    },
    "memo": {
      "type": "string"
    },
    "lines": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "lineNumber",
          "entryType",
          "fiatAmount",
          "responsibilityCenterAssignments"
        ],
        "properties": {
          "lot": {
            "type": "object",
            "required": [
              "id",
              "entryId",
              "entryKind",
              "lotMethod"
            ],
            "properties": {
              "id": {
                "type": "string"
              },
              "entryId": {
                "type": "string"
              },
              "entryKind": {
                "type": "string"
              },
              "lotMethod": {
                "type": "string"
              }
            },
            "additionalProperties": false
          },
          "memo": {
            "type": "string"
          },
          "assetId": {
            "type": "string"
          },
          "transfer": {
            "type": "object",
            "properties": {
              "txHash": {
                "type": "string"
              },
              "chainId": {
                "type": "string"
              },
              "txIndex": {
                "type": "integer",
                "maximum": 9007199254740991,
                "minimum": -9007199254740991
              }
            },
            "additionalProperties": false
          },
          "entryType": {
            "type": "string"
          },
          "fiatAmount": {
            "type": "string"
          },
          "lineNumber": {
            "type": "integer",
            "maximum": 9007199254740991,
            "minimum": -9007199254740991
          },
          "accountName": {
            "type": "string"
          },
          "accountType": {
            "type": "string"
          },
          "assetAmount": {
            "type": "string"
          },
          "assetSymbol": {
            "type": "string"
          },
          "accountNumber": {
            "type": "string"
          },
          "accountSubType": {
            "type": "string"
          },
          "counterpartyName": {
            "type": "string"
          },
          "accountNormalBalanceType": {
            "type": "string"
          },
          "responsibilityCenterAssignments": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "responsibilityCenterTypeId",
                "responsibilityCenterId",
                "value",
                "responsibilityCenterType",
                "responsibilityCenterName",
                "percentageBps"
              ],
              "properties": {
                "value": {
                  "type": "string"
                },
                "percentageBps": {
                  "type": "integer",
                  "maximum": 9007199254740991,
                  "minimum": -9007199254740991
                },
                "responsibilityCenterId": {
                  "type": "string"
                },
                "responsibilityCenterCode": {
                  "type": "string"
                },
                "responsibilityCenterName": {
                  "type": "string"
                },
                "responsibilityCenterType": {
                  "type": "object",
                  "required": [
                    "key",
                    "name",
                    "kind"
                  ],
                  "properties": {
                    "key": {
                      "type": "string"
                    },
                    "kind": {
                      "enum": [
                        "COST",
                        "REVENUE",
                        "PROFIT",
                        "INVESTMENT"
                      ],
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    }
                  },
                  "additionalProperties": false
                },
                "responsibilityCenterTypeId": {
                  "type": "string"
                }
              },
              "additionalProperties": false
            }
          }
        },
        "additionalProperties": false
      }
    },
    "status": {
      "type": "string"
    },
    "subType": {
      "type": "string"
    },
    "timestamp": {
      "type": "string"
    },
    "systemNotes": {
      "type": "string"
    },
    "isAdjustment": {
      "type": "boolean"
    },
    "operationType": {
      "type": "string"
    },
    "portfolioTransactionId": {
      "type": "string"
    },
    "adjustmentJournalImportProvenance": {
      "type": "object",
      "required": [
        "importRef",
        "sourceFile",
        "sourceRows"
      ],
      "properties": {
        "importRef": {
          "type": "string",
          "pattern": "^adjustment-journal-import-[a-z0-9-]+$",
          "maxLength": 128,
          "minLength": 1
        },
        "sourceFile": {
          "type": "object",
          "required": [
            "name",
            "uploadedAt",
            "uploader"
          ],
          "properties": {
            "name": {
              "type": "string",
              "minLength": 1
            },
            "uploader": {
              "type": "object",
              "required": [
                "name"
              ],
              "properties": {
                "name": {
                  "type": "string",
                  "minLength": 1
                }
              },
              "additionalProperties": false
            },
            "uploadedAt": {
              "type": "string",
              "format": "date-time"
            }
          },
          "additionalProperties": false
        },
        "sourceRows": {
          "type": "array",
          "items": {
            "type": "object",
            "required": [
              "appliedResolutions",
              "entryId",
              "journalLineNumber",
              "locator",
              "normalizedValues",
              "sourceRowHash"
            ],
            "properties": {
              "entryId": {
                "type": "string",
                "minLength": 1
              },
              "locator": {
                "oneOf": [
                  {
                    "type": "object",
                    "required": [
                      "format",
                      "lineNumber"
                    ],
                    "properties": {
                      "format": {
                        "type": "string",
                        "const": "csv"
                      },
                      "lineNumber": {
                        "type": "integer",
                        "maximum": 9007199254740991,
                        "minimum": 1
                      }
                    },
                    "additionalProperties": false
                  },
                  {
                    "type": "object",
                    "required": [
                      "format",
                      "rowNumber",
                      "sheetName"
                    ],
                    "properties": {
                      "format": {
                        "type": "string",
                        "const": "xlsx"
                      },
                      "rowNumber": {
                        "type": "integer",
                        "maximum": 9007199254740991,
                        "minimum": 1
                      },
                      "sheetName": {
                        "type": "string",
                        "minLength": 1
                      }
                    },
                    "additionalProperties": false
                  }
                ]
              },
              "sourceRowHash": {
                "type": "string",
                "minLength": 1
              },
              "normalizedValues": {
                "anyOf": [
                  {
                    "type": "object",
                    "required": [
                      "schemaVersion",
                      "values"
                    ],
                    "properties": {
                      "values": {
                        "type": "object",
                        "propertyNames": {
                          "anyOf": [
                            {
                              "enum": [
                                "accountNumber",
                                "amount",
                                "counterpartyExternalId",
                                "counterpartyName",
                                "direction",
                                "effectiveDate",
                                "entryId",
                                "memo"
                              ],
                              "type": "string"
                            },
                            {
                              "type": "string",
                              "pattern": "^responsibilityCenter:[a-z0-9]+(_[a-z0-9]+)*$"
                            }
                          ]
                        },
                        "additionalProperties": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      },
                      "schemaVersion": {
                        "type": "number",
                        "const": 1
                      }
                    },
                    "additionalProperties": false
                  },
                  {
                    "type": "object",
                    "required": [
                      "schemaVersion",
                      "values"
                    ],
                    "properties": {
                      "values": {
                        "type": "object",
                        "propertyNames": {
                          "anyOf": [
                            {
                              "enum": [
                                "accountNumber",
                                "amount",
                                "counterpartyExternalId",
                                "counterpartyName",
                                "direction",
                                "effectiveAt",
                                "effectiveDate",
                                "entryId",
                                "memo"
                              ],
                              "type": "string"
                            },
                            {
                              "type": "string",
                              "pattern": "^responsibilityCenter:[a-z0-9]+(_[a-z0-9]+)*$"
                            }
                          ]
                        },
                        "additionalProperties": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      },
                      "schemaVersion": {
                        "type": "number",
                        "const": 2
                      }
                    },
                    "additionalProperties": false
                  }
                ]
              },
              "journalLineNumber": {
                "type": "integer",
                "maximum": 9007199254740991,
                "minimum": 1
              },
              "appliedResolutions": {
                "type": "object",
                "required": [
                  "schemaVersion",
                  "values"
                ],
                "properties": {
                  "values": {
                    "type": "object",
                    "propertyNames": {
                      "anyOf": [
                        {
                          "enum": [
                            "accountNumber",
                            "counterpartyExternalId",
                            "counterpartyName"
                          ],
                          "type": "string"
                        },
                        {
                          "type": "string",
                          "pattern": "^responsibilityCenter:[a-z0-9]+(_[a-z0-9]+)*$"
                        }
                      ]
                    },
                    "additionalProperties": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "schemaVersion": {
                    "type": "number",
                    "const": 1
                  }
                },
                "additionalProperties": false
              }
            },
            "additionalProperties": false
          },
          "minItems": 1
        }
      },
      "additionalProperties": false
    }
  },
  "additionalProperties": false
}
get_journal_entry annotations
{
  "title": "Get Journal Entry",
  "readOnlyHint": true,
  "openWorldHint": false,
  "idempotentHint": true,
  "destructiveHint": false
}
get_lot_ledger — Get Cost-Basis Lot Ledger
Advertised by the server during the last successful anonymous check.
Advertised read-only

Trace paginated cost-basis acquisition, disposal, transfer, and adjustment history across a portfolio, optionally narrowed by asset, wallet, event kind, accounting transaction, or date.

get_lot_ledger input schema
{
  "type": "object",
  "required": [
    "workspaceRef",
    "portfolioRef"
  ],
  "properties": {
    "page": {
      "type": "integer",
      "description": "Page number, starting at 1"
    },
    "sort": {
      "type": "string",
      "description": "Single public sort field. Prefix with - for descending. Supported fields: timestamp, diff, value, price"
    },
    "limit": {
      "anyOf": [
        {
          "type": "integer",
          "maximum": 100,
          "minimum": 1,
          "description": "Maximum items to return, maximum 100. Preferred MCP pagination field."
        },
        {
          "type": "string",
          "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)$",
          "description": "Maximum items to return, maximum 100. Preferred MCP pagination field. Numeric strings are accepted for MCP client compatibility."
        }
      ],
      "description": "Maximum items to return, maximum 100. Preferred MCP pagination field."
    },
    "filter": {
      "type": "string",
      "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."
    },
    "toDate": {
      "type": "string",
      "description": "Optional ISO timestamp upper bound"
    },
    "chainId": {
      "type": "string",
      "description": "Exact chain ID when filtering to one wallet; requires walletAddress"
    },
    "assetRef": {
      "type": "string",
      "description": "Deprecated compatibility selector for asset symbol or asset id. Prefer filter=asset_id."
    },
    "fromDate": {
      "type": "string",
      "description": "Optional ISO timestamp lower bound"
    },
    "pageSize": {
      "anyOf": [
        {
          "type": "integer",
          "maximum": 100,
          "minimum": 1,
          "description": "Deprecated alias for limit, maximum 100. Prefer limit for new MCP calls."
        },
        {
          "type": "string",
          "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)$",
          "description": "Deprecated alias for limit, maximum 100. Prefer limit for new MCP calls. Numeric strings are accepted for MCP client compatibility."
        }
      ],
      "description": "Deprecated alias for limit, maximum 100. Prefer limit for new MCP calls."
    },
    "entryKind": {
      "type": "array",
      "items": {
        "enum": [
          "ADD",
          "DSP",
          "CUT",
          "MVE",
          "RES",
          "REL"
        ],
        "type": "string"
      },
      "description": "Filter by lot entry kind (any of)"
    },
    "portfolioRef": {
      "type": "string",
      "description": "Portfolio exact name or slug"
    },
    "workspaceRef": {
      "type": "string",
      "description": "Workspace exact name or slug"
    },
    "walletAddress": {
      "type": "string",
      "description": "Exact case-sensitive wallet address when filtering to one wallet; requires chainId"
    }
  },
  "additionalProperties": false
}
get_lot_ledger output schema
{
  "type": "object",
  "required": [
    "data",
    "pagination"
  ],
  "properties": {
    "data": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "id",
          "entryId",
          "timestamp",
          "acquisitionTimestamp",
          "entryKind",
          "lotMethod",
          "diff",
          "value",
          "assetId",
          "assetIsSpam",
          "portfolioTransactionId",
          "walletTransactionTransfers"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "diff": {
            "type": "string"
          },
          "price": {
            "type": "string"
          },
          "value": {
            "type": "string"
          },
          "txHash": {
            "type": "string",
            "minLength": 1
          },
          "assetId": {
            "type": "string"
          },
          "entryId": {
            "type": "string"
          },
          "assetName": {
            "type": "string"
          },
          "entryKind": {
            "enum": [
              "ADD",
              "DSP",
              "CUT",
              "MVE",
              "RES",
              "REL"
            ],
            "type": "string"
          },
          "lotMethod": {
            "type": "string"
          },
          "timestamp": {
            "type": "string"
          },
          "positionId": {
            "type": "string"
          },
          "walletName": {
            "type": "string"
          },
          "assetIsSpam": {
            "type": "boolean"
          },
          "assetSymbol": {
            "type": "string"
          },
          "operationType": {
            "enum": [
              "DEPOSIT_FIAT",
              "INCOME",
              "REFUND",
              "REBATE",
              "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"
          },
          "walletAddress": {
            "type": "string"
          },
          "walletChainId": {
            "type": "string"
          },
          "acquisitionTimestamp": {
            "type": "string"
          },
          "portfolioTransactionId": {
            "type": "string"
          },
          "walletTransactionTransfers": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "chainId",
                "txHash"
              ],
              "properties": {
                "txHash": {
                  "type": "string",
                  "minLength": 1
                },
                "chainId": {
                  "type": "string"
                }
              },
              "additionalProperties": false
            }
          }
        },
        "additionalProperties": false
      }
    },
    "pagination": {
      "type": "object",
      "required": [
        "page",
        "pageSize",
        "totalCount",
        "totalPages"
      ],
      "properties": {
        "page": {
          "type": "integer",
          "maximum": 9007199254740991,
          "minimum": -9007199254740991
        },
        "pageSize": {
          "type": "integer",
          "maximum": 9007199254740991,
          "minimum": -9007199254740991
        },
        "totalCount": {
          "type": "integer",
          "maximum": 9007199254740991,
          "minimum": -9007199254740991
        },
        "totalPages": {
          "type": "integer",
          "maximum": 9007199254740991,
          "minimum": -9007199254740991
        }
      },
      "additionalProperties": false
    }
  },
  "additionalProperties": false
}
get_lot_ledger annotations
{
  "title": "Get Cost-Basis Lot Ledger",
  "readOnlyHint": true,
  "openWorldHint": false,
  "idempotentHint": true,
  "destructiveHint": false
}
request_report_export — Request Report Export
Advertised by the server during the last successful anonymous check.
Open-world

Queue a 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.

request_report_export input schema
{
  "type": "object",
  "required": [
    "workspaceRef",
    "portfolioRef",
    "reportType",
    "format",
    "fromDate",
    "toDate"
  ],
  "properties": {
    "format": {
      "enum": [
        "xlsx",
        "pdf",
        "json"
      ],
      "type": "string",
      "description": "Export format"
    },
    "toDate": {
      "type": "string",
      "description": "Report period end ISO timestamp"
    },
    "fromDate": {
      "type": "string",
      "description": "Report period start ISO timestamp"
    },
    "reportType": {
      "enum": [
        "transactions",
        "journal-entries",
        "gains-losses",
        "cost-basis-ledger",
        "income-expense",
        "profit-and-loss",
        "statement",
        "balance-sheet",
        "trial-balance"
      ],
      "type": "string",
      "description": "Report type"
    },
    "totalsOnly": {
      "type": "boolean",
      "description": "Return summary only when true"
    },
    "portfolioRef": {
      "type": "string",
      "description": "Portfolio exact name or slug"
    },
    "workspaceRef": {
      "type": "string",
      "description": "Workspace exact name or slug"
    }
  },
  "additionalProperties": false
}
request_report_export output schema
{
  "type": "object",
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "required": [
    "requestId"
  ],
  "properties": {
    "requestId": {
      "type": "string"
    }
  },
  "additionalProperties": false
}
request_report_export annotations
{
  "title": "Request Report Export",
  "readOnlyHint": false,
  "openWorldHint": true,
  "idempotentHint": false,
  "destructiveHint": false
}
get_request_status — Get Request Status
Advertised by the server during the last successful anonymous check.
Advertised read-only

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; there is no separate report-status tool.

get_request_status input schema
{
  "type": "object",
  "required": [
    "workspaceRef",
    "requestId"
  ],
  "properties": {
    "requestId": {
      "type": "string",
      "description": "Request ID returned by the call that queued the work (e.g. incremental_sync, full_resync, request_report_export)"
    },
    "portfolioRef": {
      "type": "string",
      "description": "Portfolio exact name or slug"
    },
    "workspaceRef": {
      "type": "string",
      "description": "Workspace exact name or slug"
    },
    "transactionId": {
      "type": "string",
      "description": "Optional transaction ID that caused the async request, for agent context"
    }
  },
  "additionalProperties": false
}
get_request_status output schema
{
  "type": "object",
  "$defs": {
    "shared0": {
      "enum": [
        "DEPOSIT_FIAT",
        "INCOME",
        "REFUND",
        "REBATE",
        "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"
    },
    "shared1": {
      "type": "object",
      "propertyNames": {
        "type": "string"
      },
      "additionalProperties": {
        "type": "string"
      }
    },
    "shared2": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/shared3"
      }
    },
    "shared3": {
      "type": "object",
      "required": [
        "header",
        "key"
      ],
      "properties": {
        "key": {
          "type": "string"
        },
        "header": {
          "type": "string"
        }
      },
      "additionalProperties": false
    },
    "shared4": {
      "type": "integer",
      "maximum": 9007199254740991,
      "minimum": -9007199254740991
    },
    "shared5": {
      "type": "string",
      "pattern": "^-?\\d+(?:\\.\\d+)?$"
    },
    "shared6": {
      "type": "object",
      "required": [
        "s"
      ],
      "properties": {
        "r": {
          "type": "string"
        },
        "s": {
          "type": "string"
        },
        "v": {
          "$ref": "#/$defs/shared4"
        }
      },
      "additionalProperties": false
    },
    "shared7": {
      "type": "object",
      "required": [
        "id",
        "symbol"
      ],
      "properties": {
        "id": {
          "type": "string"
        },
        "symbol": {
          "type": "string"
        }
      },
      "additionalProperties": false
    },
    "shared8": {
      "type": "object",
      "required": [
        "slug",
        "name",
        "currency",
        "reportingTimezone",
        "accountingConfiguration",
        "fiscalPeriodStart"
      ],
      "properties": {
        "name": {
          "type": "string"
        },
        "slug": {
          "type": "string"
        },
        "currency": {
          "type": "string"
        },
        "fiscalPeriodStart": {
          "type": "string",
          "format": "date-time"
        },
        "reportingTimezone": {
          "type": "string"
        },
        "accountingConfiguration": {
          "$ref": "#/$defs/shared9"
        }
      },
      "additionalProperties": false
    },
    "shared9": {
      "type": "object",
      "required": [
        "gasFeeAccountingTreatment",
        "isPurchaseTaxable",
        "costBasisLotMethod",
        "baseCurrency",
        "jurisdictionCode",
        "stablecoinTreatment",
        "costBasisPerWallet",
        "defiDepositTreatment",
        "separateIncomeExpenseLines"
      ],
      "properties": {
        "baseCurrency": {
          "type": "string"
        },
        "jurisdictionCode": {
          "type": "string"
        },
        "isPurchaseTaxable": {
          "type": "boolean"
        },
        "costBasisLotMethod": {
          "$ref": "#/$defs/shared11"
        },
        "costBasisPerWallet": {
          "type": "boolean"
        },
        "stablecoinTreatment": {
          "enum": [
            "BASE",
            "ASSET"
          ],
          "type": "string"
        },
        "defiDepositTreatment": {
          "$ref": "#/$defs/shared12"
        },
        "gasFeeAccountingTreatment": {
          "$ref": "#/$defs/shared10"
        },
        "separateIncomeExpenseLines": {
          "type": "boolean"
        },
        "financialReportingFramework": {
          "$ref": "#/$defs/shared13"
        }
      },
      "additionalProperties": false
    },
    "shared10": {
      "enum": [
        "DISPOSAL_AND_COST_BASIS",
        "EXPENSE_ONLY"
      ],
      "type": "string"
    },
    "shared11": {
      "enum": [
        "FIFO",
        "LIFO",
        "HIFO",
        "ACB"
      ],
      "type": "string"
    },
    "shared12": {
      "enum": [
        "TAXABLE_EXCHANGE",
        "NON_TAXABLE_RESERVATION"
      ],
      "type": "string"
    },
    "shared13": {
      "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"
    },
    "shared14": {
      "type": "integer",
      "maximum": 9007199254740991,
      "minimum": 0
    },
    "shared15": {
      "enum": [
        "ASSET",
        "LIABILITY",
        "EQUITY",
        "INCOME",
        "EXPENSE"
      ],
      "type": "string"
    },
    "shared16": {
      "type": "object",
      "propertyNames": {
        "type": "string"
      },
      "additionalProperties": {
        "type": "number"
      }
    },
    "shared17": {
      "type": "object",
      "required": [
        "name",
        "currency",
        "timezone"
      ],
      "properties": {
        "name": {
          "type": "string"
        },
        "currency": {
          "type": "string"
        },
        "timezone": {
          "type": "string"
        }
      },
      "additionalProperties": false
    },
    "shared18": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/ProfitAndLossStatementNodeDto"
      }
    },
    "shared19": {
      "type": "object",
      "required": [
        "from",
        "to"
      ],
      "properties": {
        "to": {
          "type": "string"
        },
        "from": {
          "type": "string"
        }
      },
      "additionalProperties": false
    },
    "shared20": {
      "type": "object",
      "required": [
        "name",
        "address",
        "chain"
      ],
      "properties": {
        "name": {
          "type": "string"
        },
        "chain": {
          "type": "string"
        },
        "address": {
          "type": "string"
        }
      },
      "additionalProperties": false
    },
    "shared21": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/shared22"
      }
    },
    "shared22": {
      "type": "object",
      "required": [
        "text",
        "value",
        "currency",
        "type"
      ],
      "properties": {
        "text": {
          "type": "string"
        },
        "type": {
          "$ref": "#/$defs/shared23"
        },
        "value": {
          "type": "number"
        },
        "currency": {
          "type": "string"
        }
      },
      "additionalProperties": false
    },
    "shared23": {
      "enum": [
        "fiat",
        "crypto",
        "number"
      ],
      "type": "string"
    },
    "shared24": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/shared25"
      }
    },
    "shared25": {
      "type": "object",
      "required": [
        "date",
        "net",
        "symbol",
        "countIn",
        "amountIn",
        "countOut",
        "amountOut",
        "amountCost",
        "balance"
      ],
      "properties": {
        "net": {
          "type": "number"
        },
        "date": {
          "type": "string"
        },
        "symbol": {
          "type": "string"
        },
        "balance": {
          "type": "number"
        },
        "countIn": {
          "$ref": "#/$defs/shared14"
        },
        "amountIn": {
          "type": "number"
        },
        "countOut": {
          "$ref": "#/$defs/shared14"
        },
        "amountOut": {
          "type": "number"
        },
        "amountCost": {
          "type": "number"
        }
      },
      "additionalProperties": false
    },
    "shared26": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/BalanceSheetStatementLineDto"
      }
    },
    "shared27": {
      "type": "object",
      "required": [
        "scopeName",
        "reportingCurrency",
        "includedEntities",
        "excludedEntities"
      ],
      "properties": {
        "scopeName": {
          "type": "string"
        },
        "excludedEntities": {
          "$ref": "#/$defs/shared28"
        },
        "includedEntities": {
          "$ref": "#/$defs/shared28"
        },
        "reportingCurrency": {
          "type": "string"
        }
      },
      "additionalProperties": false
    },
    "shared28": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/shared29"
      }
    },
    "shared29": {
      "type": "object",
      "required": [
        "entityLabel",
        "portfolioName",
        "portfolioCurrency"
      ],
      "properties": {
        "notes": {
          "type": "string"
        },
        "entityRole": {
          "type": "string"
        },
        "entityLabel": {
          "type": "string"
        },
        "portfolioName": {
          "type": "string"
        },
        "portfolioCurrency": {
          "type": "string"
        }
      },
      "additionalProperties": false
    },
    "shared30": {
      "type": "object",
      "required": [
        "entityColumns",
        "rows",
        "warnings"
      ],
      "properties": {
        "rows": {
          "$ref": "#/$defs/shared33"
        },
        "warnings": {
          "$ref": "#/$defs/shared37"
        },
        "entityColumns": {
          "$ref": "#/$defs/shared31"
        }
      },
      "additionalProperties": false
    },
    "shared31": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/shared32"
      }
    },
    "shared32": {
      "type": "object",
      "required": [
        "portfolioSlug",
        "entityLabel",
        "portfolioCurrency"
      ],
      "properties": {
        "entityLabel": {
          "type": "string"
        },
        "portfolioSlug": {
          "type": "string"
        },
        "portfolioCurrency": {
          "type": "string"
        }
      },
      "additionalProperties": false
    },
    "shared33": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/shared34"
      }
    },
    "shared34": {
      "type": "object",
      "required": [
        "key",
        "rowKind",
        "section",
        "label",
        "level",
        "entityAmounts",
        "standaloneGroupTotal",
        "eliminationAmount",
        "groupTotal"
      ],
      "properties": {
        "key": {
          "type": "string"
        },
        "label": {
          "type": "string"
        },
        "level": {
          "$ref": "#/$defs/shared14"
        },
        "rowKind": {
          "$ref": "#/$defs/shared35"
        },
        "section": {
          "type": "string"
        },
        "groupTotal": {
          "$ref": "#/$defs/shared5"
        },
        "accountNumber": {
          "type": "string"
        },
        "entityAmounts": {
          "$ref": "#/$defs/shared36"
        },
        "eliminationAmount": {
          "$ref": "#/$defs/shared5"
        },
        "standaloneGroupTotal": {
          "$ref": "#/$defs/shared5"
        }
      },
      "additionalProperties": false
    },
    "shared35": {
      "enum": [
        "group-header",
        "account",
        "subtotal",
        "section-total",
        "grand-total"
      ],
      "type": "string"
    },
    "shared36": {
      "type": "object",
      "propertyNames": {
        "type": "string"
      },
      "additionalProperties": {
        "$ref": "#/$defs/shared5"
      }
    },
    "shared37": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/shared38"
      }
    },
    "shared38": {
      "type": "object",
      "required": [
        "type",
        "severity",
        "message",
        "entityLabels"
      ],
      "properties": {
        "type": {
          "$ref": "#/$defs/shared39"
        },
        "message": {
          "type": "string"
        },
        "severity": {
          "enum": [
            "blocking",
            "warning"
          ],
          "type": "string"
        },
        "entityLabels": {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      },
      "additionalProperties": false
    },
    "shared39": {
      "enum": [
        "account-hierarchy-conflict",
        "account-label-conflict",
        "elimination-row-missing",
        "intercompany-elimination-incomplete",
        "intercompany-transfer",
        "mixed-currency"
      ],
      "type": "string"
    },
    "shared40": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/shared41"
      }
    },
    "shared41": {
      "type": "object",
      "required": [
        "pairId",
        "treatment",
        "kind",
        "statementType",
        "sourcePortfolioSlug",
        "destinationPortfolioSlug",
        "rowKey",
        "accountName",
        "amount",
        "explanation"
      ],
      "properties": {
        "kind": {
          "$ref": "#/$defs/shared43"
        },
        "amount": {
          "$ref": "#/$defs/shared5"
        },
        "pairId": {
          "type": "string"
        },
        "rowKey": {
          "type": "string"
        },
        "treatment": {
          "$ref": "#/$defs/shared42"
        },
        "accountName": {
          "type": "string"
        },
        "explanation": {
          "type": "string"
        },
        "accountNumber": {
          "type": "string"
        },
        "statementType": {
          "$ref": "#/$defs/shared44"
        },
        "sourcePortfolioSlug": {
          "type": "string"
        },
        "destinationPortfolioSlug": {
          "type": "string"
        }
      },
      "additionalProperties": false
    },
    "shared42": {
      "enum": [
        "OPERATING_FUNDING",
        "CARRYOVER_BASIS_TRANSFER"
      ],
      "type": "string"
    },
    "shared43": {
      "enum": [
        "carryover-investment-capital",
        "operating-funding-deferred-gain-realized",
        "operating-funding-group-basis",
        "operating-funding-income-expense",
        "operating-funding-internal-gain-loss"
      ],
      "type": "string"
    },
    "shared44": {
      "enum": [
        "balance-sheet",
        "profit-and-loss"
      ],
      "type": "string"
    },
    "shared45": {
      "oneOf": [
        {
          "$ref": "#/$defs/shared46"
        },
        {
          "$ref": "#/$defs/shared47"
        },
        {
          "$ref": "#/$defs/shared49"
        },
        {
          "$ref": "#/$defs/shared50"
        },
        {
          "$ref": "#/$defs/shared52"
        },
        {
          "$ref": "#/$defs/shared53"
        },
        {
          "$ref": "#/$defs/shared54"
        },
        {
          "$ref": "#/$defs/shared57"
        },
        {
          "$ref": "#/$defs/shared58"
        },
        {
          "$ref": "#/$defs/shared59"
        },
        {
          "$ref": "#/$defs/shared60"
        },
        {
          "$ref": "#/$defs/shared61"
        },
        {
          "$ref": "#/$defs/shared62"
        },
        {
          "$ref": "#/$defs/shared63"
        }
      ]
    },
    "shared46": {
      "type": "object",
      "required": [
        "reportType",
        "totalRevenue",
        "ordinaryIncome",
        "capitalGains",
        "totalExpensesAndLosses",
        "ordinaryExpense",
        "capitalLosses",
        "netIncome",
        "transactionCount"
      ],
      "properties": {
        "netIncome": {
          "type": "string"
        },
        "reportType": {
          "type": "string",
          "const": "profit-and-loss"
        },
        "capitalGains": {
          "type": "string"
        },
        "totalRevenue": {
          "type": "string"
        },
        "capitalLosses": {
          "type": "string"
        },
        "ordinaryIncome": {
          "type": "string"
        },
        "ordinaryExpense": {
          "type": "string"
        },
        "transactionCount": {
          "$ref": "#/$defs/shared14"
        },
        "totalExpensesAndLosses": {
          "type": "string"
        }
      },
      "additionalProperties": false
    },
    "shared47": {
      "type": "object",
      "required": [
        "reportType",
        "totalRevenue",
        "ordinaryIncome",
        "capitalGains",
        "totalExpensesAndLosses",
        "ordinaryExpense",
        "capitalLosses",
        "netIncome",
        "transactionCount"
      ],
      "properties": {
        "netIncome": {
          "type": "string"
        },
        "reportType": {
          "$ref": "#/$defs/shared48"
        },
        "capitalGains": {
          "type": "string"
        },
        "totalRevenue": {
          "type": "string"
        },
        "capitalLosses": {
          "type": "string"
        },
        "ordinaryIncome": {
          "type": "string"
        },
        "ordinaryExpense": {
          "type": "string"
        },
        "transactionCount": {
          "$ref": "#/$defs/shared14"
        },
        "totalExpensesAndLosses": {
          "type": "string"
        }
      },
      "additionalProperties": false
    },
    "shared48": {
      "type": "string",
      "const": "consolidated-profit-and-loss"
    },
    "shared49": {
      "type": "object",
      "required": [
        "reportType",
        "totalAssets",
        "totalLiabilities",
        "totalEquity",
        "netWorth"
      ],
      "properties": {
        "netWorth": {
          "type": "string"
        },
        "reportType": {
          "type": "string",
          "const": "balance-sheet"
        },
        "totalAssets": {
          "type": "string"
        },
        "totalEquity": {
          "type": "string"
        },
        "totalLiabilities": {
          "type": "string"
        }
      },
      "additionalProperties": false
    },
    "shared50": {
      "type": "object",
      "required": [
        "reportType",
        "totalAssets",
        "totalLiabilities",
        "totalEquity",
        "netWorth"
      ],
      "properties": {
        "netWorth": {
          "type": "string"
        },
        "reportType": {
          "$ref": "#/$defs/shared51"
        },
        "totalAssets": {
          "type": "string"
        },
        "totalEquity": {
          "type": "string"
        },
        "totalLiabilities": {
          "type": "string"
        }
      },
      "additionalProperties": false
    },
    "shared51": {
      "type": "string",
      "const": "consolidated-balance-sheet"
    },
    "shared52": {
      "type": "object",
      "required": [
        "reportType",
        "totalIncome",
        "totalExpense",
        "netIncome",
        "transactionCount"
      ],
      "properties": {
        "netIncome": {
          "type": "string"
        },
        "reportType": {
          "type": "string",
          "const": "income-expense"
        },
        "totalIncome": {
          "type": "string"
        },
        "totalExpense": {
          "type": "string"
        },
        "transactionCount": {
          "$ref": "#/$defs/shared14"
        }
      },
      "additionalProperties": false
    },
    "shared53": {
      "type": "object",
      "required": [
        "reportType",
        "totalProceeds",
        "totalCostBasis",
        "totalGainOrLoss",
        "tradeCount"
      ],
      "properties": {
        "reportType": {
          "type": "string",
          "const": "gains-losses"
        },
        "tradeCount": {
          "$ref": "#/$defs/shared14"
        },
        "totalProceeds": {
          "type": "string"
        },
        "totalCostBasis": {
          "type": "string"
        },
        "totalGainOrLoss": {
          "type": "string"
        },
        "percentGainOrLoss": {
          "type": "string"
        }
      },
      "additionalProperties": false
    },
    "shared54": {
      "type": "object",
      "required": [
        "reportType",
        "totalDebits",
        "totalCredits",
        "difference",
        "isBalanced",
        "accountCount",
        "subTotals"
      ],
      "properties": {
        "subTotals": {
          "$ref": "#/$defs/shared55"
        },
        "difference": {
          "type": "string"
        },
        "isBalanced": {
          "type": "boolean"
        },
        "reportType": {
          "type": "string",
          "const": "trial-balance"
        },
        "totalDebits": {
          "type": "string"
        },
        "accountCount": {
          "$ref": "#/$defs/shared14"
        },
        "totalCredits": {
          "type": "string"
        }
      },
      "additionalProperties": false
    },
    "shared55": {
      "type": "object",
      "propertyNames": {
        "type": "string"
      },
      "additionalProperties": {
        "$ref": "#/$defs/shared56"
      }
    },
    "shared56": {
      "type": "object",
      "required": [
        "debit",
        "credit"
      ],
      "properties": {
        "debit": {
          "type": "string"
        },
        "credit": {
          "type": "string"
        }
      },
      "additionalProperties": false
    },
    "shared57": {
      "type": "object",
      "required": [
        "reportType"
      ],
      "properties": {
        "reportType": {
          "type": "string",
          "const": "daily-summary"
        }
      },
      "additionalProperties": false
    },
    "shared58": {
      "type": "object",
      "required": [
        "reportType"
      ],
      "properties": {
        "reportType": {
          "type": "string",
          "const": "statement"
        }
      },
      "additionalProperties": false
    },
    "shared59": {
      "type": "object",
      "required": [
        "reportType"
      ],
      "properties": {
        "reportType": {
          "type": "string",
          "const": "transactions"
        }
      },
      "additionalProperties": false
    },
    "shared60": {
      "type": "object",
      "required": [
        "reportType"
      ],
      "properties": {
        "reportType": {
          "type": "string",
          "const": "journal-entries"
        }
      },
      "additionalProperties": false
    },
    "shared61": {
      "type": "object",
      "required": [
        "reportType"
      ],
      "properties": {
        "reportType": {
          "type": "string",
          "const": "cost-basis-ledger"
        }
      },
      "additionalProperties": false
    },
    "shared62": {
      "type": "object",
      "required": [
        "reportType"
      ],
      "properties": {
        "reportType": {
          "type": "string",
          "const": "payment-requests"
        }
      },
      "additionalProperties": false
    },
    "shared63": {
      "type": "object",
      "required": [
        "reportType"
      ],
      "properties": {
        "reportType": {
          "$ref": "#/$defs/shared64"
        }
      },
      "additionalProperties": false
    },
    "shared64": {
      "type": "string",
      "const": "portfolio-conversion-workbook-template"
    },
    "shared65": {
      "type": "object",
      "required": [
        "error"
      ],
      "properties": {
        "error": {
          "$ref": "#/$defs/shared66"
        }
      },
      "additionalProperties": false
    },
    "shared66": {
      "type": "object",
      "required": [
        "code",
        "message",
        "requestId"
      ],
      "properties": {
        "code": {
          "type": "string"
        },
        "details": {
          "$ref": "#/$defs/shared67"
        },
        "message": {
          "type": "string"
        },
        "requestId": {
          "type": "string"
        }
      },
      "additionalProperties": false
    },
    "shared67": {
      "type": "object",
      "propertyNames": {
        "type": "string"
      },
      "additionalProperties": {}
    },
    "StatementJsonReportDto": {
      "oneOf": [
        {
          "type": "object",
          "required": [
            "type",
            "data"
          ],
          "properties": {
            "data": {
              "type": "object",
              "required": [
                "portfolioName",
                "locale",
                "timezone",
                "dateRange",
                "walletInfo",
                "coin",
                "summary",
                "dailyTransactions",
                "transactionDetails"
              ],
              "properties": {
                "coin": {
                  "type": "string"
                },
                "locale": {
                  "type": "string"
                },
                "summary": {
                  "$ref": "#/$defs/shared21"
                },
                "timezone": {
                  "type": "string"
                },
                "dateRange": {
                  "$ref": "#/$defs/shared19"
                },
                "walletInfo": {
                  "$ref": "#/$defs/shared20"
                },
                "portfolioName": {
                  "type": "string"
                },
                "dailyTransactions": {
                  "$ref": "#/$defs/shared24"
                },
                "transactionDetails": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "required": [
                      "time",
                      "description",
                      "amount",
                      "balance"
                    ],
                    "properties": {
                      "fee": {
                        "type": "number"
                      },
                      "time": {
                        "type": "string"
                      },
                      "amount": {
                        "type": "number"
                      },
                      "balance": {
                        "type": "number"
                      },
                      "usdAmount": {
                        "type": "number"
                      },
                      "description": {
                        "type": "string"
                      }
                    },
                    "additionalProperties": false
                  }
                }
              },
              "additionalProperties": false
            },
            "type": {
              "type": "string",
              "const": "single"
            }
          },
          "additionalProperties": false
        },
        {
          "type": "object",
          "required": [
            "type",
            "data"
          ],
          "properties": {
            "data": {
              "type": "object",
              "required": [
                "portfolioName",
                "locale",
                "timezone",
                "dateRange",
                "walletInfo",
                "currency",
                "coins"
              ],
              "properties": {
                "coins": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "required": [
                      "coin",
                      "summary",
                      "dailyTransactions"
                    ],
                    "properties": {
                      "coin": {
                        "type": "string"
                      },
                      "summary": {
                        "$ref": "#/$defs/shared21"
                      },
                      "dailyTransactions": {
                        "$ref": "#/$defs/shared24"
                      }
                    },
                    "additionalProperties": false
                  }
                },
                "locale": {
                  "type": "string"
                },
                "currency": {
                  "type": "string"
                },
                "timezone": {
                  "type": "string"
                },
                "dateRange": {
                  "$ref": "#/$defs/shared19"
                },
                "walletInfo": {
                  "$ref": "#/$defs/shared20"
                },
                "portfolioName": {
                  "type": "string"
                }
              },
              "additionalProperties": false
            },
            "type": {
              "type": "string",
              "const": "multi"
            }
          },
          "additionalProperties": false
        }
      ]
    },
    "GainsLossesJsonReportDto": {
      "type": "object",
      "required": [
        "portfolio",
        "reports",
        "summary"
      ],
      "properties": {
        "endDate": {
          "type": "string",
          "format": "date-time"
        },
        "reports": {
          "type": "array",
          "items": {
            "type": "object",
            "required": [
              "symbol",
              "disposalDate",
              "acquisitionDate",
              "disposalAmount",
              "costBasis",
              "proceeds",
              "gainOrLoss"
            ],
            "properties": {
              "symbol": {
                "type": "string"
              },
              "proceeds": {
                "type": "number"
              },
              "costBasis": {
                "type": "number"
              },
              "gainOrLoss": {
                "type": "number"
              },
              "disposalDate": {
                "type": "string",
                "format": "date-time"
              },
              "disposalAmount": {
                "type": "number"
              },
              "acquisitionDate": {
                "type": "string",
                "format": "date-time"
              }
            },
            "additionalProperties": false
          }
        },
        "summary": {
          "type": "object",
          "required": [
            "totalGainsLosses",
            "totalTrades",
            "currency"
          ],
          "properties": {
            "currency": {
              "type": "string"
            },
            "totalTrades": {
              "$ref": "#/$defs/shared14"
            },
            "totalGainsLosses": {
              "type": "number"
            }
          },
          "additionalProperties": false
        },
        "portfolio": {
          "$ref": "#/$defs/shared8"
        },
        "startDate": {
          "type": "string",
          "format": "date-time"
        },
        "treatmentNote": {
          "type": "string"
        }
      },
      "additionalProperties": false
    },
    "BalanceSheetJsonReportDto": {
      "type": "object",
      "required": [
        "reportType",
        "portfolio",
        "asOfDate",
        "generatedAt",
        "valuationMethod",
        "grouping",
        "totals",
        "identity"
      ],
      "properties": {
        "totals": {
          "type": "object",
          "required": [
            "assets",
            "liabilities",
            "equity"
          ],
          "properties": {
            "assets": {
              "$ref": "#/$defs/shared5"
            },
            "equity": {
              "$ref": "#/$defs/shared5"
            },
            "liabilities": {
              "$ref": "#/$defs/shared5"
            }
          },
          "additionalProperties": false
        },
        "asOfDate": {
          "type": "string",
          "format": "date-time"
        },
        "grouping": {
          "enum": [
            "summary",
            "grouped",
            "detailed"
          ],
          "type": "string"
        },
        "identity": {
          "type": "object",
          "required": [
            "assets",
            "liabilitiesAndEquity",
            "difference",
            "holds"
          ],
          "properties": {
            "holds": {
              "type": "boolean"
            },
            "assets": {
              "$ref": "#/$defs/shared5"
            },
            "difference": {
              "$ref": "#/$defs/shared5"
            },
            "liabilitiesAndEquity": {
              "$ref": "#/$defs/shared5"
            }
          },
          "additionalProperties": false
        },
        "sections": {
          "type": "array",
          "items": {
            "type": "object",
            "required": [
              "type",
              "totalCost",
              "totalMarket",
              "totalUnrealized",
              "items"
            ],
            "properties": {
              "type": {
                "enum": [
                  "ASSETS",
                  "LIABILITIES",
                  "EQUITY"
                ],
                "type": "string"
              },
              "items": {
                "$ref": "#/$defs/shared26"
              },
              "totalCost": {
                "$ref": "#/$defs/shared5"
              },
              "totalMarket": {
                "$ref": "#/$defs/shared5"
              },
              "totalUnrealized": {
                "$ref": "#/$defs/shared5"
              }
            },
            "additionalProperties": false
          }
        },
        "portfolio": {
          "$ref": "#/$defs/shared17"
        },
        "reportType": {
          "type": "string",
          "const": "balance-sheet"
        },
        "generatedAt": {
          "type": "string",
          "format": "date-time"
        },
        "valuationMethod": {
          "enum": [
            "cost",
            "market",
            "both"
          ],
          "type": "string"
        }
      },
      "additionalProperties": false
    },
    "DailySummaryJsonReportDto": {
      "type": "object",
      "required": [
        "data"
      ],
      "properties": {
        "data": {
          "type": "array",
          "items": {
            "type": "object",
            "required": [
              "wallet",
              "token",
              "date",
              "amountIn",
              "amountOut",
              "amountCost",
              "balance"
            ],
            "properties": {
              "date": {
                "type": "string",
                "format": "date-time"
              },
              "token": {
                "type": "object",
                "required": [
                  "chainId",
                  "address",
                  "symbol"
                ],
                "properties": {
                  "symbol": {
                    "type": "string"
                  },
                  "address": {
                    "type": "string"
                  },
                  "chainId": {
                    "type": "string"
                  }
                },
                "additionalProperties": false
              },
              "wallet": {
                "type": "object",
                "required": [
                  "chainId",
                  "address",
                  "name"
                ],
                "properties": {
                  "name": {
                    "type": "string"
                  },
                  "address": {
                    "type": "string"
                  },
                  "chainId": {
                    "type": "string"
                  }
                },
                "additionalProperties": false
              },
              "balance": {
                "$ref": "#/$defs/shared5"
              },
              "amountIn": {
                "$ref": "#/$defs/shared5"
              },
              "amountOut": {
                "$ref": "#/$defs/shared5"
              },
              "amountCost": {
                "$ref": "#/$defs/shared5"
              }
            },
            "additionalProperties": false
          }
        }
      },
      "additionalProperties": false
    },
    "TransactionsJsonReportDto": {
      "type": "object",
      "required": [
        "transactions",
        "fiatCurrencies",
        "responsibilityCenterColumns"
      ],
      "properties": {
        "transactions": {
          "type": "array",
          "items": {
            "type": "object",
            "required": [
              "chainId",
              "walletName",
              "timestamp",
              "transferType",
              "walletAddress",
              "from",
              "fromLabel",
              "fromCounterpartyName",
              "fromCounterpartyExternalId",
              "to",
              "toLabel",
              "toCounterpartyName",
              "toCounterpartyExternalId",
              "symbol",
              "amount",
              "balance",
              "tokenAddress",
              "assetId",
              "transactionHash",
              "memo",
              "tags",
              "account",
              "responsibilityCenterCells",
              "attachedFileLinks"
            ],
            "properties": {
              "to": {
                "type": "string"
              },
              "from": {
                "type": "string"
              },
              "memo": {
                "type": "string"
              },
              "tags": {
                "type": "string"
              },
              "amount": {
                "type": "number"
              },
              "symbol": {
                "type": "string"
              },
              "account": {
                "type": "string"
              },
              "assetId": {
                "type": "string"
              },
              "balance": {
                "type": "number"
              },
              "chainId": {
                "type": "string"
              },
              "subType": {
                "type": "string"
              },
              "toLabel": {
                "type": "string"
              },
              "costBasis": {
                "type": "number"
              },
              "fromLabel": {
                "type": "string"
              },
              "timestamp": {
                "type": "string",
                "format": "date-time"
              },
              "walletName": {
                "type": "string"
              },
              "marketValue": {
                "type": "number"
              },
              "tokenAddress": {
                "type": "string"
              },
              "transferType": {
                "enum": [
                  "IN",
                  "OUT",
                  "GAS",
                  "SELF"
                ],
                "type": "string"
              },
              "operationType": {
                "$ref": "#/$defs/shared0"
              },
              "walletAddress": {
                "type": "string"
              },
              "transactionHash": {
                "type": "string"
              },
              "attachedFileLinks": {
                "type": "string"
              },
              "toCounterpartyName": {
                "type": "string"
              },
              "fromCounterpartyName": {
                "type": "string"
              },
              "portfolioTransactionId": {
                "type": "string"
              },
              "toCounterpartyExternalId": {
                "type": "string"
              },
              "responsibilityCenterCells": {
                "$ref": "#/$defs/shared1"
              },
              "fromCounterpartyExternalId": {
                "type": "string"
              }
            },
            "additionalProperties": false
          }
        },
        "fiatCurrencies": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "responsibilityCenterColumns": {
          "$ref": "#/$defs/shared2"
        }
      },
      "additionalProperties": false
    },
    "TrialBalanceJsonReportDto": {
      "type": "object",
      "required": [
        "portfolio",
        "asOfDate",
        "reportType",
        "rows",
        "subtotals",
        "totalDebits",
        "totalCredits",
        "difference",
        "isBalanced"
      ],
      "properties": {
        "rows": {
          "type": "array",
          "items": {
            "type": "object",
            "required": [
              "accountNumber",
              "accountName",
              "accountType",
              "accountSubType",
              "debit",
              "credit"
            ],
            "properties": {
              "debit": {
                "$ref": "#/$defs/shared5"
              },
              "credit": {
                "$ref": "#/$defs/shared5"
              },
              "accountName": {
                "type": "string"
              },
              "accountType": {
                "$ref": "#/$defs/shared15"
              },
              "accountNumber": {
                "type": "string"
              },
              "accountDetails": {
                "type": "object",
                "required": [
                  "name",
                  "currency",
                  "normalBalanceType",
                  "origin",
                  "isActive"
                ],
                "properties": {
                  "name": {
                    "type": "string"
                  },
                  "origin": {
                    "enum": [
                      "SYSTEM_MANAGED",
                      "SYSTEM_DEFAULT",
                      "USER_MANAGED"
                    ],
                    "type": "string"
                  },
                  "assetId": {
                    "type": "string"
                  },
                  "currency": {
                    "type": "string"
                  },
                  "isActive": {
                    "type": "boolean"
                  },
                  "paymentLabel": {
                    "type": "string"
                  },
                  "normalBalanceType": {
                    "enum": [
                      "DR",
                      "CR"
                    ],
                    "type": "string"
                  },
                  "parentAccountNumber": {
                    "type": "string"
                  }
                },
                "additionalProperties": false
              },
              "accountSubType": {
                "type": "string"
              }
            },
            "additionalProperties": false
          }
        },
        "asOfDate": {
          "type": "string",
          "format": "date-time"
        },
        "portfolio": {
          "$ref": "#/$defs/shared8"
        },
        "subtotals": {
          "type": "array",
          "items": {
            "type": "object",
            "required": [
              "accountType",
              "debit",
              "credit",
              "accountCount"
            ],
            "properties": {
              "debit": {
                "$ref": "#/$defs/shared5"
              },
              "credit": {
                "$ref": "#/$defs/shared5"
              },
              "accountType": {
                "$ref": "#/$defs/shared15"
              },
              "accountCount": {
                "$ref": "#/$defs/shared14"
              }
            },
            "additionalProperties": false
          }
        },
        "difference": {
          "$ref": "#/$defs/shared5"
        },
        "isBalanced": {
          "type": "boolean"
        },
        "reportType": {
          "enum": [
            "unadjusted",
            "adjusted"
          ],
          "type": "string"
        },
        "totalDebits": {
          "$ref": "#/$defs/shared5"
        },
        "totalCredits": {
          "$ref": "#/$defs/shared5"
        }
      },
      "additionalProperties": false
    },
    "IncomeExpenseJsonReportDto": {
      "type": "object",
      "required": [
        "portfolio",
        "reports",
        "responsibilityCenterColumns",
        "summary"
      ],
      "properties": {
        "endDate": {
          "type": "string",
          "format": "date-time"
        },
        "reports": {
          "type": "array",
          "items": {
            "type": "object",
            "required": [
              "date",
              "accountType",
              "accountSubType",
              "accountName",
              "fromCounterpartyName",
              "fromCounterpartyExternalId",
              "toCounterpartyName",
              "toCounterpartyExternalId",
              "operationType",
              "amount",
              "responsibilityCenterCells"
            ],
            "properties": {
              "date": {
                "type": "string",
                "format": "date-time"
              },
              "memo": {
                "type": "string"
              },
              "amount": {
                "type": "number"
              },
              "accountName": {
                "type": "string"
              },
              "accountType": {
                "$ref": "#/$defs/shared15"
              },
              "assetAmount": {
                "type": "number"
              },
              "operationType": {
                "anyOf": [
                  {
                    "$ref": "#/$defs/shared0"
                  },
                  {
                    "type": "string",
                    "const": "N/A"
                  }
                ]
              },
              "accountSubType": {
                "type": "string"
              },
              "toCounterpartyName": {
                "type": "string"
              },
              "fromCounterpartyName": {
                "type": "string"
              },
              "toCounterpartyExternalId": {
                "type": "string"
              },
              "responsibilityCenterCells": {
                "$ref": "#/$defs/shared1"
              },
              "fromCounterpartyExternalId": {
                "type": "string"
              }
            },
            "additionalProperties": false
          }
        },
        "summary": {
          "type": "object",
          "required": [
            "totalIncome",
            "totalExpense",
            "netIncome",
            "incomeBySubType",
            "expenseBySubType",
            "currency"
          ],
          "properties": {
            "currency": {
              "type": "string"
            },
            "netIncome": {
              "type": "number"
            },
            "totalIncome": {
              "type": "number"
            },
            "totalExpense": {
              "type": "number"
            },
            "incomeBySubType": {
              "$ref": "#/$defs/shared16"
            },
            "expenseBySubType": {
              "$ref": "#/$defs/shared16"
            }
          },
          "additionalProperties": false
        },
        "portfolio": {
          "$ref": "#/$defs/shared8"
        },
        "startDate": {
          "type": "string",
          "format": "date-time"
        },
        "responsibilityCenterColumns": {
          "$ref": "#/$defs/shared2"
        }
      },
      "additionalProperties": false
    },
    "ProfitAndLossJsonReportDto": {
      "type": "object",
      "required": [
        "reportType",
        "portfolio",
        "period",
        "totals"
      ],
      "properties": {
        "period": {
          "type": "object",
          "properties": {
            "to": {
              "type": "string",
              "format": "date-time"
            },
            "from": {
              "type": "string",
              "format": "date-time"
            }
          },
          "additionalProperties": false
        },
        "totals": {
          "type": "object",
          "required": [
            "totalRevenue",
            "totalExpensesAndLosses",
            "netIncome",
            "transactionCount"
          ],
          "properties": {
            "netIncome": {
              "$ref": "#/$defs/shared5"
            },
            "totalRevenue": {
              "$ref": "#/$defs/shared5"
            },
            "transactionCount": {
              "$ref": "#/$defs/shared14"
            },
            "totalExpensesAndLosses": {
              "$ref": "#/$defs/shared5"
            }
          },
          "additionalProperties": false
        },
        "sections": {
          "type": "array",
          "items": {
            "type": "object",
            "required": [
              "type",
              "total",
              "items"
            ],
            "properties": {
              "type": {
                "enum": [
                  "REVENUE",
                  "EXPENSES"
                ],
                "type": "string"
              },
              "items": {
                "$ref": "#/$defs/shared18"
              },
              "total": {
                "$ref": "#/$defs/shared5"
              }
            },
            "additionalProperties": false
          }
        },
        "portfolio": {
          "$ref": "#/$defs/shared17"
        },
        "reportType": {
          "type": "string",
          "const": "profit-and-loss"
        }
      },
      "additionalProperties": false
    },
    "JournalEntriesJsonReportDto": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "id",
          "timestamp",
          "isAdjustment",
          "status",
          "createdAt",
          "updatedAt",
          "lines",
          "portfolio"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "memo": {
            "type": "string"
          },
          "lines": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "lineNumber",
                "accountId",
                "entryType",
                "fiatAmount",
                "attribution",
                "createdAt",
                "updatedAt",
                "account"
              ],
              "properties": {
                "memo": {
                  "type": "string"
                },
                "asset": {
                  "$ref": "#/$defs/shared7"
                },
                "account": {
                  "type": "object",
                  "required": [
                    "name",
                    "accountNumber",
                    "fiatCurrency"
                  ],
                  "properties": {
                    "name": {
                      "type": "string"
                    },
                    "fiatCurrency": {
                      "$ref": "#/$defs/shared7"
                    },
                    "accountNumber": {
                      "type": "string"
                    }
                  },
                  "additionalProperties": false
                },
                "assetId": {
                  "type": "string"
                },
                "txIndex": {
                  "$ref": "#/$defs/shared4"
                },
                "accountId": {
                  "type": "string"
                },
                "createdAt": {
                  "type": "string",
                  "format": "date-time"
                },
                "entryType": {
                  "enum": [
                    "DR",
                    "CR"
                  ],
                  "type": "string"
                },
                "updatedAt": {
                  "type": "string",
                  "format": "date-time"
                },
                "fiatAmount": {
                  "$ref": "#/$defs/shared5"
                },
                "lineNumber": {
                  "$ref": "#/$defs/shared4"
                },
                "lotEntryId": {
                  "type": "string"
                },
                "assetAmount": {
                  "$ref": "#/$defs/shared5"
                },
                "attribution": {
                  "type": "object",
                  "required": [
                    "rc"
                  ],
                  "properties": {
                    "a": {
                      "$ref": "#/$defs/shared6"
                    },
                    "c": {
                      "$ref": "#/$defs/shared6"
                    },
                    "m": {
                      "$ref": "#/$defs/shared6"
                    },
                    "rc": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "t",
                          "s"
                        ],
                        "properties": {
                          "r": {
                            "type": "string"
                          },
                          "s": {
                            "type": "string"
                          },
                          "t": {
                            "type": "string"
                          },
                          "v": {
                            "$ref": "#/$defs/shared4"
                          }
                        },
                        "additionalProperties": false
                      }
                    }
                  },
                  "additionalProperties": false
                },
                "costBasisLot": {
                  "type": "object",
                  "required": [
                    "id",
                    "entryId"
                  ],
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "entryId": {
                      "type": "string"
                    }
                  },
                  "additionalProperties": false
                },
                "periodCloseId": {
                  "type": "string"
                },
                "counterpartyId": {
                  "type": "string"
                },
                "originalAccountId": {
                  "type": "string"
                },
                "walletTransactionId": {
                  "type": "string"
                }
              },
              "additionalProperties": false
            }
          },
          "status": {
            "type": "string"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "portfolio": {
            "type": "object",
            "required": [
              "slug"
            ],
            "properties": {
              "slug": {
                "type": "string"
              }
            },
            "additionalProperties": false
          },
          "timestamp": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "systemNotes": {
            "type": "string"
          },
          "isAdjustment": {
            "type": "boolean"
          },
          "portfolioTransaction": {
            "type": "object",
            "required": [
              "id",
              "operationType"
            ],
            "properties": {
              "id": {
                "type": "string"
              },
              "subType": {
                "type": "string"
              },
              "operationType": {
                "$ref": "#/$defs/shared0"
              }
            },
            "additionalProperties": false
          },
          "portfolioTransactionId": {
            "type": "string"
          }
        },
        "additionalProperties": false
      }
    },
    "BalanceSheetStatementLineDto": {
      "type": "object",
      "required": [
        "id",
        "label",
        "costBasis",
        "level"
      ],
      "properties": {
        "id": {
          "type": "string"
        },
        "label": {
          "type": "string"
        },
        "level": {
          "$ref": "#/$defs/shared14"
        },
        "isBold": {
          "type": "boolean"
        },
        "wallet": {
          "type": "string"
        },
        "children": {
          "$ref": "#/$defs/shared26"
        },
        "location": {
          "type": "string"
        },
        "quantity": {
          "type": "string"
        },
        "costBasis": {
          "$ref": "#/$defs/shared5"
        },
        "isSubtotal": {
          "type": "boolean"
        },
        "marketValue": {
          "$ref": "#/$defs/shared5"
        },
        "unrealizedGL": {
          "$ref": "#/$defs/shared5"
        },
        "accountNumber": {
          "type": "string"
        }
      },
      "additionalProperties": false
    },
    "CostBasisLedgerJsonReportDto": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "assetId",
          "id",
          "entryId",
          "timestamp",
          "acquisitionTimestamp",
          "diff",
          "value",
          "lotMethod",
          "entryKind",
          "portfolioTransactionId",
          "asset",
          "wallet",
          "portfolioTransaction",
          "portfolio"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "diff": {
            "$ref": "#/$defs/shared5"
          },
          "asset": {
            "$ref": "#/$defs/shared7"
          },
          "price": {
            "$ref": "#/$defs/shared5"
          },
          "value": {
            "$ref": "#/$defs/shared5"
          },
          "wallet": {
            "type": "object",
            "required": [
              "chainId",
              "address",
              "name",
              "chain"
            ],
            "properties": {
              "name": {
                "type": "string"
              },
              "chain": {
                "type": "object",
                "required": [
                  "name"
                ],
                "properties": {
                  "name": {
                    "type": "string"
                  }
                },
                "additionalProperties": false
              },
              "address": {
                "type": "string"
              },
              "chainId": {
                "type": "string"
              }
            },
            "additionalProperties": false
          },
          "assetId": {
            "type": "string"
          },
          "entryId": {
            "type": "string"
          },
          "entryKind": {
            "enum": [
              "ADD",
              "DSP",
              "CUT",
              "RES",
              "REL",
              "MVE"
            ],
            "type": "string"
          },
          "lotMethod": {
            "type": "string"
          },
          "portfolio": {
            "type": "object",
            "required": [
              "slug",
              "currency"
            ],
            "properties": {
              "slug": {
                "type": "string"
              },
              "currency": {
                "type": "string"
              }
            },
            "additionalProperties": false
          },
          "timestamp": {
            "type": "string",
            "format": "date-time"
          },
          "positionId": {
            "type": "string"
          },
          "periodCloseId": {
            "type": "string"
          },
          "acquisitionTimestamp": {
            "type": "string",
            "format": "date-time"
          },
          "portfolioTransaction": {
            "type": "object",
            "required": [
              "operationType"
            ],
            "properties": {
              "subType": {
                "type": "string"
              },
              "operationType": {
                "$ref": "#/$defs/shared0"
              }
            },
            "additionalProperties": false
          },
          "portfolioTransactionId": {
            "type": "string"
          }
        },
        "additionalProperties": false
      }
    },
    "PaymentRequestsJsonReportDto": {
      "type": "object",
      "required": [
        "rows",
        "responsibilityCenterColumns"
      ],
      "properties": {
        "rows": {
          "type": "array",
          "items": {
            "type": "object",
            "required": [
              "id",
              "requestNumber",
              "status",
              "requestedAt",
              "paymentType",
              "amount",
              "tokenSymbol",
              "tokenAddress",
              "chain",
              "counterparty",
              "counterpartyExternalId",
              "recipientAddress",
              "paymentMethodType",
              "bankName",
              "accountLast4",
              "ledgerAccount",
              "responsibilityCenterCells",
              "requestorEmail",
              "convertedBy",
              "description",
              "fileAttachments"
            ],
            "properties": {
              "id": {
                "type": "string"
              },
              "chain": {
                "type": "string"
              },
              "amount": {
                "$ref": "#/$defs/shared5"
              },
              "status": {
                "type": "string"
              },
              "bankName": {
                "type": "string"
              },
              "convertedAt": {
                "type": "string",
                "format": "date-time"
              },
              "convertedBy": {
                "type": "string"
              },
              "description": {
                "type": "string"
              },
              "paymentType": {
                "enum": [
                  "CRYPTO",
                  "FIAT"
                ],
                "type": "string"
              },
              "requestedAt": {
                "type": "string",
                "format": "date-time"
              },
              "submittedAt": {
                "type": "string",
                "format": "date-time"
              },
              "tokenSymbol": {
                "type": "string"
              },
              "accountLast4": {
                "type": "string"
              },
              "counterparty": {
                "type": "string"
              },
              "tokenAddress": {
                "type": "string"
              },
              "ledgerAccount": {
                "type": "string"
              },
              "requestNumber": {
                "type": "string"
              },
              "requestorEmail": {
                "type": "string"
              },
              "fileAttachments": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "id",
                    "fileName"
                  ],
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "fileName": {
                      "type": "string"
                    }
                  },
                  "additionalProperties": false
                }
              },
              "recipientAddress": {
                "type": "string"
              },
              "paymentMethodType": {
                "type": "string"
              },
              "counterpartyExternalId": {
                "type": "string"
              },
              "responsibilityCenterCells": {
                "$ref": "#/$defs/shared1"
              }
            },
            "additionalProperties": false
          }
        },
        "responsibilityCenterColumns": {
          "$ref": "#/$defs/shared2"
        }
      },
      "additionalProperties": false
    },
    "ProfitAndLossStatementNodeDto": {
      "type": "object",
      "required": [
        "id",
        "label",
        "accountNumber",
        "amount"
      ],
      "properties": {
        "id": {
          "type": "string"
        },
        "label": {
          "type": "string"
        },
        "amount": {
          "$ref": "#/$defs/shared5"
        },
        "children": {
          "$ref": "#/$defs/shared18"
        },
        "accountNumber": {
          "type": "string"
        }
      },
      "additionalProperties": false
    },
    "ConsolidatedBalanceSheetJsonReportDto": {
      "type": "object",
      "required": [
        "scope",
        "statement",
        "eliminationSchedule",
        "warnings",
        "summary"
      ],
      "properties": {
        "scope": {
          "$ref": "#/$defs/shared27"
        },
        "summary": {
          "type": "object",
          "required": [
            "totalAssets",
            "totalLiabilities",
            "totalEquity",
            "netWorth"
          ],
          "properties": {
            "netWorth": {
              "$ref": "#/$defs/shared5"
            },
            "totalAssets": {
              "$ref": "#/$defs/shared5"
            },
            "totalEquity": {
              "$ref": "#/$defs/shared5"
            },
            "totalLiabilities": {
              "$ref": "#/$defs/shared5"
            }
          },
          "additionalProperties": false
        },
        "warnings": {
          "$ref": "#/$defs/shared37"
        },
        "statement": {
          "$ref": "#/$defs/shared30"
        },
        "eliminationSchedule": {
          "$ref": "#/$defs/shared40"
        }
      },
      "additionalProperties": false
    },
    "ConsolidatedProfitAndLossJsonReportDto": {
      "type": "object",
      "required": [
        "scope",
        "statement",
        "eliminationSchedule",
        "warnings",
        "summary"
      ],
      "properties": {
        "scope": {
          "$ref": "#/$defs/shared27"
        },
        "summary": {
          "type": "object",
          "required": [
            "totalRevenue",
            "ordinaryIncome",
            "capitalGains",
            "totalExpensesAndLosses",
            "ordinaryExpense",
            "capitalLosses",
            "netIncome",
            "transactionCount"
          ],
          "properties": {
            "netIncome": {
              "$ref": "#/$defs/shared5"
            },
            "capitalGains": {
              "$ref": "#/$defs/shared5"
            },
            "totalRevenue": {
              "$ref": "#/$defs/shared5"
            },
            "capitalLosses": {
              "$ref": "#/$defs/shared5"
            },
            "ordinaryIncome": {
              "$ref": "#/$defs/shared5"
            },
            "ordinaryExpense": {
              "$ref": "#/$defs/shared5"
            },
            "transactionCount": {
              "$ref": "#/$defs/shared14"
            },
            "totalExpensesAndLosses": {
              "$ref": "#/$defs/shared5"
            }
          },
          "additionalProperties": false
        },
        "warnings": {
          "$ref": "#/$defs/shared37"
        },
        "statement": {
          "$ref": "#/$defs/shared30"
        },
        "eliminationSchedule": {
          "$ref": "#/$defs/shared40"
        }
      },
      "additionalProperties": false
    }
  },
  "oneOf": [
    {
      "type": "object",
      "required": [
        "requestId",
        "type",
        "status",
        "progress",
        "createdAt",
        "updatedAt",
        "kind"
      ],
      "properties": {
        "kind": {
          "type": "string",
          "const": "job"
        },
        "type": {
          "$ref": "#/properties/type"
        },
        "error": {
          "$ref": "#/properties/error"
        },
        "result": {
          "$ref": "#/properties/result"
        },
        "status": {
          "$ref": "#/properties/status"
        },
        "outcome": {
          "$ref": "#/properties/outcome"
        },
        "subject": {
          "$ref": "#/properties/subject"
        },
        "progress": {
          "$ref": "#/properties/progress"
        },
        "createdAt": {
          "$ref": "#/properties/createdAt"
        },
        "requestId": {
          "$ref": "#/properties/requestId"
        },
        "updatedAt": {
          "$ref": "#/properties/updatedAt"
        },
        "finishedOn": {
          "$ref": "#/properties/finishedOn"
        },
        "appProgress": {
          "$ref": "#/properties/appProgress"
        },
        "completedAt": {
          "$ref": "#/properties/completedAt"
        },
        "returnValue": {
          "$ref": "#/properties/returnValue"
        }
      },
      "additionalProperties": false
    },
    {
      "type": "object",
      "required": [
        "status",
        "progressPercent",
        "createdAt",
        "kind",
        "requestId"
      ],
      "properties": {
        "kind": {
          "type": "string",
          "const": "report"
        },
        "error": {
          "$ref": "#/properties/error"
        },
        "result": {
          "$ref": "#/properties/result"
        },
        "status": {
          "$ref": "#/properties/status"
        },
        "createdAt": {
          "$ref": "#/properties/createdAt"
        },
        "requestId": {
          "$ref": "#/properties/requestId"
        },
        "completedAt": {
          "$ref": "#/properties/completedAt"
        },
        "progressPercent": {
          "$ref": "#/properties/progressPercent"
        }
      },
      "additionalProperties": false
    }
  ],
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "required": [
    "requestId",
    "status",
    "createdAt",
    "kind"
  ],
  "properties": {
    "kind": {
      "enum": [
        "job",
        "report"
      ],
      "type": "string"
    },
    "type": {
      "enum": [
        "sync",
        "export",
        "recompute",
        "reclassify"
      ],
      "type": "string"
    },
    "error": {
      "anyOf": [
        {
          "$ref": "#/$defs/shared65"
        },
        {
          "$ref": "#/$defs/shared65"
        }
      ]
    },
    "result": {
      "anyOf": [
        {
          "type": "object",
          "required": [
            "downloadUrl",
            "fileSize",
            "format"
          ],
          "properties": {
            "format": {
              "enum": [
                "xlsx",
                "pdf",
                "json"
              ],
              "type": "string"
            },
            "fileSize": {
              "type": "number"
            },
            "downloadUrl": {
              "type": "string"
            }
          },
          "additionalProperties": false
        },
        {
          "anyOf": [
            {
              "type": "object",
              "required": [
                "type",
                "totals"
              ],
              "properties": {
                "type": {
                  "type": "string",
                  "const": "totals"
                },
                "totals": {
                  "$ref": "#/$defs/shared45"
                }
              },
              "additionalProperties": false
            },
            {
              "type": "object",
              "required": [
                "type",
                "totals"
              ],
              "properties": {
                "type": {
                  "type": "string",
                  "const": "full"
                },
                "totals": {
                  "$ref": "#/$defs/shared45"
                },
                "downloadUrl": {
                  "type": "string",
                  "format": "uri"
                }
              },
              "additionalProperties": false
            },
            {
              "anyOf": [
                {
                  "type": "object",
                  "required": [
                    "type",
                    "rows",
                    "totals"
                  ],
                  "properties": {
                    "rows": {
                      "$ref": "#/$defs/TransactionsJsonReportDto"
                    },
                    "type": {
                      "type": "string",
                      "const": "json"
                    },
                    "totals": {
                      "$ref": "#/$defs/shared59"
                    },
                    "totalsOnly": {
                      "type": "boolean"
                    }
                  },
                  "additionalProperties": false
                },
                {
                  "type": "object",
                  "required": [
                    "type",
                    "rows",
                    "totals"
                  ],
                  "properties": {
                    "rows": {
                      "$ref": "#/$defs/JournalEntriesJsonReportDto"
                    },
                    "type": {
                      "type": "string",
                      "const": "json"
                    },
                    "totals": {
                      "$ref": "#/$defs/shared60"
                    },
                    "totalsOnly": {
                      "type": "boolean"
                    }
                  },
                  "additionalProperties": false
                },
                {
                  "type": "object",
                  "required": [
                    "type",
                    "rows",
                    "totals"
                  ],
                  "properties": {
                    "rows": {
                      "$ref": "#/$defs/GainsLossesJsonReportDto"
                    },
                    "type": {
                      "type": "string",
                      "const": "json"
                    },
                    "totals": {
                      "$ref": "#/$defs/shared53"
                    },
                    "totalsOnly": {
                      "type": "boolean"
                    }
                  },
                  "additionalProperties": false
                },
                {
                  "type": "object",
                  "required": [
                    "type",
                    "rows",
                    "totals"
                  ],
                  "properties": {
                    "rows": {
                      "$ref": "#/$defs/CostBasisLedgerJsonReportDto"
                    },
                    "type": {
                      "type": "string",
                      "const": "json"
                    },
                    "totals": {
                      "$ref": "#/$defs/shared61"
                    },
                    "totalsOnly": {
                      "type": "boolean"
                    }
                  },
                  "additionalProperties": false
                },
                {
                  "type": "object",
                  "required": [
                    "type",
                    "rows",
                    "totals"
                  ],
                  "properties": {
                    "rows": {
                      "$ref": "#/$defs/IncomeExpenseJsonReportDto"
                    },
                    "type": {
                      "type": "string",
                      "const": "json"
                    },
                    "totals": {
                      "$ref": "#/$defs/shared52"
                    },
                    "totalsOnly": {
                      "type": "boolean"
                    }
                  },
                  "additionalProperties": false
                },
                {
                  "type": "object",
                  "required": [
                    "type",
                    "rows",
                    "totals"
                  ],
                  "properties": {
                    "rows": {
                      "$ref": "#/$defs/ProfitAndLossJsonReportDto"
                    },
                    "type": {
                      "type": "string",
                      "const": "json"
                    },
                    "totals": {
                      "$ref": "#/$defs/shared46"
                    },
                    "totalsOnly": {
                      "type": "boolean"
                    }
                  },
                  "additionalProperties": false
                },
                {
                  "type": "object",
                  "required": [
                    "type",
                    "rows",
                    "totals"
                  ],
                  "properties": {
                    "rows": {
                      "$ref": "#/$defs/StatementJsonReportDto"
                    },
                    "type": {
                      "type": "string",
                      "const": "json"
                    },
                    "totals": {
                      "$ref": "#/$defs/shared58"
                    },
                    "totalsOnly": {
                      "type": "boolean"
                    }
                  },
                  "additionalProperties": false
                },
                {
                  "type": "object",
                  "required": [
                    "type",
                    "rows",
                    "totals"
                  ],
                  "properties": {
                    "rows": {
                      "$ref": "#/$defs/BalanceSheetJsonReportDto"
                    },
                    "type": {
                      "type": "string",
                      "const": "json"
                    },
                    "totals": {
                      "$ref": "#/$defs/shared49"
                    },
                    "totalsOnly": {
                      "type": "boolean"
                    }
                  },
                  "additionalProperties": false
                },
                {
                  "type": "object",
                  "required": [
                    "type",
                    "rows",
                    "totals"
                  ],
                  "properties": {
                    "rows": {
                      "$ref": "#/$defs/TrialBalanceJsonReportDto"
                    },
                    "type": {
                      "type": "string",
                      "const": "json"
                    },
                    "totals": {
                      "$ref": "#/$defs/shared54"
                    },
                    "totalsOnly": {
                      "type": "boolean"
                    }
                  },
                  "additionalProperties": false
                },
                {
                  "type": "object",
                  "required": [
                    "type",
                    "rows",
                    "totals"
                  ],
                  "properties": {
                    "rows": {
                      "$ref": "#/$defs/PaymentRequestsJsonReportDto"
                    },
                    "type": {
                      "type": "string",
                      "const": "json"
                    },
                    "totals": {
                      "$ref": "#/$defs/shared62"
                    },
                    "totalsOnly": {
                      "type": "boolean"
                    }
                  },
                  "additionalProperties": false
                },
                {
                  "type": "object",
                  "required": [
                    "type",
                    "rows",
                    "totals"
                  ],
                  "properties": {
                    "rows": {
                      "$ref": "#/$defs/DailySummaryJsonReportDto"
                    },
                    "type": {
                      "type": "string",
                      "const": "json"
                    },
                    "totals": {
                      "$ref": "#/$defs/shared57"
                    },
                    "totalsOnly": {
                      "type": "boolean"
                    }
                  },
                  "additionalProperties": false
                },
                {
                  "type": "object",
                  "required": [
                    "type",
                    "rows",
                    "totals"
                  ],
                  "properties": {
                    "rows": {
                      "$ref": "#/$defs/ConsolidatedProfitAndLossJsonReportDto"
                    },
                    "type": {
                      "type": "string",
                      "const": "json"
                    },
                    "totals": {
                      "$ref": "#/$defs/shared47"
                    },
                    "totalsOnly": {
                      "type": "boolean"
                    }
                  },
                  "additionalProperties": false
                },
                {
                  "type": "object",
                  "required": [
                    "type",
                    "rows",
                    "totals"
                  ],
                  "properties": {
                    "rows": {
                      "$ref": "#/$defs/ConsolidatedBalanceSheetJsonReportDto"
                    },
                    "type": {
                      "type": "string",
                      "const": "json"
                    },
                    "totals": {
                      "$ref": "#/$defs/shared50"
                    },
                    "totalsOnly": {
                      "type": "boolean"
                    }
                  },
                  "additionalProperties": false
                }
              ]
            }
          ]
        }
      ]
    },
    "status": {
      "enum": [
        "pending",
        "active",
        "delayed",
        "completed",
        "failed",
        "processing"
      ],
      "type": "string"
    },
    "outcome": {
      "type": "object",
      "required": [
        "type",
        "transactionId",
        "hasError",
        "errorTypes",
        "suggestedAction"
      ],
      "properties": {
        "type": {
          "type": "string",
          "const": "portfolio_transaction"
        },
        "hasError": {
          "type": "boolean"
        },
        "errorTypes": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "operationType": {
          "type": "string"
        },
        "transactionId": {
          "type": "string"
        },
        "suggestedAction": {},
        "classificationState": {
          "type": "string"
        }
      },
      "additionalProperties": false
    },
    "subject": {
      "type": "object",
      "required": [
        "kind",
        "transactionId"
      ],
      "properties": {
        "kind": {
          "type": "string",
          "const": "portfolio_transaction"
        },
        "commandType": {
          "type": "string"
        },
        "transactionId": {
          "type": "string"
        }
      },
      "additionalProperties": false
    },
    "progress": {
      "type": "number"
    },
    "createdAt": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "string",
          "format": "date-time"
        }
      ]
    },
    "requestId": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "string"
        }
      ]
    },
    "updatedAt": {
      "type": "string",
      "format": "date-time"
    },
    "finishedOn": {
      "type": "number"
    },
    "appProgress": {
      "type": "object",
      "required": [
        "completed",
        "total",
        "transactionsSynced"
      ],
      "properties": {
        "total": {
          "type": "number"
        },
        "completed": {
          "type": "number"
        },
        "transactionsSynced": {
          "type": "number"
        }
      },
      "additionalProperties": false
    },
    "completedAt": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "string",
          "format": "date-time"
        }
      ]
    },
    "returnValue": {},
    "progressPercent": {
      "type": "number",
      "maximum": 100,
      "minimum": 0
    }
  },
  "additionalProperties": false
}
get_request_status annotations
{
  "title": "Get Request Status",
  "readOnlyHint": true,
  "openWorldHint": false,
  "idempotentHint": true,
  "destructiveHint": false
}
add_wallet — Add Wallet(s) to Portfolio
Advertised by the server during the last successful anonymous check.
Open-world

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. It does not configure exchange accounts and reports which addresses were added or skipped.

add_wallet input schema
{
  "type": "object",
  "required": [
    "workspaceRef",
    "portfolioRef",
    "wallets"
  ],
  "properties": {
    "wallets": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "address"
        ],
        "properties": {
          "name": {
            "type": "string",
            "maxLength": 100,
            "description": "Optional wallet name"
          },
          "address": {
            "type": "string",
            "minLength": 1,
            "description": "Wallet address"
          },
          "integrationId": {
            "type": "string",
            "minLength": 1,
            "description": "Integration id for chain resolution. Use 'evm' for automatic EVM chain discovery; use a specific integration id for direct chain add."
          }
        },
        "additionalProperties": false
      },
      "maxItems": 50,
      "minItems": 1
    },
    "portfolioRef": {
      "type": "string",
      "minLength": 1,
      "description": "Portfolio name or slug inside that workspace. Call list_portfolios to resolve it."
    },
    "workspaceRef": {
      "type": "string",
      "minLength": 1,
      "description": "Workspace name or slug. Call list_workspaces to resolve it."
    }
  },
  "additionalProperties": false
}
add_wallet output schema
{
  "type": "object",
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "required": [
    "results",
    "syncQueued"
  ],
  "properties": {
    "results": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "address",
          "status"
        ],
        "properties": {
          "reason": {
            "type": "string"
          },
          "status": {
            "enum": [
              "created",
              "skipped"
            ],
            "type": "string"
          },
          "address": {
            "type": "string"
          },
          "chainRef": {
            "type": "string"
          }
        },
        "additionalProperties": false
      }
    },
    "syncQueued": {
      "type": "boolean"
    }
  },
  "additionalProperties": false
}
add_wallet annotations
{
  "title": "Add Wallet(s) to Portfolio",
  "readOnlyHint": false,
  "openWorldHint": true,
  "idempotentHint": false,
  "destructiveHint": false
}
create_workspace — Create Workspace
Advertised by the server during the last successful anonymous check.
Open-world

Create a workspace when list_workspaces is empty or the user wants another; then create_portfolio. On failure, check list_workspaces before retrying.

create_workspace input schema
{
  "type": "object",
  "required": [
    "name"
  ],
  "properties": {
    "name": {
      "type": "string",
      "maxLength": 100,
      "minLength": 2,
      "description": "Workspace name"
    },
    "workspaceIntent": {
      "enum": [
        "PERSONAL_EVALUATION",
        "BUSINESS"
      ],
      "type": "string",
      "default": "PERSONAL_EVALUATION",
      "description": "Personal or business use"
    }
  },
  "additionalProperties": false
}
create_workspace output schema
{
  "type": "object",
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "required": [
    "name",
    "slug",
    "planName",
    "limits"
  ],
  "properties": {
    "name": {
      "type": "string"
    },
    "slug": {
      "type": "string"
    },
    "limits": {
      "type": "object",
      "required": [
        "portfolios",
        "transactions",
        "users",
        "wallets"
      ],
      "properties": {
        "users": {
          "type": "number"
        },
        "wallets": {
          "type": "number"
        },
        "portfolios": {
          "type": "number"
        },
        "transactions": {
          "type": "number"
        }
      },
      "additionalProperties": false
    },
    "planName": {
      "type": "string"
    }
  },
  "additionalProperties": false
}
create_workspace annotations
{
  "title": "Create Workspace",
  "readOnlyHint": false,
  "openWorldHint": true,
  "idempotentHint": false,
  "destructiveHint": false
}
create_portfolio — Create Portfolio
Advertised by the server during the last successful anonymous check.
Open-world

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.

create_portfolio input schema
{
  "type": "object",
  "required": [
    "workspaceRef",
    "name"
  ],
  "properties": {
    "name": {
      "type": "string",
      "minLength": 1,
      "description": "Portfolio name"
    },
    "currency": {
      "type": "string",
      "pattern": "^[A-Z]{3}$",
      "description": "Functional currency (default USD)"
    },
    "workspaceRef": {
      "type": "string",
      "minLength": 1,
      "description": "Workspace name or slug. Call list_workspaces to resolve it."
    },
    "legalEntityType": {
      "anyOf": [
        {
          "enum": [
            "CORPORATION",
            "INDIVIDUAL",
            "TRUST",
            "PARTNERSHIP"
          ],
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "description": "Legal entity classification for an explicit country profile"
    },
    "jurisdictionCode": {
      "type": "string",
      "description": "Exact assigned ISO country code, or custom. If omitted, resolves Custom regardless of currency"
    },
    "reportingTimezone": {
      "type": "string",
      "description": "Canonical IANA reporting timezone (default UTC)"
    },
    "costBasisLotMethod": {
      "enum": [
        "FIFO",
        "LIFO",
        "HIFO",
        "ACB"
      ],
      "type": "string",
      "description": "Lot-matching method for disposals"
    },
    "costBasisPerWallet": {
      "type": "boolean",
      "description": "Whether acquisition lots stay scoped to each wallet"
    },
    "stablecoinTreatment": {
      "enum": [
        "BASE",
        "ASSET"
      ],
      "type": "string",
      "description": "Stablecoin valuation treatment; this does not change lot tracking"
    },
    "gasFeeAccountingTreatment": {
      "enum": [
        "DISPOSAL_AND_COST_BASIS",
        "EXPENSE_ONLY"
      ],
      "type": "string",
      "description": "Accounting treatment for gas spend"
    },
    "financialReportingFramework": {
      "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",
      "description": "Financial reporting framework (default TAX_ONLY)"
    }
  },
  "additionalProperties": false
}
create_portfolio output schema
{
  "type": "object",
  "required": [
    "slug",
    "name",
    "createdAt",
    "updatedAt",
    "currency",
    "accountingConfiguration",
    "reportingTimezone",
    "hasPostedActivity"
  ],
  "properties": {
    "name": {
      "type": "string"
    },
    "slug": {
      "type": "string"
    },
    "currency": {
      "type": "string"
    },
    "createdAt": {
      "type": "string",
      "format": "date-time"
    },
    "updatedAt": {
      "type": "string",
      "format": "date-time"
    },
    "legalEntityType": {
      "enum": [
        "BUSINESS",
        "CORPORATION",
        "INDIVIDUAL",
        "TRUST",
        "PARTNERSHIP"
      ],
      "type": "string"
    },
    "hasPostedActivity": {
      "type": "boolean"
    },
    "reportingTimezone": {
      "type": "string"
    },
    "accountingConfiguration": {
      "type": "object",
      "required": [
        "gasFeeAccountingTreatment",
        "isPurchaseTaxable",
        "costBasisLotMethod",
        "baseCurrency",
        "jurisdictionCode",
        "stablecoinTreatment",
        "costBasisPerWallet",
        "defiDepositTreatment",
        "separateIncomeExpenseLines",
        "financialReportingFramework"
      ],
      "properties": {
        "baseCurrency": {
          "type": "string"
        },
        "jurisdictionCode": {
          "type": "string"
        },
        "isPurchaseTaxable": {
          "type": "boolean"
        },
        "costBasisLotMethod": {
          "enum": [
            "FIFO",
            "LIFO",
            "HIFO",
            "ACB"
          ],
          "type": "string"
        },
        "costBasisPerWallet": {
          "type": "boolean"
        },
        "stablecoinTreatment": {
          "enum": [
            "BASE",
            "ASSET"
          ],
          "type": "string"
        },
        "defiDepositTreatment": {
          "enum": [
            "TAXABLE_EXCHANGE",
            "NON_TAXABLE_RESERVATION"
          ],
          "type": "string"
        },
        "gasFeeAccountingTreatment": {
          "enum": [
            "DISPOSAL_AND_COST_BASIS",
            "EXPENSE_ONLY"
          ],
          "type": "string"
        },
        "separateIncomeExpenseLines": {
          "type": "boolean"
        },
        "financialReportingFramework": {
          "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",
          "default": "TAX_ONLY"
        }
      },
      "additionalProperties": false
    }
  },
  "additionalProperties": false
}
create_portfolio annotations
{
  "title": "Create Portfolio",
  "readOnlyHint": false,
  "openWorldHint": true,
  "idempotentHint": false,
  "destructiveHint": false
}
get_asset_position — Get Asset Position
Advertised by the server during the last successful anonymous check.
Advertised read-only

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, not all ledger accounts; request a balance-sheet report for a complete statement.

get_asset_position input schema
{
  "type": "object",
  "required": [
    "workspaceRef",
    "portfolioRef",
    "assetRef"
  ],
  "properties": {
    "assetRef": {
      "type": "string",
      "description": "Asset symbol or canonical asset id"
    },
    "includeSpam": {
      "type": "boolean",
      "description": "Also match assets marked as spam"
    },
    "portfolioRef": {
      "type": "string",
      "description": "Portfolio exact name or slug"
    },
    "workspaceRef": {
      "type": "string",
      "description": "Workspace exact name or slug"
    }
  },
  "additionalProperties": false
}
get_asset_position output schema
{
  "type": "object",
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "required": [
    "asset",
    "currency",
    "valuation",
    "perWallet",
    "totals"
  ],
  "properties": {
    "asset": {
      "type": "object",
      "required": [
        "id",
        "symbol",
        "name"
      ],
      "properties": {
        "id": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "symbol": {
          "type": "string"
        }
      },
      "additionalProperties": false
    },
    "totals": {
      "type": "object",
      "required": [
        "quantity",
        "walletCount"
      ],
      "properties": {
        "quantity": {
          "type": "string"
        },
        "costBasis": {
          "type": "string"
        },
        "marketValue": {
          "type": "string"
        },
        "walletCount": {
          "type": "number"
        },
        "unrealizedGainLoss": {
          "type": "string"
        }
      },
      "additionalProperties": false
    },
    "currency": {
      "type": "string"
    },
    "pricedAt": {
      "type": "string"
    },
    "perWallet": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "chainRef",
          "quantity"
        ],
        "properties": {
          "chainRef": {
            "type": "string"
          },
          "quantity": {
            "type": "string"
          },
          "costBasis": {
            "type": "string"
          },
          "walletName": {
            "type": "string"
          },
          "marketValue": {
            "type": "string"
          },
          "walletAddress": {
            "type": "string"
          },
          "unrealizedGainLoss": {
            "type": "string"
          }
        },
        "additionalProperties": false
      }
    },
    "unitPrice": {
      "type": "string"
    },
    "valuation": {
      "type": "object",
      "required": [
        "status"
      ],
      "properties": {
        "reason": {
          "type": "string"
        },
        "source": {
          "enum": [
            "PORTFOLIO_CURRENCY",
            "STABLECOIN_PEG",
            "LIVE",
            "LAST_CLOSE",
            "HISTORICAL_CLOSE"
          ],
          "type": "string"
        },
        "status": {
          "enum": [
            "PRICED",
            "UNAVAILABLE"
          ],
          "type": "string"
        }
      },
      "additionalProperties": false
    }
  },
  "additionalProperties": false
}
get_asset_position annotations
{
  "title": "Get Asset Position",
  "readOnlyHint": true,
  "openWorldHint": false,
  "idempotentHint": true,
  "destructiveHint": false
}
list_chains — List Supported Chains
Advertised by the server during the last successful anonymous check.
Advertised read-only

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.

list_chains input schema
{
  "type": "object",
  "properties": {
    "query": {
      "type": "string",
      "description": "Optional chain name, slug, or EVM chain id (e.g. \"Optimism\", \"optimism-mainnet\", \"10\")"
    },
    "evmOnly": {
      "type": "boolean",
      "description": "When true, return only EVM-compatible chains"
    }
  },
  "additionalProperties": false
}
list_chains output schema
{
  "type": "object",
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "required": [
    "data"
  ],
  "properties": {
    "data": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "chainRef",
          "name",
          "isEvm"
        ],
        "properties": {
          "name": {
            "type": "string"
          },
          "isEvm": {
            "type": "boolean"
          },
          "logoUrl": {
            "type": "string"
          },
          "chainRef": {
            "type": "string"
          },
          "evmChainId": {
            "type": "string"
          },
          "description": {
            "type": "string"
          }
        },
        "additionalProperties": false
      }
    }
  },
  "additionalProperties": false
}
list_chains annotations
{
  "title": "List Supported Chains",
  "readOnlyHint": true,
  "openWorldHint": false,
  "idempotentHint": true,
  "destructiveHint": false
}
get_help — Get Help
Advertised by the server during the last successful anonymous check.
Advertised read-only

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 a slug from a previous search result to open that article.

get_help input schema
{
  "type": "object",
  "properties": {
    "slug": {
      "type": "string",
      "description": "Help article slug to open directly, from a previous get_help search result. Omit when using query."
    },
    "limit": {
      "anyOf": [
        {
          "type": "integer",
          "maximum": 10,
          "minimum": 1,
          "description": "Maximum number of search results, only used with query"
        },
        {
          "type": "string",
          "pattern": "^(?:1|2|3|4|5|6|7|8|9|10)$",
          "description": "Maximum number of search results, only used with query Numeric strings are accepted for MCP client compatibility."
        }
      ],
      "description": "Maximum number of search results, only used with query"
    },
    "query": {
      "type": "string",
      "description": "Search query for Tokenbooks instructions or accounting guidance. Omit when using slug."
    }
  },
  "additionalProperties": false
}
get_help output schema
{
  "type": "object",
  "anyOf": [
    {
      "type": "object",
      "required": [
        "query",
        "results"
      ],
      "properties": {
        "query": {
          "type": "string"
        },
        "results": {
          "type": "array",
          "items": {
            "type": "object",
            "required": [
              "slug",
              "title",
              "excerpt",
              "audience",
              "relatedTools",
              "tags",
              "score"
            ],
            "properties": {
              "slug": {
                "type": "string"
              },
              "tags": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "score": {
                "type": "number"
              },
              "title": {
                "type": "string"
              },
              "excerpt": {
                "type": "string"
              },
              "audience": {
                "enum": [
                  "user",
                  "agent",
                  "both"
                ],
                "type": "string"
              },
              "relatedTools": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            },
            "additionalProperties": false
          }
        }
      },
      "additionalProperties": false
    },
    {
      "type": "object",
      "required": [
        "slug",
        "title",
        "summary",
        "body",
        "audience",
        "tags",
        "relatedTools",
        "relatedConcepts"
      ],
      "properties": {
        "body": {
          "type": "string"
        },
        "slug": {
          "type": "string"
        },
        "tags": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "title": {
          "type": "string"
        },
        "summary": {
          "type": "string"
        },
        "audience": {
          "enum": [
            "user",
            "agent",
            "both"
          ],
          "type": "string"
        },
        "relatedTools": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "relatedConcepts": {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      },
      "additionalProperties": false
    },
    {
      "type": "object",
      "required": [
        "slug",
        "error",
        "message"
      ],
      "properties": {
        "slug": {
          "type": "string"
        },
        "error": {
          "type": "string",
          "const": "not_found"
        },
        "message": {
          "type": "string"
        }
      },
      "additionalProperties": false
    }
  ],
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "properties": {
    "body": {
      "type": "string"
    },
    "slug": {
      "type": "string"
    },
    "tags": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "error": {
      "type": "string",
      "const": "not_found"
    },
    "query": {
      "type": "string"
    },
    "title": {
      "type": "string"
    },
    "message": {
      "type": "string"
    },
    "results": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "slug",
          "title",
          "excerpt",
          "audience",
          "relatedTools",
          "tags",
          "score"
        ],
        "properties": {
          "slug": {
            "type": "string"
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "score": {
            "type": "number"
          },
          "title": {
            "type": "string"
          },
          "excerpt": {
            "type": "string"
          },
          "audience": {
            "enum": [
              "user",
              "agent",
              "both"
            ],
            "type": "string"
          },
          "relatedTools": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "additionalProperties": false
      }
    },
    "summary": {
      "type": "string"
    },
    "audience": {
      "enum": [
        "user",
        "agent",
        "both"
      ],
      "type": "string"
    },
    "relatedTools": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "relatedConcepts": {
      "type": "array",
      "items": {
        "type": "string"
      }
    }
  },
  "additionalProperties": false
}
get_help annotations
{
  "title": "Get Help",
  "readOnlyHint": true,
  "openWorldHint": false,
  "idempotentHint": true,
  "destructiveHint": false
}

Prompts

4 advertised

triage_uncategorized_transactions — Triage uncategorized transactions

Advertised by the server during the last successful anonymous check.

Walk every uncategorized/errored transaction in a portfolio and remediate it.

workspaceRef
Workspace name or slug (required)
portfolioRef
Portfolio name or slug (required)
month_end_close — Month-end close

Advertised by the server during the last successful anonymous check.

Sync, resolve errors, confirm, and produce closing reports for a portfolio.

workspaceRef
Workspace name or slug (required)
portfolioRef
Portfolio name or slug (required)
fromDate
Inclusive report period start as an ISO datetime (required)
toDate
Inclusive report period end as an ISO datetime (required)
reconcile_wallet_balances — Reconcile wallet balances

Advertised by the server during the last successful anonymous check.

Check booked positions against on-chain wallet balances and investigate diffs.

workspaceRef
Workspace name or slug (required)
portfolioRef
Portfolio name or slug (required)
reconcile_portfolio — Reconcile portfolio

Advertised by the server during the last successful anonymous check.

End-to-end blockchain reconciliation: review errors, fix or ask per transaction, guard cost basis, and confirm when reconciled.

workspaceRef
Workspace name or slug (required)
portfolioRef
Portfolio name or slug (required)

Resources

Not advertised

No resource definitions available.

90-day uptime

A lightweight connection check about every six hours, sampled on hosts with many listings. It shows the server answered, not that its tools work.

100% (77 of 77 checks answered)

  1. 2026-11-02: 3 of 3 checks answered
  2. 2026-11-03: 4 of 4 checks answered
  3. 2026-11-04: 4 of 4 checks answered
  4. 2026-11-05: 4 of 4 checks answered
  5. 2026-11-06: 4 of 4 checks answered
  6. 2026-11-07: 2 of 2 checks answered
  7. 2026-11-09: 1 of 1 checks answered
  8. 2026-11-10: 2 of 2 checks answered
  9. 2026-11-11: 1 of 1 checks answered
  10. 2026-11-12: 1 of 1 checks answered
  11. 2026-11-14: 1 of 1 checks answered
  12. 2026-11-15: 2 of 2 checks answered
  13. 2026-11-16: 4 of 4 checks answered
  14. 2026-11-17: 5 of 5 checks answered
  15. 2026-11-18: 5 of 5 checks answered
  16. 2026-11-19: 4 of 4 checks answered
  17. 2026-11-20: 2 of 2 checks answered
  18. 2026-11-21: 4 of 4 checks answered
  19. 2026-11-22: 4 of 4 checks answered
  20. 2026-11-23: 4 of 4 checks answered
  21. 2026-11-24: 4 of 4 checks answered
  22. 2026-11-25: 4 of 4 checks answered
  23. 2026-11-26: 4 of 4 checks answered
  24. 2026-11-27: 4 of 4 checks answered

30-day availability

Aggregated from read-only remote checks; this is not a tool-execution or security guarantee.

Successful checks
2 of 2 (100%)
Average latency
1476 ms
95th percentile latency
1750 ms

Maintenance history

Public check and source-refresh events. Editorial and ownership records remain private.

  • · probe · passed · 1172 ms · metadata changed · 37 tool(s), 4 prompt(s)
  • · probe · passed · 1780 ms · metadata changed · 37 tool(s), 4 prompt(s)
  • · registry · passed · metadata changed · Source metadata updated
  • · backfill · recorded · Pre-expansion baseline; unobserved rich metadata remains unknown

Connect from your client

Each snippet registers the same endpoint; pick the client you use.

This server is operated by the named third party. Listing and endpoint checks are not an endorsement or a security audit. Review the operator's permissions, terms, and data handling before connecting. How listings are checked and corrected.

Claude Code

Run this once in a terminal. It registers the remote server. Use --scope project to write .mcp.json for the repo.
Claude Code configuration
claude mcp add --transport http tokenbooks-mcp https://api.tokenbooks.io/mcp

Codex

Run this once. Codex stores MCP servers in ~/.codex/config.toml (or .codex/config.toml in a trusted project).
Codex configuration
codex mcp add tokenbooks-mcp --url https://api.tokenbooks.io/mcp

Cursor

Merge this server into .cursor/mcp.json in your project, then enable tokenbooks-mcp in your MCP settings.
Cursor configuration
{
  "mcpServers": {
    "tokenbooks-mcp": {
      "url": "https://api.tokenbooks.io/mcp"
    }
  }
}

Cline

Merge this into cline_mcp_settings.json (Cline → MCP Servers → Configure).
Cline configuration
{
  "mcpServers": {
    "tokenbooks-mcp": {
      "type": "streamableHttp",
      "url": "https://api.tokenbooks.io/mcp",
      "disabled": false
    }
  }
}

VS Code

Merge this server into .vscode/mcp.json. Use MCP: List Servers to start tokenbooks-mcp and inspect its tools.
VS Code configuration
{
  "servers": {
    "tokenbooks-mcp": {
      "type": "http",
      "url": "https://api.tokenbooks.io/mcp"
    }
  }
}

Gemini CLI

Run this once. It writes .gemini/settings.json in the current project; pass --scope user for ~/.gemini/settings.json.
Gemini CLI configuration
gemini mcp add --transport http tokenbooks-mcp https://api.tokenbooks.io/mcp

Claude Desktop

Open Claude Settings > Connectors > Add custom connector, enter this server URL and enable it for the conversation. This is a manual remote-connector handoff, not a desktop JSON configuration.
Claude Desktop configuration
https://api.tokenbooks.io/mcp

Windsurf

Merge this into ~/.codeium/windsurf/mcp_config.json, then refresh MCP in Cascade. Windsurf remote servers use serverUrl, not url.
Windsurf configuration
{
  "mcpServers": {
    "tokenbooks-mcp": {
      "serverUrl": "https://api.tokenbooks.io/mcp"
    }
  }
}

Let your agent find its tools

Find servers like Tokenbooks MCP from your agent. Add Koskamo once to search the index for endpoints, access requirements, and client setup. Public discovery needs no key.

Do you run Tokenbooks MCP?

Prove ownership with a DNS record, a well-known file, or your Official MCP Registry entry, and your edits publish immediately. Proofs are re-checked weekly; admins can still hide or remove a listing.

Claim this listing