Skip to main content
Glama

The DEX liquidity added and removed in a transaction

get_transaction_liquidity_events
Read-only

Every DEX liquidity event in one transaction, in log order — the pool, its protocol and version, the provider the event names, action (add or remove) and the event as the pool names it, and each token leg: the token with its declared symbol and decimals (verbatim, not verified), the amount raw and in token units, whether it went into or out of the pool, and its USD value and price where it could be priced, with how it was valued. An empty list means no liquidity event happened in the transaction. The events are written behind the chain: a transaction they do not reach yet is refused (block_not_available, details.reason coverage_gap, with details.maxAvailableBlock) — retry later, it says nothing about the transaction; an unknown hash is refused (not_found). Uniswap v4 liquidity events are not recorded. Paged by bytes: about 112 KiB a page, a whole event at a time; hasMore says more follow — pass nextCursor back as cursor. An event lists at most 8 legs (legCount when it has more). Use it to see what liquidity a transaction added or removed. Not for every event it emitted: use get_transaction_events. Not for one pool's events over a window: use get_pool_liquidity_events. Not for the flash loans it took: use get_transaction_flash_loans.

Arguments: hash; optional cursor. chain_id defaults to 1 (Ethereum mainnet, the only chain served). Paged: pass data.nextCursor back as cursor, with the same other arguments, until it is absent — no nextCursor means the list is complete, even when the page is exactly limit long. Freshness: facts of a mined transaction from an index written in batches that trail the newest blocks. For a transaction above the indexed range, what is found is returned and may still be incomplete for a short while, and an empty answer is refused (block_not_available, with details.maxAvailableBlock) — retry later. meta.asOfBlock is the transaction's block. meta.cached is true when the answer came from the TraceFast response cache (refreshed within minutes); meta.timestamp is when it was produced, in Unix milliseconds.

Minimum plan: Investigation. Rate class: core. Documentation: https://docs.tracefast.xyz/api/transaction-liquidity-events

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": {
      "hash": "<hash>"
    },
    "name": "get_transaction_liquidity_events"
  }
}

Input Schema

