kubeflow / kubeflow/mcp-server
fix: add truncation metadata to get_training_events
- Dominant language
- Python
- Stars
- 44
- Forks
- 54
- Avg merge
- 2d 18h
- Merged PRs (30d)
- 29
Description
## Problem
The `get_training_events()` tool supports a `limit` parameter and returns only the first `limit` events. However, the response reports the total number of matching events without indicating how many events were actually returned or whether more events were omitted.
For example, when 600 events exist and `limit=500`, the response contains:
{
"events": [500 events],
"total": 600
}
The `total` value is correct, but callers cannot determine whether the result was truncated or whether additional events are available.
## Proposed Fix
Add truncation metadata to the response:
- `returned`: number of events included in the response
- `has_more`: whether additional events were omitted because of the limit
Example:
{
"events": [500 events],
"total": 600,
"returned": 500,
"has_more": true
}
Keep `total` as the total number of events returned by the SDK.
## Acceptance Criteria
- `total` continues to report the complete event count.
- `returned` reports the number of events in the `events` list.
- `has_more` is `true` when events were truncated by `limit`.
- `has_more` is `false` when all events are returned.
- Unit tests cover both truncated and non-truncated responses.
- Existing `events` and `total` fields remain unchanged.
Contributor guide
Assessment
This issue has not been assessed yet.