Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ Large skills use progressive disclosure: a lean SKILL.md holds the workflow, and

These are documented in `skills/postman-knowledge/mcp-limitations.md` and must be respected in all commands:

- `searchPostmanElements` searches PUBLIC network only — use `getWorkspaces` + `getCollections` for private content
- `searchPostmanElements` is the unified search tool — pass `ownership: organization` (default) for the user's org resources, `external` for the public Postman network, or `all` for both. Use the `privateNetwork` filter to restrict to the Private API Network.
- `generateCollection` and `syncCollectionWithSpec` return HTTP 202 — must poll for completion
- `syncCollectionWithSpec` supports OpenAPI 3.0 only — use `updateSpecFile` + `generateCollection` for Swagger 2.0 or OpenAPI 3.1
- `createCollection` creates flat collections — nest via `createCollectionFolder` + `createCollectionRequest`
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ That's it. The plugin auto-configures the Postman MCP Server, verifies your conn
|---------|-------------|
| `/postman:setup` | Configure API key, verify connection, select workspace |
| `/postman:sync` | Create or update Postman collections from OpenAPI specs |
| `/postman:search` | Find APIs across your org's private network, your workspaces and the public Postman network |
| `/postman:search` | Find APIs across your org's resources, your workspaces, and the public Postman network |
| `/postman:context` | Fetch real API definitions, generate and maintain typed client code |
| `/postman:test` | Run collection tests, diagnose failures, suggest fixes |
| `/postman:mock` | Create mock servers for frontend development |
Expand All @@ -76,7 +76,7 @@ That's it. The plugin auto-configures the Postman MCP Server, verifies your conn
### Search across your workspace
```
"Is there an endpoint that returns user emails?"
→ Searches private collections, drills into endpoint details, shows response shapes
→ Searches across your org's collections, drills into endpoint details, shows response shapes
```

### Run API tests
Expand Down
23 changes: 15 additions & 8 deletions commands/search.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
description: Discover APIs across your Postman workspaces. Ask natural language questions about available endpoints and capabilities.
allowed-tools: Read, Glob, Grep, mcp__postman__searchPostmanElementsInPrivateNetwork, mcp__postman__searchPostmanElementsInPublicNetwork, mcp__postman__getWorkspaces, mcp__postman__getCollections, mcp__postman__getTaggedEntities, mcp__postman__getCollection, mcp__postman__getCollectionRequest, mcp__postman__getCollectionResponse, mcp__postman__getSpecDefinition
allowed-tools: Read, Glob, Grep, mcp__postman__searchPostmanElements, mcp__postman__getWorkspaces, mcp__postman__getCollections, mcp__postman__getTaggedEntities, mcp__postman__getCollection, mcp__postman__getCollectionRequest, mcp__postman__getCollectionResponse, mcp__postman__getSpecDefinition
---

# Discover APIs
Expand All @@ -15,13 +15,20 @@ The Postman MCP Server must be connected. If MCP tools aren't available, tell th

### Step 1: Search

1. Call `searchPostmanElementsInPrivateNetwork` with the user's query. This searches the organization's private API network and is the **primary** search path.
2. If private network results are sparse or private network search is not available, broaden the search:
- Call `getWorkspaces` to get the user's workspace ID. If multiple workspaces exist, ask which to use. Then use `getCollections` with the `workspace` parameter. Use the `name` filter to narrow results.
- Call `getTaggedEntities` to find collections by tag.
3. If the user is looking for a public/third-party API (e.g., Stripe, GitHub, Twilio), call `searchPostmanElementsInPublicNetwork` with the user's query.
Use the unified `searchPostmanElements` tool. It can search across various entity types like requests, collections, workspaces, specs, flows, environments and mocks. Choose `entityType`, `ownership`, and `filters` based on the user's intent.