NameRequiredDescriptionDefault
hashYesThe transaction hash, `0x` + 64 hex, any case.
cursorNo`data.nextCursor` of this tool's previous answer, passed back unchanged with the same other arguments. Opaque; absent on the first call.
chain_idNoChain id. Only 1 (Ethereum mainnet) is served; the default.

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • addedInput schema / properties / cursor
      Added value: +{
      +  "description": "`data.nextCursor` of this tool's previous answer, passed back unchanged with the same other arguments. Opaque; absent on the first call.",
      +  "type": "string"
      +}
    • changedOutput schema / anyOf
      Previous value: -[
      -  {
      -    "properties": {
      -      "data": {
      -        "properties": {
      -          "chainId": {
      -            "type": "integer"
      -          },
      -          "events": {
      -            "items": {
      -              "properties": {
      -                "action": {
      -                  "type": "string"
      -                },
      -                "eventType": {
      -                  "type": "string"
      -                },
      -                "legs": {
      -                  "items": {
      -                    "properties": {
      -                      "amount": {
      -                        "type": "number"
      -                      },
      -                      "amountRaw": {
      -                        "type": "string"
      -                      },
      -                      "amountUsd": {
      -                        "type": "number"
      -                      },
      -                      "decimals": {
      -                        "type": "integer"
      -                      },
      -                      "direction": {
      -                        "type": "string"
      -                      },
      -                      "priceUsd": {
      -                        "type": "number"
      -                      },
      -                      "role": {
      -                        "type": "string"
      -                      },
      -                      "symbol": {
      -                        "type": "string"
      -                      },
      -                      "token": {
      -                        "type": "string"
      -                      },
      -                      "valuationStatus": {
      -                        "type": "string"
      -                      }
      -                    },
      -                    "required": [
      -                      "role",
      -                      "amountRaw",
      -                      "direction",
      -                      "valuationStatus"
      -                    ],
      -                    "type": "object"
      -                  },
      -                  "type": "array"
      -                },
      -                "logIndex": {
      -                  "minimum": 0,
      -                  "type": "integer"
      -                },
      -                "pool": {
      -                  "type": "string"
      -                },
      -                "pricedLegs": {
      -                  "minimum": 0,
      -                  "type": "integer"
      -                },
      -                "protocol": {
      -                  "type": "string"
      -                },
      -                "protocolVersion": {
      -                  "type": "string"
      -                },
      -                "provider": {
      -                  "type": "string"
      -                },
      -                "unpricedLegs": {
      -                  "minimum": 0,
      -                  "type": "integer"
      -                }
      -              },
      -              "required": [
      -                "logIndex",
      -                "pool",
      -                "protocol",
      -                "protocolVersion",
      -                "action",
      -                "eventType",
      -                "pricedLegs",
      -                "unpricedLegs",
      -                "legs"
      -              ],
      -              "type": "object"
      -            },
      -            "type": "array"
      -          },
      -          "hash": {
      -            "type": "string"
      -          }
      -        },
      -        "required": [
      -          "chainId",
      -          "hash",
      -          "events"
      -        ],
      -        "type": "object"
      -      },
      -      "links": {
      -        "properties": {
      -          "web": {
      -            "type": "string"
      -          }
      -        },
      -        "required": [
      -          "web"
      -        ],
      -        "type": "object"
      -      },
      -      "meta": {
      -        "properties": {
      -          "asOfBlock": {
      -            "minimum": 0,
      -            "type": "integer"
      -          },
      -          "cached": {
      -            "type": "boolean"
      -          },
      -          "chain": {
      -            "type": "string"
      -          },
      -          "coverage": {
      -            "additionalProperties": {
      -              "type": "integer"
      -            },
      -            "propertyNames": {
      -              "type": "string"
      -            },
      -            "type": "object"
      -          },
      -          "docs": {
      -            "type": "string"
      -          },
      -          "timestamp": {
      -            "minimum": 0,
      -            "type": "integer"
      -          }
      -        },
      -        "required": [
      -          "chain",
      -          "timestamp",
      -          "cached",
      -          "docs"
      -        ],
      -        "type": "object"
      -      }
      -    },
      -    "required": [
      -      "data",
      -      "meta",
      -      "links"
      -    ],
      -    "type": "object"
      -  },
      -  {
      -    "properties": {
      -      "error": {
      -        "properties": {
      -          "code": {
      -            "type": "string"
      -          },
      -          "details": {
      -            "additionalProperties": true,
      -            "type": "object"
      -          },
      -          "message": {
      -            "type": "string"
      -          },
      -          "requestId": {
      -            "type": "string"
      -          }
      -        },
      -        "required": [
      -          "code",
      -          "message"
      -        ],
      -        "type": "object"
      -      }
      -    },
      -    "required": [
      -      "error"
      -    ],
      -    "type": "object"
      -  }
      -]New value: +[
      +  {
      +    "properties": {
      +      "data": {
      +        "properties": {
      +          "chainId": {
      +            "type": "integer"
      +          },
      +          "events": {
      +            "items": {
      +              "properties": {
      +                "action": {
      +                  "type": "string"
      +                },
      +                "eventType": {
      +                  "type": "string"
      +                },
      +                "legCount": {
      +                  "minimum": 0,
      +                  "type": "integer"
      +                },
      +                "legs": {
      +                  "items": {
      +                    "properties": {
      +                      "amount": {
      +                        "type": "number"
      +                      },
      +                      "amountRaw": {
      +                        "type": "string"
      +                      },
      +                      "amountUsd": {
      +                        "type": "number"
      +                      },
      +                      "decimals": {
      +                        "type": "integer"
      +                      },
      +                      "direction": {
      +                        "type": "string"
      +                      },
      +                      "priceUsd": {
      +                        "type": "number"
      +                      },
      +                      "role": {
      +                        "type": "string"
      +                      },
      +                      "symbol": {
      +                        "type": "string"
      +                      },
      +                      "token": {
      +                        "type": "string"
      +                      },
      +                      "valuationStatus": {
      +                        "type": "string"
      +                      }
      +                    },
      +                    "required": [
      +                      "role",
      +                      "amountRaw",
      +                      "direction",
      +                      "valuationStatus"
      +                    ],
      +                    "type": "object"
      +                  },
      +                  "type": "array"
      +                },
      +                "logIndex": {
      +                  "minimum": 0,
      +                  "type": "integer"
      +                },
      +                "pool": {
      +                  "type": "string"
      +                },
      +                "pricedLegs": {
      +                  "minimum": 0,
      +                  "type": "integer"
      +                },
      +                "protocol": {
      +                  "type": "string"
      +                },
      +                "protocolVersion": {
      +                  "type": "string"
      +                },
      +                "provider": {
      +                  "type": "string"
      +                },
      +                "unpricedLegs": {
      +                  "minimum": 0,
      +                  "type": "integer"
      +                }
      +              },
      +              "required": [
      +                "logIndex",
      +                "pool",
      +                "protocol",
      +                "protocolVersion",
      +                "action",
      +                "eventType",
      +                "pricedLegs",
      +                "unpricedLegs",
      +                "legs"
      +              ],
      +              "type": "object"
      +            },
      +            "type": "array"
      +          },
      +          "hasMore": {
      +            "type": "boolean"
      +          },
      +          "hash": {
      +            "type": "string"
      +          },
      +          "nextCursor": {
      +            "type": "string"
      +          }
      +        },
      +        "required": [
      +          "chainId",
      +          "hash",
      +          "events",
      +          "hasMore"
      +        ],
      +        "type": "object"
      +      },
      +      "links": {
      +        "properties": {
      +          "web": {
      +            "type": "string"
      +          }
      +        },
      +        "required": [
      +          "web"
      +        ],
      +        "type": "object"
      +      },
      +      "meta": {
      +        "properties": {
      +          "asOfBlock": {
      +            "minimum": 0,
      +            "type": "integer"
      +          },
      +          "cached": {
      +            "type": "boolean"
      +          },
      +          "chain": {
      +            "type": "string"
      +          },
      +          "coverage": {
      +            "additionalProperties": {
      +              "type": "integer"
      +            },
      +            "propertyNames": {
      +              "type": "string"
      +            },
      +            "type": "object"
      +          },
      +          "docs": {
      +            "type": "string"
      +          },
      +          "timestamp": {
      +            "minimum": 0,
      +            "type": "integer"
      +          }
      +        },
      +        "required": [
      +          "chain",
      +          "timestamp",
      +          "cached",
      +          "docs"
      +        ],
      +        "type": "object"
      +      }
      +    },
      +    "required": [
      +      "data",
      +      "meta",
      +      "links"
      +    ],
      +    "type": "object"
      +  },
      +  {
      +    "properties": {
      +      "error": {
      +        "properties": {
      +          "code": {
      +            "type": "string"
      +          },
      +          "details": {
      +            "additionalProperties": true,
      +            "type": "object"
      +          },
      +          "message": {
      +            "type": "string"
      +          },
      +          "requestId": {
      +            "type": "string"
      +          }
      +        },
      +        "required": [
      +          "code",
      +          "message"
      +        ],
      +        "type": "object"
      +      }
      +    },
      +    "required": [
      +      "error"
      +    ],
      +    "type": "object"
      +  }
      +]
  2. Added

