Skip to main content
Glama

Tokenbooks - crypto and fiat accounting and payments

Get Asset Position

get_asset_position
Read-onlyIdempotent

Summarize one cryptocurrency or token across every wallet with quantity, cost basis, market value, unrealized gain or loss, and portfolio totals. This covers wallet holdings rather than all ledger accounts; request a balance-sheet report for a complete accounting statement.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
assetRefYesAsset symbol or canonical asset id
includeSpamNoAlso match assets marked as spam
portfolioRefYesPortfolio exact name or slug
workspaceRefYesWorkspace exact name or slug

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
assetYes
totalsYes
currencyYes
pricedAtNo
perWalletYes
unitPriceNo
valuationYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed5 schema fields changed
    • addedInput schema / properties / includeSpam
      Added value: +{
      +  "description": "Also match assets marked as spam",
      +  "type": "boolean"
      +}
    • addedOutput schema / properties / pricedAt
      Added value: +{
      +  "type": "string"
      +}
    • addedOutput schema / properties / unitPrice
      Added value: +{
      +  "type": "string"
      +}
    • addedOutput schema / properties / valuation
      Added value: +{
      +  "additionalProperties": false,
      +  "properties": {
      +    "reason": {
      +      "type": "string"
      +    },
      +    "source": {
      +      "enum": [
      +        "PORTFOLIO_CURRENCY",
      +        "STABLECOIN_PEG",
      +        "LIVE",
      +        "LAST_CLOSE",
      +        "HISTORICAL_CLOSE"
      +      ],
      +      "type": "string"
      +    },
      +    "status": {
      +      "enum": [
      +        "PRICED",
      +        "UNAVAILABLE"
      +      ],
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "status"
      +  ],
      +  "type": "object"
      +}
    • changedOutput schema / required
      Previous value: -[
      -  "asset",
      -  "currency",
      -  "perWallet",
      -  "totals"
      -]New value: +[
      +  "asset",
      +  "currency",
      +  "valuation",
      +  "perWallet",
      +  "totals"
      +]
  2. Changed1 schema field changed
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "$schema": "https://json-schema.org/draft/2020-12/schema",
      +  "additionalProperties": false,
      +  "properties": {
      +    "asset": {
      +      "additionalProperties": false,
      +      "properties": {
      +        "id": {
      +          "type": "string"
      +        },
      +        "name": {
      +          "type": "string"
      +        },
      +        "symbol": {
      +          "type": "string"
      +        }
      +      },
      +      "required": [
      +        "id",
      +        "symbol",
      +        "name"
      +      ],
      +      "type": "object"
      +    },
      +    "currency": {
      +      "type": "string"
      +    },
      +    "perWallet": {
      +      "items": {
      +        "additionalProperties": false,
      +        "properties": {
      +          "chainRef": {
      +            "type": "string"
      +          },
      +          "costBasis": {
      +            "type": "string"
      +          },
      +          "marketValue": {
      +            "type": "string"
      +          },
      +          "quantity": {
      +            "type": "string"
      +          },
      +          "unrealizedGainLoss": {
      +            "type": "string"
      +          },
      +          "walletAddress": {
      +            "type": "string"
      +          },
      +          "walletName": {
      +            "type": "string"
      +          }
      +        },
      +        "required": [
      +          "chainRef",
      +          "quantity"
      +        ],
      +        "type": "object"
      +      },
      +      "type": "array"
      +    },
      +    "totals": {
      +      "additionalProperties": false,
      +      "properties": {
      +        "costBasis": {
      +          "type": "string"
      +        },
      +        "marketValue": {
      +          "type": "string"
      +        },
      +        "quantity": {
      +          "type": "string"
      +        },
      +        "unrealizedGainLoss": {
      +          "type": "string"
      +        },
      +        "walletCount": {
      +          "type": "number"
      +        }
      +      },
      +      "required": [
      +        "quantity",
      +        "walletCount"
      +      ],
      +      "type": "object"
      +    }
      +  },
      +  "required": [
      +    "asset",
      +    "currency",
      +    "perWallet",
      +    "totals"
      +  ],
      +  "type": "object"
      +}
  3. First observed

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint, destructiveHint=false and openWorldHint=false, so safety is covered. The description adds real behavioral context beyond that: the result set is limited to wallet holdings and excludes non-wallet ledger accounts, which directly affects whether calling this tool answers the user's question.

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

Conciseness5/5

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

Two sentences, zero filler, with the primary purpose and the output fields front-loaded before the scope caveat. Every clause carries information an agent can act on.

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

Completeness5/5

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

With a 100%-covered schema and an existing output schema, the description only needs to add scope and routing, which it does. The wallet-vs-ledger boundary and the pointer to a fuller report are exactly the missing pieces an agent would otherwise have to guess.

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 all four parameters (assetRef, portfolioRef, workspaceRef, includeSpam) are already documented in the schema. The description adds no per-parameter meaning beyond implying that assetRef targets a single asset; baseline 3 applies when the schema does the work.

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

Purpose5/5

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

States a specific verb (summarize) and resource (one crypto asset across every wallet) and enumerates the exact outputs (quantity, cost basis, market value, unrealized gain/loss, totals). The scope statement 'covers wallet holdings rather than all ledger accounts' cleanly separates it from the ledger/accounting siblings such as get_lot_ledger and get_journal_entry.

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

Usage Guidelines4/5

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

Gives an explicit exclusion ('wallet holdings rather than all ledger accounts') and points the agent to an alternative ('request a balance-sheet report'). It stops short of naming a concrete sibling tool, so the agent must infer that the balance-sheet report is request_report_export.

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