Repository navigation
feat(mcp): summarize_containers counts a filtered set via GET /containers/summary - #406
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
summarize_containers counts containers by POD terminal, status, shipping line or port of discharge with one call to GET /v2/containers/summary (Terminal49/t49#4208, DEV-12486). Rails applies the same filters as the container list, so the count matches the list; the MCP sends the same validated filters and tracked default as list_containers. - OpenAPI: GET /containers/summary (group_by, response shape; accepts the list's filter[...] params); SDK types regenerated. - SDK: containers.summary(groupBy, filters) builds the query with the list's filter validation. - MCP: summarize_containers is one SDK call; no paging or counting in the MCP. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2df713c to
bf00091
Compare
maurycy
left a comment
There was a problem hiding this comment.
I support the server-side aggregation architecture, but please deploy Terminal49/t49#4208 and verify summary totals against filtered lists before releasing this tool. Please also declare the supported filters in OpenAPI, reject malformed summary responses instead of defaulting to zero, and extend actionable filter-validation errors to summarize_containers.
|
(Codex) @maurycy documented the summary filters, rejected malformed responses instead of returning zero, added actionable filter errors and passing SDK/MCP/Rails regressions, and kept release gated on review/deployment of t49 #4208 followed by live count-parity checks. |
maurycy
left a comment
There was a problem hiding this comment.
Approved. The requested OpenAPI, response validation, and actionable filter-error changes are addressed. We are still waiting for the backend in Terminal49/t49#4208 to be deployed, followed by verification that summary totals match filtered lists on staging before releasing this tool.
…mary call The released summarize_containers (1.1.x, from #398) pages the whole filtered container list and counts in the MCP server, capped at max_rows. Rails already has GET /v2/containers/summary (Terminal49/t49#4208, live in production), and #406 moved the tool onto it, but #406 landed on the #405 branch and never reached main. This restores #406 on top of main and covers every dimension the released tool offers, so nothing is lost: - summarize_containers is one SDK call. No paging, no counting, no max_rows. - group_by: current_status, pod_terminal, shipping_line, port_of_discharge, hold_type, pickup_lfd_date, pod_arrival_date. The last three need Terminal49/t49 feat/api-container-summary-more-groups. - SDK: containers.summary(groupBy, filters), with the list's filter validation. A hold_type response may add up to more than total, since a container with two holds counts twice; every other dimension must add up exactly. - OpenAPI: GET /containers/summary with the seven dimensions; SDK types regenerated. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…mary call The released summarize_containers (1.1.x, from #398) pages the whole filtered container list and counts in the MCP server, capped at max_rows. Rails already has GET /v2/containers/summary (Terminal49/t49#4208, live in production), and #406 moved the tool onto it, but #406 landed on the #405 branch and never reached main. This restores #406 on top of main and covers every dimension the released tool offers, so nothing is lost: - summarize_containers is one SDK call. No paging, no counting, no max_rows. - group_by: current_status, pod_terminal, shipping_line, port_of_discharge, hold_type, pickup_lfd_date, pod_arrival_date. The last three need Terminal49/t49 feat/api-container-summary-more-groups. - SDK: containers.summary(groupBy, filters), with the list's filter validation. A hold_type response may add up to more than total, since a container with two holds counts twice; every other dimension must add up exactly. - OpenAPI: GET /containers/summary with the seven dimensions; SDK types regenerated. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…mary call The released summarize_containers (1.1.x, from #398) pages the whole filtered container list and counts in the MCP server, capped at max_rows. Rails already has GET /v2/containers/summary (Terminal49/t49#4208, live in production), and reached main. This restores #406 on top of main and covers every dimension the released tool offers, so nothing is lost: - summarize_containers is one SDK call. No paging, no counting, no max_rows. - group_by: current_status, pod_terminal, shipping_line, port_of_discharge, hold_type, pickup_lfd_date, pod_arrival_date. The last three need Terminal49/t49 feat/api-container-summary-more-groups. - SDK: containers.summary(groupBy, filters), with the list's filter validation. A hold_type response may add up to more than total, since a container with two holds counts twice; every other dimension must add up exactly. - OpenAPI: GET /containers/summary with the seven dimensions; SDK types regenerated. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… call (#418) * fix(mcp): summarize_containers counts with one GET /v2/containers/summary call The released summarize_containers (1.1.x, from #398) pages the whole filtered container list and counts in the MCP server, capped at max_rows. Rails already has GET /v2/containers/summary (Terminal49/t49#4208, live in production), and reached main. This restores #406 on top of main and covers every dimension the released tool offers, so nothing is lost: - summarize_containers is one SDK call. No paging, no counting, no max_rows. - group_by: current_status, pod_terminal, shipping_line, port_of_discharge, hold_type, pickup_lfd_date, pod_arrival_date. The last three need Terminal49/t49 feat/api-container-summary-more-groups. - SDK: containers.summary(groupBy, filters), with the list's filter validation. A hold_type response may add up to more than total, since a container with two holds counts twice; every other dimension must add up exactly. - OpenAPI: GET /containers/summary with the seven dimensions; SDK types regenerated. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * chore: Auto-generate Postman collection from openapi.json [skip ci] * test(mcp): keep compactContainer tests in their own file They lived in summarize-containers.test.ts, which this PR rewrites for the summary endpoint. list_containers still uses compactContainer. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * chore: Auto-generate Postman collection from openapi.json [skip ci] * docs: align summary date and hold semantics with Rails * fix(mcp): describe summary display timezones and pending holds * chore: Auto-generate Postman collection from openapi.json [skip ci] * ci: validate summary rebase after generated collection update * fix(mcp): discover historical eval fixtures and reject failed lists --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Adds
summarize_containersand SDKcontainers.summary()using oneGET /v2/containers/summaryrequest; stacked on #405 and dependent on Terminal49/t49#4208.The tool uses the same filters and tracked default as container lists, with groups by terminal, status, shipping line or discharge port. OpenAPI declares all supported filters, with a parity test against the list contract. The SDK validates required response fields, counts and grouping instead of converting malformed responses to zero; the MCP exposes actionable filter-validation errors. Truncation preserves the full matching total.
Validation: 270 SDK tests pass (one existing skip), 402 MCP tests pass, both builds and lint pass, Postman generation checks pass, and generated types/reference docs are refreshed. The companion Rails PR now has eight passing summary request specs covering list-count parity, active/stopped tracking, empty results and truncated groups.
Release prerequisite: t49 #4208 must be reviewed and deployed before releasing this tool; then verify filtered-list totals against summary totals on staging and rerun the breakdown cases. Earlier evaluations used the replaced paging implementation and do not validate this endpoint. No Rails deployment was performed.