Skip to content

fix msq_list_servers#11

Merged
j4ys0n merged 1 commit into
mainfrom
tools-fix
Apr 2, 2026
Merged

fix msq_list_servers#11
j4ys0n merged 1 commit into
mainfrom
tools-fix

Conversation

@j4ys0n
Copy link
Copy Markdown
Contributor

@j4ys0n j4ys0n commented Apr 2, 2026

No description provided.

@j4ys0n
Copy link
Copy Markdown
Contributor Author

j4ys0n commented Apr 2, 2026

Automated review 🤖

Summary of Changes
This PR fixes msq_list_servers to return a compact, discovery-friendly list containing only installed and enabled servers, filtering out uninstalled or disabled entries. It introduces a new summarizeServerInventories utility to shape raw server data, updates the tool’s description, adds documentation in README.md, bumps the package version to 0.3.4, and adds comprehensive unit tests for both the summarization logic and the tool integration.

Key Changes & Positives

  • Introduces summarizeServerInventories in src/tools.ts to filter servers by installed === true && enabled === true and extract only required fields (name, displayName, transportType, description) 🟢
  • Updates msq_list_servers tool description to clarify it returns only installed/enabled servers in a compact shape, improving discoverability for agents 🟢
  • Adds test coverage in test/tool-shaping.test.ts and test/workflow-tools.test.ts validating filtering behavior and field extraction 🟢

Language/Framework Checks

  • summarizeServerInventories uses Zod-style isRecord guards and safe string coercion (e.g., fallback to server.name for displayName) in src/tools.ts lines 346–378
  • displayName fallback logic correctly prioritizes explicit display name over fallback to name, avoiding empty strings (lines 355–362)
  • Type ServerInventorySummary is strictly defined with required fields only, preventing accidental leakage of internal fields like command, args, or env

Tests

  • New test in test/tool-shaping.test.ts validates filtering of installed: false and enabled: false servers, and correct field extraction (lines 67–115)
  • New test in test/workflow-tools.test.ts validates end-to-end behavior of msq_list_servers, including HTTP call to /v1/core/servers and shaped output (lines 209–248)
  • Test for msq_list_server_tools added but unrelated to this fix; ensure it does not regress existing functionality

Approval Recommendation
Approve

  • Filtering logic correctly excludes uninstalled/disabled servers
  • Output shape matches documented compact format
  • Tests cover edge cases (missing displayName, empty strings, missing fields)
  • README updated to reflect new behavior and tool contract

@j4ys0n j4ys0n merged commit 52d72e6 into main Apr 2, 2026
1 check passed
@j4ys0n j4ys0n deleted the tools-fix branch April 2, 2026 05:01
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.

1 participant