get_asset_history
Read the asset ledger index or a single asset's measurement history, including points, baselines, lineages, and integrity data.
Instructions
Read the asset ledger: the index of the assets, or one asset's history.
Without asset_id (the index): every asset the ledger directory lists,
at most 50, each with its points (measurement counts, first and last
acquired_at, latest processing lineage, whether a baseline is
declared, declaration version), event count, ledger size and
integrity counters; truncated says whether more assets exist. With
asset_id: that asset's history read from its ledger alone, the last
max_measurements measurements newest first (identity, acquired_at,
signal_id, file location, declaration version, lineages, a preview of
the indicators of the latest snapshot, comparability grade and codes
against the point), the point declarations and baselines with their
history, the measurements re-attributed to another asset, and the
integrity block. measurement_point_id restricts the history to one
point and needs asset_id. An unknown asset or point is a typed
'not_found' naming the known ids, not an exception.
Args:
ctx: MCP context. Unused, see this module's docstring on logging.
asset_id: The asset (ledger id), or None for the index.
measurement_point_id: Restrict to one point of the asset, or None.
max_measurements: Measurements listed at most (1 to 200), newest
first.
Returns:
AssetHistoryResult with status 'index', 'found' or 'not_found'.
Raises:
ValueError: measurement_point_id without asset_id, an invalid id,
max_measurements outside 1..200, or a ledger that cannot be
read.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| asset_id | No | ||
| max_measurements | No | ||
| measurement_point_id | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| asset | No | History of the asset (status 'found' only): summary, measurements newest first (measurement_id, measurement_point_id, acquired_at, signal_id, location, declaration_version, rpm, direction, sensor_id, lineages, snapshot_count, indicators preview from the latest snapshot, comparability grade and codes against the point), measurement_count, truncated, point_declarations and baselines (current plus history per point), reattributed, integrity, event_count, ledger_bytes | |
| assets | Yes | Index entries (status 'index' only, else empty): asset_id, points (measurement_point_id, measurement_count, first_acquired_at, last_acquired_at, latest_lineage, baseline_declared, declaration_version), point_count, measurement_count, first_acquired_at, last_acquired_at, reattributed_count, event_count, ledger_bytes, integrity (counters) | |
| status | Yes | 'index', 'found' or 'not_found' (see the class description) | |
| message | Yes | One-paragraph summary of the outcome | |
| truncated | Yes | True when the index holds fewer assets than exist, or the history fewer measurements than max_measurements would have to cover | |
| suggestion | No | Concrete next step on a miss; None otherwise | |
| known_assets | Yes | Asset ids the ledger directory lists (the listed ones for the index, every id for a miss; empty for a found asset, whose ledger is the only one read) | |
| known_points | Yes | Points of the asset (declared or named by its measurements) when the asset is known; empty otherwise |