Skip to main content
Glama

Tokenbooks - crypto and fiat accounting and payments

Get Cost-Basis Lot Ledger

get_lot_ledger
Read-onlyIdempotent

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

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pageNoPage number, starting at 1
sortNoSingle public sort field. Prefix with - for descending. Supported fields: timestamp, diff, value, price
limitNoMaximum items to return, maximum 100. Preferred MCP pagination field.
filterNoPublic 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.
toDateNoOptional ISO timestamp upper bound
chainIdNoExact chain ID when filtering to one wallet; requires walletAddress
assetRefNoDeprecated compatibility selector for asset symbol or asset id. Prefer filter=asset_id.
fromDateNoOptional ISO timestamp lower bound
pageSizeNoDeprecated alias for limit, maximum 100. Prefer limit for new MCP calls.
entryKindNoFilter by lot entry kind (any of)
portfolioRefYesPortfolio exact name or slug
workspaceRefYesWorkspace exact name or slug
walletAddressNoExact case-sensitive wallet address when filtering to one wallet; requires chainId

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.8/5.0
Behavior3/5

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

Annotations already declare readOnlyHint, idempotentHint, and destructiveHint=false, so the safety profile is covered. The description adds the pagination trait but provides no detail on default ordering, response shape, or other behavioral nuances, which is acceptable but not enriched beyond the annotations.

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?

A single front-loaded sentence states the action, resource, scope, and filtering options with no wasted words. It is appropriately sized for a 13-parameter tool whose schema carries the detailed weight.

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?

For a read-only listing tool, the description gives a clear high-level contract, and the schema fully documents all parameters and required references. It is slightly incomplete only because there is no output schema and the description does not hint at the returned row shape or default sort order.

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 coverage is 100%, and every parameter has a detailed description, including the AIP-160 filter grammar, deprecated aliases, and cross-parameter requirements. The description's high-level summary of filter categories adds no meaning beyond the schema, so the baseline 3 applies.

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?

The description names a specific resource ('cost-basis acquisition, disposal, transfer, and adjustment history') and an action ('Trace'), scoped across a portfolio with optional narrowing by asset, wallet, event kind, accounting transaction, or date. This clearly distinguishes it from sibling transaction and journal tools without needing to inspect the schema.

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?

The description implies the tool is for retrieving lot-ledger history, but it never states when to prefer it over siblings like get_portfolio_transaction, list_portfolio_transactions, or get_asset_position, nor does it give exclusions. The optional filters give context, but routing decisions are left to inference.

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