Repository navigation
🐛 fix(adminmcp): settings_read returns a section whole, not its first 20 entries - #16892
Conversation
… 20 entries
settings_read went through CapResult, the list tools' row cap, which
keeps the first 20 entries of a list by default. settings_read has no limit
argument (its schema allows only section and agent), so on a hive with more
than 20 agents the governor settings came back with 20 agents and the rest
could not be read. A section that is itself a list (backends) was cut and
wrapped in {items, truncated}.
Both transports now return the section as read. The 256 KiB text cap still
bounds it; the list tools keep their cap.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Signed-off-by: Danathar <Danathar@users.noreply.github.com>
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
Open PR overlap checkBase branch: Conflicts are checked with every PR merged onto the current tip of
|
|
Hive status — updated in place; edits do not notify. Full history is in the Activity Monitor. Reviewed by Reviewer notesLooks correct to me. Read both providers against v6. |
…cker src/docs/admin-mcp.md: kept the reorganized guide and carried over v6's changes to it: ping and notification answers (hivecommons#16893), version_read hash/short (hivecommons#16890), settings_read takes no limit and the triggers section (hivecommons#16892), What a read masks (hivecommons#16889), and write tools always listed with metadata.preview.enabled (hivecommons#16890); the troubleshooting row follows. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BQYnPGFJx81c8JXR3o1sg1 Signed-off-by: Danathar <Danathar@users.noreply.github.com>
Summary
settings_readshows what the dashboard Settings page shows. It was passed through the row cap meant for the list tools, which keeps the first 20 entries of any list.settings_readhas nolimitargument, so nothing could raise that cap. On a hive with more than 20 agents, the governor settings came back with 20 agents and the rest could not be read through MCP. This PR returns a section whole.What an operator saw
settings_read(the defaultgovernorsection) on a hive with 30 agents:The tool's schema has only
sectionandagent, with no other argument allowed, so a client that follows the schema cannot sendlimit. Even one that does is stopped at 50. A section that is a list itself, such asbackends, was cut to 20 entries and wrapped in{"items": [...], "truncated": true}instead of being returned as the list.Hives with 20 agents or fewer never saw this.
What changes
Both transports return a
settings_readanswer without the row cap. The 256 KiB text cap still applies and still says what it cut. The list tools (agents_list,runs_list,claims_listand the others) keep their cap and theirlimitargument.Files
src/pkg/dashboard/admin_mcp.go: the HTTP provider returns the section as read.src/cmd/hive-admin-mcp/main.go: the stdio provider does the same.src/cmd/hive-admin-mcp/settings_read_cap_test.go,src/pkg/dashboard/admin_mcp_settings_cap_test.go: new.src/docs/admin-mcp.md: one sentence in "Settings sections".changelog.d/fixed-admin-mcp-settings-read-whole-section.mdTests
TestStdioSettingsReadReturnsTheWholeSectionandTestDashboardAdminMCPSettingsReadReturnsTheWholeSection: 30 agents in the governor section and a 25-entrybackendslist come back whole on each transport.TestStdioListToolsStillCapRows:agents_liststill keeps 20 of 30.v6without the change.go test ./pkg/adminmcp/ ./cmd/hive-admin-mcp/and theAdminMCPandSettingsReadtests in./pkg/dashboard/pass.🤖 Generated with Claude Code