Create a spec file
createSpecFileCreates a new file for an OpenAPI or protobuf 2/3 specification. Add JSON or YAML spec files to Postman, with auto-created folders for nested paths.
Instructions
Creates a file for an OpenAPI or a protobuf 2 or 3 specification.
Note:
If the file path contains a `/` (forward slash) character, then a folder is created. For example, if the path is the `components/schemas.json` value, then a `components` folder is created with the `schemas.json` file inside.
Creating a spec file assigns it the `DEFAULT` file type.
Multi-file specifications can only have one root file.
Files cannot exceed a maximum of 10 MB in size.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"specId": "<specId>",
"path": "<path>",
"content": "<content>"
},
"name": "createSpecFile"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | The file's path. Accepts JSON or YAML files. | |
| specId | Yes | The spec's ID. | |
| content | Yes | The file's stringified contents. |