**Important:** Default to `searchPostmanElementsInPrivateNetwork` for trusted APIs in user's organisation. Only use `searchPostmanElementsInPublicNetwork` when the user explicitly wants public/third-party APIs or private search returns no results.
1. Call `searchPostmanElements` with the user's query. Pick the parameters from the user's intent:
- `entityType`: `requests` (default), `collections`, `workspaces`, `specs`, or `flows`.
- `ownership`: `organization` (default — your org's resources), `external` (public Postman network, third-party APIs), or `all` (both).
- `filters`: Optional structured `$and` expression to narrow results — e.g., restrict to the Private API Network, a workspace, or HTTP method.
2. If results are sparse, broaden the search — widen `ownership` to `all`, drop or relax filters, or try a different `entityType`. You can also fall back to `getWorkspaces` + `getCollections` for browsing, or `getTaggedEntities` to find collections by tag.

**Filter examples:**

- Search only the trusted Private API Network: `ownership: organization` with `filters: {"$and":[{"privateNetwork":{"$eq":true}}]}`
- Find a third-party public API (e.g. "Stripe API"): `ownership: external` with `filters: {"$and":[{"visibility":{"$eq":"public"}}]}`
- Restrict to a specific workspace: `filters: {"$and":[{"workspaceId":{"$eq":"ws-abc123"}}]}`
- GET requests only: `entityType: requests` with `filters: {"$and":[{"method":{"$eq":"GET"}}]}`

### Step 2: Drill Into Results

Expand Down Expand Up @@ -71,6 +78,6 @@ List relevant collections with endpoint counts, then ask which to explore furthe
## Error Handling

- **MCP not configured:** "Run `/postman:setup` to configure the Postman MCP Server."
- **No results:** "Nothing matched in your private API network. Try different keywords, browse in user's workspaces, or search the public Postman network."
- **No results:** "Nothing matched your query. Try different keywords, broaden `ownership` to `all`, or browse the user's workspaces with `getWorkspaces` + `getCollections`."
- **401 Unauthorized:** "Your Postman API key was rejected. Generate a new one at https://go.postman.co/settings/me/api-keys and run `/postman:setup`."
- **Too many results:** Ask the user to be more specific. Suggest filtering by workspace or using tags.
2 changes: 1 addition & 1 deletion commands/setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ If workspace is empty:
```
Your workspace is empty. You can:
/postman:sync — Push a local OpenAPI spec to Postman
/postman:search — Search for APIs across your org's private network or the public Postman network
/postman:search — Search for APIs across your org's resources or the public Postman network
```

### Step 5: Suggest First Command
Expand Down
2 changes: 1 addition & 1 deletion skills/postman-context/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ Meet the user where they are. The workflow below describes the full path from se

### Step 1: Find the API

**Public APIs:** For well-known third-party APIs, use `searchPostmanElementsInPublicNetwork` to search the public API network. Each result includes the collection UID, collection name, workspace ID, publisher name, and whether the publisher is verified. When presenting results, include Postman links (`https://go.postman.co/collection/<uid>`) so the user can explore in Postman if they want.
**Public APIs:** For well-known third-party APIs, use `searchPostmanElements` with `ownership: external` to search the public API network. Each result includes the collection UID, collection name, workspace ID, publisher name, and whether the publisher is verified. When presenting results, include Postman links (`https://go.postman.co/collection/<uid>`) so the user can explore in Postman if they want.

**Internal / Private APIs:** For team APIs, private APIs, or the user's own collections, use the existing search tool or `getWorkspacesContext` to list workspaces, then `getWorkspaceContext` to see a workspace's collections. If the user says "my" (e.g. "my APIs", "my workspaces"), filter to personal workspaces only — this dramatically reduces noise when the team has many workspaces.

Expand Down
4 changes: 2 additions & 2 deletions skills/postman-knowledge/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ Reference for Postman concepts and MCP tool selection. Use this context when wor
|------|----------|
| Push code changes to Postman | Create/update spec in Spec Hub, then sync to collection |
| Consume a Postman API | Read collection + generate client code |
| Find an API | Search workspace collections in private network/user's workspaces/public network, then drill into details |
| Find an API | Use `searchPostmanElements`, then drill into details |
| Test an API | Run collection with `runCollection` |
| Create a fake API for frontend | Create mock server from collection with examples |
| Document an API | Analyze collection completeness, fill gaps, optionally publish |
Expand All @@ -45,7 +45,7 @@ Reference for Postman concepts and MCP tool selection. Use this context when wor
**Mocks:** `getMocks`, `getMock`, `createMock`, `publishMock`, `unpublishMock`
**Tests:** `runCollection`
**Docs:** `publishDocumentation`, `unpublishDocumentation`
**Search:** `searchPostmanElementsInPrivateNetwork` (private/org APIs, default), `searchPostmanElementsInPublicNetwork` (public network), `getTaggedEntities`
**Search:** `searchPostmanElements` , `getTaggedEntities`
**User:** `getAuthenticatedUser`

See `mcp-limitations.md` in this skill folder for known limitations and workarounds.
Loading