TDQS

A4.5/5.0
Behavior5/5

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

Goes well beyond readOnlyHint/openWorldHint: it discloses that Uniswap v4 liquidity events are not recorded, that events are written behind the chain head, and the exact refusal shapes (`block_not_available` with `details.reason` coverage_gap and `details.maxAvailableBlock`, vs `not_found` for unknown hashes) plus the retry advice. It also explains caching (`meta.cached`, `meta.timestamp`), `meta.asOfBlock`, the 8-leg display cap (`legCount`), and byte-based pagination at ~112 KiB per page — all traits that annotations cannot convey.

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

Conciseness3/5

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

Front-loaded and information-dense, but the pagination rule is stated twice (once in the body, once in the Arguments paragraph) and the `block_not_available` / coverage-gap refusal is likewise explained twice. Several sentences are long run-ons that cram field descriptions into a single breath, costing readability for no informational gain.

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?

Given the tool's complexity — trailing index coverage, cursor pagination, per-limb valuation, caching — the definition covers every failure mode an agent could hit and the correct response to each. With an output schema present it is not obliged to describe return values, and its field-level summary is a bonus rather than a gap-filler.

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%, so `hash`, `cursor` and `chain_id` are already documented in the schema, and the description largely restates them. The one genuine addition is the pagination completion rule — pass `data.nextCursor` back as `cursor` with the same other arguments until absent, and no `nextCursor` means the list is complete even when the page is exactly `limit` long — but that is as much behavioral as parametric, so baseline 3 fits.

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?

Names a specific verb and resource ('Every DEX liquidity event in one transaction, in log order') and enumerates what each event carries — pool, protocol/version, action, token legs with amounts and USD valuation. It explicitly contrasts itself with get_transaction_events, get_pool_liquidity_events and get_transaction_flash_loans, so an agent can distinguish it from siblings without opening any schema.

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

Usage Guidelines5/5

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

Gives a positive trigger ('Use it to see what liquidity a transaction added or removed') and three explicit exclusions with the sibling to use instead. It also states the scope limit up front ('no user/workspace'-style scoping here: one transaction, not one pool over a window), leaving nothing 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