Repository navigation
feat(mcp): include inbound admission counters in list_records - #504
Merged
Merged
Conversation
`record.list` returns `inbound_routes` for each record, the per-link ingress counters (accepted, upgraded, too_new, shape_mismatch, ...), but the MCP `list_records` tool dropped them, so an agent could not see why values on an inbound link were rejected. Pass the field through unchanged, omitted when empty as in the metadata. aimdb-client re-exports `InboundRouteMetrics` and `InboundRouteStats`, the field's types, under `observability`. Fixes #494 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WGkDJ9KUrNCqA8p5JA2Hyo
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
AimX
record.listreturnsinbound_routesfor each record: each inbound link's ingress counters (accepted,upgraded,too_new,shape_mismatch,malformed,decode_error, …). The MCP toollist_recordsdropped this field, so an agent could not see why values on a link were being rejected.aimdb-mcp:RecordInfogets aninbound_routesfield, copied unchanged fromrecord.list. It is omitted when empty, as in the server's metadata. The MCP crate always builds the client withobservability, so the field is always available,--publicmode included (it is read-only).aimdb-client: re-exportsInboundRouteMetricsandInboundRouteStatsunderobservability. They are the types of the existingRecordMetadata::inbound_routesfield, and the re-export saves MCP a directaimdb-coredependency.list_recordstool description, the MCP README and the changelogs of both crates mention the field.get_recordis unchanged. It returns only{value, ts}, with no metadata.Tests: two unit tests on
RecordInfoserialisation. One checks that the counters are included; the other checks that the field is omitted when there are no inbound links. There is no end-to-end test that injects atoo_newframe over a real inbound link. The counters are produced inaimdb-core, and this change only passes them through.Related Issue
Checklist
make check). I did not run the full target. Ran:aimdb-mcptests, clippy-D warningsonaimdb-mcpandaimdb-client(with and withoutobservability),cargo check -p aimdb-client --no-default-features,cargo fmt --check.Generated by Claude Code