Skip to content

rust(feat): expose measurement received time in MCP get_data - #830

Draft
rowen-sift wants to merge 2 commits into
mainfrom
mcp-received-at
Draft

rowen-sift wants to merge 2 commits into
mainfrom
mcp-received-at

Conversation

@rowen-sift

Copy link
Copy Markdown
Contributor

Supersedes #817, which closed when its branch was renamed.

Description

MCP get_data now accepts include_received_at (alias includeReceivedAt). When it is true, the tool sends that flag on GetDataRequest and, when the service returns sift_received_at in extras, writes a receipt-time column next to the channel.

  • timestamp_unix_nanos stays the measurement generation time.
  • The new column is Int64 unix nanos, named <channel> {channel_id="...", received_at="true", ...}. Cells are null when that sample has no receipt time, or when the channel has no sample on the row.
  • The column is omitted when the service returns no receipt times. Enum and bit-field channels have no receipt time.
  • Leaving the flag off keeps the previous request and schema.
  • upload_dataset skips received_at="true" columns so they are not ingested as channels.

Verification

  • cargo test -p sift_mcp --lib: 577 passed.
  • Service tests cover: the flag is omitted unless asked; receipt times land in the column, including a null receipt; a missing generation timestamp does not shift the next receipt time; merged rows null the receipt column where that channel has no sample; pagination appends receipt times and backfills earlier pages that had none.
  • get_data parameter deserialization accepts both include_received_at and includeReceivedAt, and defaults to false.

🤖 Generated with Claude Code

cursoragent and others added 2 commits October 7, 2026 18:24
MCP get_data can pass include_received_at through to the data API and
write sift_received_at as a unix-nanos column when the service returns
it. upload_dataset skips those receipt columns.

Co-authored-by: Rowen Wu <rowenwu@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants