Skip to content

fix(postman): always pass environmentId to runCollection for remote APIs#101

Open
christosgkoros wants to merge 1 commit intokirodotdev:mainfrom
christosgkoros:fix/postman-steering-runcollection-environment
Open

fix(postman): always pass environmentId to runCollection for remote APIs#101
christosgkoros wants to merge 1 commit intokirodotdev:mainfrom
christosgkoros:fix/postman-steering-runcollection-environment

Conversation

@christosgkoros
Copy link
Copy Markdown

Problem

The steering instruction in # Test/Run Collections read:

"Use the environment for local testing if it exists."

The qualifier "for local testing" caused the agent to skip passing environmentId to runCollection when the target API was remote (e.g. AWS API Gateway, staging, or production endpoints). Environment variables like {{base_url}} were left unresolved, causing all requests to fail.

A secondary instruction — "The server must be running first" — compounded the issue by being scoped to local servers only, creating ambiguity for remote API targets.

This was reported in postmanlabs/postman-mcp-server#130.

Fix

  • Replace the ambiguous "for local testing" phrasing with an explicit instruction to always pass environmentId when available, regardless of whether the API is local or remote.
  • Clarify the "server must be running" check so it only applies to local servers and is skipped for remote APIs.

Changes

postman/steering/steering.md — two lines in # Test/Run Collections:

- Use the environment for local testing if it exists. An Environment ID is required
- The server must be running first
+ Always pass the environment ID to `runCollection` if one is available, regardless of whether the target API is local or remote. Environment variables must be resolved for tests to work correctly.
+ If the target API is a local server, ensure it is running before executing the collection. For remote APIs (e.g. staging, production, cloud endpoints), skip this check.

…f API target

The previous steering instruction "Use the environment for local testing
if it exists" caused the agent to skip passing environmentId when the
target API was remote (e.g. AWS API Gateway, staging, production).
This left environment variables like {{base_url}} unresolved, causing
all requests to fail.

Also clarified the "server must be running" check: it only applies to
local servers, not remote APIs.

Fixes postmanlabs/postman-mcp-server#130
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