Skip to main content
Glama

Classify one transaction

classify_transaction
Read-onlyIdempotent

Classify a blockchain transaction by hash or contract call to get tax category, treatment, taxable status, confidence, and review flags for US crypto tax reporting. Supports EVM chains and Solana.

Instructions

Classify a single blockchain transaction using CryptoTaxEdge's multi-source consensus engine, the same engine and serve semantics as the public REST /v1/classify endpoint. Returns the /v1 contract fields: category (swap / transfer / stake / lend / bridge / etc.), treatment (disposal / income / non_taxable / expense / needs_review), taxable, confidence, needs_review, plus a natural-language description. Works for EVM chains and Solana. Provide tx_hash (chain optional, auto-detected), or contract_address + function_selector + chain for a rule-library tuple lookup.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
chainNoChain slug (e.g. "ethereum", "polygon", "bsc", "arbitrum", "base", "optimism", "avalanche", "solana"). Optional for tx_hash lookups; the engine auto-detects the chain. REQUIRED for contract_address lookups.
tx_hashNoTransaction hash (0x-prefixed 66-char for EVM, base-58 for Solana). Either tx_hash OR contract_address is required.
contract_addressNo(Optional) 0x-prefixed contract address the transaction called. With function_selector + chain, performs a rule-library tuple lookup.
function_selectorNo(Optional) 0x-prefixed 4-byte function selector (first 4 bytes of tx input data).

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
taxableNonull when needs_review
categoryYesCanonical category (closed enum, see https://cryptotaxedge.com/taxonomy)
protocolNo
treatmentYes
confidenceYes
explanationNo
needs_reviewYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A4.7/5.0
Behavior5/5

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

Beyond the readOnly/idempotent annotations, the description discloses the multi-source consensus engine, the public REST /v1/classify semantics, the exact output fields, and the auto-detection of chain from tx_hash. This gives an agent a strong behavioral model of what will happen and what it will receive.

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?

The description is four sentences, front-loaded with purpose, and every sentence contributes: what it does, what it returns, where it works, and how to invoke it. No filler or redundant restatement of schema fields.

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?

The description covers input alternatives, output fields, chain support, and key behavioral semantics. It even clarifies the 'either tx_hash or contract_address is required' rule despite the schema listing no required parameters, which is exactly the kind of contextual gap an agent needs resolved.

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

Parameters4/5

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

The input schema already documents all parameters with 100% coverage, so the baseline is 3. The description adds meaningful context by explaining the two alternative lookup modes and the rule-library tuple lookup behavior, which goes beyond the schema's field-level descriptions.

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 begins with a specific verb and resource: 'Classify a single blockchain transaction', which clearly distinguishes it from the sibling classify_batch tool. It also spells out the return contract fields and supported chains, leaving no ambiguity about what the tool does.

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?

The description clearly states the conditions for use: single-transaction classification, EVM/Solana support, and two input modes (tx_hash or contract_address + function_selector + chain). It does not explicitly name the alternative tools or say 'use classify_batch for multiple transactions', but the 'single' qualifier and sibling names make the intended usage clear without exclusions.

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