feat: add folderId parameter to runCollection for folder-specific execution#96
Open
jaredboynton wants to merge 2 commits intopostmanlabs:mainfrom
Open
feat: add folderId parameter to runCollection for folder-specific execution#96jaredboynton wants to merge 2 commits intopostmanlabs:mainfrom
jaredboynton wants to merge 2 commits intopostmanlabs:mainfrom
Conversation
…cution - Add optional folderId parameter to runCollection tool schema - Add folderId to CollectionRunParams interface in models.ts - Implement resolveFolderName() in executor.ts to convert folder IDs to names - Newman's folder option expects folder names, not IDs - Supports matching by id, _postman_id, or uid fields - Falls back to original value for direct folder name usage - Update buildNewmanOptions() to resolve folder ID before passing to Newman - Add debug logging to show resolved folder name during execution Bug fixes: - Upgrade Newman to 6.2.1 for Node.js 22 compatibility (undici fix) - Remove delayRequest to improve execution speed within MCP timeouts This allows running specific folders within a collection instead of the entire collection, useful for targeted test execution.
The dist/ folder was missing the compiled JavaScript for the folderId feature. This caused '0 tools discovered' when running the MCP server from dist/.
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
This PR adds support for executing specific folders within a Postman collection using the
runCollectiontool.Changes
New Feature: Folder Execution Support
The
runCollectiontool now accepts an optionalfolderIdparameter that allows running only the requests within a specific folder of a collection, rather than the entire collection.Implementation details:
folderIdto therunCollectiontool schema inrunCollection.tsfolderIdtoCollectionRunParamsinterface inmodels.tsresolveFolderName()inexecutor.tsto convert folder IDs to folder namesfolderoption expects folder names, not IDsid,_postman_id, oruidfieldsbuildNewmanOptions()to resolve folder ID before passing to NewmanUsage:
The
folderIdparameter accepts either:17929829-d36b7575-71d6-4eee-8a48-cbda89c11af8)Users API)Bug Fixes
delayRequestto improve execution speed within MCP timeout limitsTesting
Tested with a collection containing 5 folders (16 total requests). All folders executed successfully with 100% test pass rate, completing in under 0.5 seconds each.