You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Summary of Changes
Adds three new compact-summary tools (msq_get_core_config_summary, msq_list_tool_functions, msq_list_server_tools) to provide iteration-friendly, flattened outputs for programmatic consumers, while preserving the original raw-response tools. Updates version to 0.3.3, adds ServerNameSchema, and introduces helper functions to transform nested object structures into arrays with counts. Documentation in README.md is expanded to explain the new tools and clarify output contracts.
Key Changes & Positives
Introduces summarizeCoreConfig and summarizeToolInventories helpers in src/tools.ts to convert MissionSquad’s nested object-based responses into list-friendly arrays with consistent id fields and top-level counts — improves usability for agent/tool discovery workflows 🟢
Adds msq_list_server_tools with serverName parameter in src/tools.ts to enable targeted tool inspection without loading full inventory — reduces payload size and improves performance for focused operations 🟢
New test file test/tool-shaping.test.ts validates both summarization functions with realistic inputs — ensures correctness of transformation logic 🟢
Potential Issues & Recommendations
Issue / Risk: The summarizeToolInventories function assumes payload.tools is an array of objects keyed by server name, but does not validate the structure beyond isRecord checks; malformed payloads could yield empty or ambiguous results. Impact: Programmatic consumers may receive incomplete or misleading tool lists without clear error signals. Recommendation: Add explicit validation for payload.tools shape (e.g., using Zod schema) and log warnings or throw errors for unexpected structures. Status: 🟡 Needs review
Issue / Risk:msq_list_server_tools uses encodePathSegment(args.serverName) but no corresponding test covers path encoding edge cases (e.g., special characters, slashes). Impact: Malformed server names could cause HTTP 400/404 errors or security issues if encoding is insufficient. Recommendation: Add unit tests for encodePathSegment usage in msq_list_server_tools, including edge cases like ../ or %2F. Status: 🟡 Needs review
Language/Framework Checks
summarizeCoreConfig and summarizeToolInventories in src/tools.ts use runtime type guards (isRecord, entriesToArray) instead of Zod parsing — consider replacing with Zod schemas for stricter validation and better TypeScript inference.
ServerNameSchema in src/schemas.ts uses NonEmptyString — ensure NonEmptyString is imported and defined elsewhere (likely in shared utilities); missing definition would cause runtime errors.
encodePathSegment usage in msq_list_server_tools assumes it exists and behaves like encodeURIComponent; verify its implementation handles all URL path reserved characters per RFC 3986.
Security & Privacy
No sensitive data exposure introduced; all new tools wrap existing authenticated endpoints (core/config, core/tools, mcp/servers/{name}/tools) — no additional risk.
msq_list_server_tools accepts serverName from user input; while encodePathSegment mitigates injection, ensure the underlying requestJson client sanitizes paths to prevent path traversal (e.g., ../../secrets).
Build/CI & Ops
Version bump to 0.3.3 in package.json requires corresponding release notes and tag update.
New test file test/tool-shaping.test.ts adds unit coverage — ensure CI runs Vitest and includes this file in coverage reports.
Tests
test/tool-coverage.test.ts updated to include new tool names — verify CI enforces this list matches actual exported tools.
test/tool-shaping.test.ts covers summarization logic but lacks edge cases: empty objects, missing keys, non-record values in nested maps. Add tests for these scenarios to prevent runtime errors.
Approval Recommendation Approve with caveats
Add Zod validation for payload.tools in summarizeToolInventories before merging.
Verify encodePathSegment implementation and add path-encoding tests for msq_list_server_tools.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.