Skip to content

createCollection and putCollection do not support nested items (folders) #142

Description

@carlosismael

Description

Both createCollection and putCollection tools fail when trying to create collections with folders (nested item arrays). The Postman Collection v2.1.0 schema supports two types of items:

  • Requests: items with a request property
  • Folders: items with an item property (array of sub-items)

The MCP tool schema validates with a oneOf that requires every item to have a request property, making it impossible to create folders programmatically.

Steps to Reproduce

  1. Call createCollection with nested items (folders containing requests):
{
  "collection": {
    "info": {
      "name": "Test Collection",
      "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
    },
    "item": [
      {
        "name": "My Folder",
        "item": [
          {
            "name": "My Request",
            "request": {
              "method": "GET",
              "url": "https://example.com"
            }
          }
        ]
      }
    ]
  }
}
  1. Observe error:
400 {"error":{"name":"malformedRequestError","message":"Found 3 errors with the supplied collection.","details":["item/0: must have required property 'request'","item/0: must have required property 'item'","item/0: must match exactly one schema in oneOf"]}}

Expected Behavior

Folders (items with nested item arrays) should be supported, matching the Postman Collection v2.1.0 schema which explicitly supports both request items and folder items.

Additional Notes

  • Same error occurs with putCollection
  • putCollection also does not support noauth in the auth type enum (while createCollection does in its schema definition, though the API still rejects folders)
  • The Postman REST API itself supports folders — this is a limitation of the MCP tool's input validation schema
  • Workaround: create flat collections (no folders) or organize folders manually in the Postman app after creation

Environment

  • MCP Server: @anthropic/postman-mcp-server (latest as of 2026-04-16)
  • Client: Claude Code CLI

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions