Skip to main content
Glama

Create a spec file

createSpecFile

Creates 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.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYesThe file's path. Accepts JSON or YAML files.
specIdYesThe spec's ID.
contentYesThe file's stringified contents.
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already indicate a non-read-only, non-destructive, non-idempotent operation. The description adds valuable behavioral details beyond annotations: folder creation when '/' is in the path, DEFAULT file type assignment, single root file limit for multi-file specs, and a 10 MB file size cap. No contradiction with annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is concise: a single-sentence purpose followed by four focused bullet points. It front-loads the main action and uses formatting that makes the additional notes easy to scan. Every sentence contributes useful information (folder behavior, file type, root file rule, size limit).

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple create operation with no output schema and full annotation coverage, the description covers creation behavior, file type, size limits, and multi-file constraints. It does not explain response behavior or what happens if the file already exists, but the annotations (non-destructive) and sibling context mitigate that gap. Overall sufficient for an agent to invoke correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema covers all three parameters with descriptions (100% coverage), so the baseline is 3. The description adds specific semantic value for the 'path' parameter—explaining that a forward slash triggers folder creation—which goes beyond the schema's 'file's path' description. It does not add much for 'specId' or 'content', but the path insight is meaningful.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a specific verb ('Creates') and resource ('a file for an OpenAPI or a protobuf 2 or 3 specification'), clearly distinguishing it from sibling tools like createSpec (which creates a spec) and updateSpecFile (which modifies). It also scopes the file types supported, making the purpose unambiguous.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies when to use this tool: to create a file within a spec, with notes about folder creation and multi-file root constraints. It does not explicitly name alternatives, but the context of 'file for a specification' reasonably separates it from createSpec. The note on multi-file roots adds usage-relevant guidance.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/postmanlabs/postman-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server