Skip to content

mcp: size tool responses for context-limited clients#281

Merged
aliceinwire merged 1 commit into
kernelci:mainfrom
bhcopeland:mcp-compact-output
Jul 14, 2026
Merged

mcp: size tool responses for context-limited clients#281
aliceinwire merged 1 commit into
kernelci:mainfrom
bhcopeland:mcp-compact-output

Conversation

@bhcopeland

Copy link
Copy Markdown
Member

Make get_summary return compact aggregates (status counts, per architecture counts, known issues and failed platforms) with the full payload behind detail=true, drop the default list page size to 20, and add a fields parameter to the list tools, including list_nodes, so callers can project entries to only the keys they need.

@bhcopeland

Copy link
Copy Markdown
Member Author

This addresses some rough edges when using the MCP. Current payloads are quite big, i.e. get_summary is 31.5 KB. This change brings it down to 8.2KB. Useful when using MCP in AI because responses are too big, and will either eats lots of tokens or cause AI to fight against it

Make get_summary return compact aggregates (status counts, per
architecture counts, known issues and failed platforms) with the full
payload behind detail=true, drop the default list page size to 20,
and add a fields parameter to the list tools, including list_nodes,
so callers can project entries to only the keys they need.

Signed-off-by: Ben Copeland <ben.copeland@linaro.org>
@bhcopeland
bhcopeland force-pushed the mcp-compact-output branch from 330ff16 to 17bf279 Compare July 8, 2026 20:16
@aliceinwire

Copy link
Copy Markdown
Member

thanks, seem reasonable to have such limits

@aliceinwire
aliceinwire merged commit c37d02b into kernelci:main Jul 14, 2026
6 checks passed
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