Skip to main content
Glama

Tokenbooks - crypto and fiat accounting and payments

Create Portfolio

create_portfolio

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.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "workspaceRef": "<workspaceRef>",
      "name": "<name>"
    },
    "name": "create_portfolio"
  }
}

Input Schema

NameRequiredDescriptionDefault
nameYesPortfolio name
currencyNoFunctional currency (default USD)
workspaceRefYesWorkspace name or slug. Call list_workspaces to resolve it.
legalEntityTypeNoLegal entity classification for an explicit country profile
jurisdictionCodeNoExact assigned ISO country code, or custom. If omitted, resolves Custom regardless of currency
reportingTimezoneNoCanonical IANA reporting timezone (default UTC)
costBasisLotMethodNoLot-matching method for disposals
costBasisPerWalletNoWhether acquisition lots stay scoped to each wallet
stablecoinTreatmentNoStablecoin valuation treatment; this does not change lot tracking
gasFeeAccountingTreatmentNoAccounting treatment for gas spend
financialReportingFrameworkNoFinancial reporting framework (default TAX_ONLY)

Output Schema

NameRequiredDescriptionDefault
nameYes
slugYes
currencyYes
createdAtYes
updatedAtYes
legalEntityTypeNo
hasPostedActivityYes
reportingTimezoneYes
accountingConfigurationYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changed
    • addedInput schema / properties / legalEntityType / anyOf
      Added value: +[
      +  {
      +    "enum": [
      +      "CORPORATION",
      +      "INDIVIDUAL",
      +      "TRUST",
      +      "PARTNERSHIP"
      +    ],
      +    "type": "string"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • removedInput schema / properties / legalEntityType / enum
      Removed value: -[
      -  "CORPORATION",
      -  "INDIVIDUAL",
      -  "TRUST",
      -  "PARTNERSHIP"
      -]
    • removedInput schema / properties / legalEntityType / nullable
      Removed value: -true
    • removedInput schema / properties / legalEntityType / type
      Removed value: -"string"
  2. Changed1 schema field changed
    • removedOutput schema / $schema
      Removed value: -"https://json-schema.org/draft/2020-12/schema"
  3. Changed2 schema fields changed
    • addedOutput schema / properties / hasPostedActivity
      Added value: +{
      +  "type": "boolean"
      +}
    • changedOutput schema / required
      Previous value: -[
      -  "slug",
      -  "name",
      -  "createdAt",
      -  "updatedAt",
      -  "currency",
      -  "accountingConfiguration",
      -  "reportingTimezone"
      -]New value: +[
      +  "slug",
      +  "name",
      +  "createdAt",
      +  "updatedAt",
      +  "currency",
      +  "accountingConfiguration",
      +  "reportingTimezone",
      +  "hasPostedActivity"
      +]
  4. Changed2 schema fields changed
    • changedInput schema / properties / workspaceRef / description
      Previous value: -"Workspace name or slug. Call list_workspaces, or find_workspaces when the user named one, to resolve it."New value: +"Workspace name or slug. Call list_workspaces to resolve it."
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "$schema": "https://json-schema.org/draft/2020-12/schema",
      +  "additionalProperties": false,
      +  "properties": {
      +    "accountingConfiguration": {
      +      "additionalProperties": false,
      +      "properties": {
      +        "baseCurrency": {
      +          "type": "string"
      +        },
      +        "costBasisLotMethod": {
      +          "enum": [
      +            "FIFO",
      +            "LIFO",
      +            "HIFO",
      +            "ACB"
      +          ],
      +          "type": "string"
      +        },
      +        "costBasisPerWallet": {
      +          "type": "boolean"
      +        },
      +        "defiDepositTreatment": {
      +          "enum": [
      +            "TAXABLE_EXCHANGE",
      +            "NON_TAXABLE_RESERVATION"
      +          ],
      +          "type": "string"
      +        },
      +        "financialReportingFramework": {
      +          "default": "TAX_ONLY",
      +          "enum": [
      +            "TAX_ONLY",
      +            "US_GAAP_PRE_2025",
      +            "US_GAAP_ASC350_60",
      +            "IFRS_IAS38",
      +            "IFRS_IAS38_REVAL",
      +            "IFRS_IAS2_LCNRV",
      +            "IFRS_IAS2_BROKER_TRADER_FVLCTS",
      +            "ASPE",
      +            "FRS_102",
      +            "AASB_138",
      +            "OTHER"
      +          ],
      +          "type": "string"
      +        },
      +        "gasFeeAccountingTreatment": {
      +          "enum": [
      +            "DISPOSAL_AND_COST_BASIS",
      +            "EXPENSE_ONLY"
      +          ],
      +          "type": "string"
      +        },
      +        "isPurchaseTaxable": {
      +          "type": "boolean"
      +        },
      +        "jurisdictionCode": {
      +          "type": "string"
      +        },
      +        "separateIncomeExpenseLines": {
      +          "type": "boolean"
      +        },
      +        "stablecoinTreatment": {
      +          "enum": [
      +            "BASE",
      +            "ASSET"
      +          ],
      +          "type": "string"
      +        }
      +      },
      +      "required": [
      +        "gasFeeAccountingTreatment",
      +        "isPurchaseTaxable",
      +        "costBasisLotMethod",
      +        "baseCurrency",
      +        "jurisdictionCode",
      +        "stablecoinTreatment",
      +        "costBasisPerWallet",
      +        "defiDepositTreatment",
      +        "separateIncomeExpenseLines",
      +        "financialReportingFramework"
      +      ],
      +      "type": "object"
      +    },
      +    "createdAt": {
      +      "format": "date-time",
      +      "type": "string"
      +    },
      +    "currency": {
      +      "type": "string"
      +    },
      +    "legalEntityType": {
      +      "enum": [
      +        "BUSINESS",
      +        "CORPORATION",
      +        "INDIVIDUAL",
      +        "TRUST",
      +        "PARTNERSHIP"
      +      ],
      +      "type": "string"
      +    },
      +    "name": {
      +      "type": "string"
      +    },
      +    "reportingTimezone": {
      +      "type": "string"
      +    },
      +    "slug": {
      +      "type": "string"
      +    },
      +    "updatedAt": {
      +      "format": "date-time",
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "slug",
      +    "name",
      +    "createdAt",
      +    "updatedAt",
      +    "currency",
      +    "accountingConfiguration",
      +    "reportingTimezone"
      +  ],
      +  "type": "object"
      +}
  5. Changed1 schema field changed
    • addedInput schema / properties / workspaceRef / description
      Added value: +"Workspace name or slug. Call list_workspaces, or find_workspaces when the user named one, to resolve it."
  6. First observed

TDQS

A3.7/5.0
Behavior4/5

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

Annotations already declare a non-read-only, non-idempotent, open-world mutation, so the description is not carrying the safety burden alone. It still adds real value beyond them: Canada/US profiles impose cross-field requirements (currency, entity type, timezone), omitting jurisdiction resolves to Custom regardless of currency, and otherwise generic defaults apply. It does not cover permissions or post-creation behavior, keeping this below a 5.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Roughly two front-loaded sentences with the action first and the jurisdiction constraint second; no filler. The middle clause about Canada/US profiles is dense and could be slightly tighter, but every sentence contributes a rule the agent actually needs.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Eleven parameters, four enums, and an output schema (so return values need no explanation) mean the main risk is misconfiguring the jurisdiction profile, which the description addresses directly. Minor gaps remain around whether the caller needs specific workspace permissions and whether name uniqueness is enforced.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the baseline is 3. The description does add genuine cross-parameter meaning absent from the schema — the coupling of jurisdictionCode with currency, legalEntityType, and reportingTimezone, and the Custom fallback rule — but it leaves the other cost-basis and reporting-framework parameters entirely to the schema.

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

Purpose4/5

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

The description states a specific verb and resource ("Create an accounting portfolio") and scopes it to "an existing workspace," which implicitly separates it from create_workspace and from the read-side list_portfolios/get_portfolio siblings. It stops short of naming any alternative explicitly, so an agent must infer the boundary rather than being told.

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

Usage Guidelines3/5

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

Usage is implied rather than stated: the workspace must already exist, and jurisdiction/policies are optional. "Search help for policy choices" usefully routes the agent to get_help, but there is no explicit when-to-use-vs-alternative guidance and no exclusions or prerequisites for the required workspaceRef.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources