Skip to main content
Glama

Create a spec

createSpec

Create API specifications in Postman's Spec Hub with support for OpenAPI, AsyncAPI, protobuf, GraphQL, and Smithy. Manage single or multi-file specs directly from your workspace.

Instructions

Creates an API specification in Postman's Spec Hub. Specifications can be single or multi-file.

Note:

  • Postman supports OpenAPI (2.0, 3.0, and 3.1), AsyncAPI (2.0 and 3.0), protobuf (2 and 3), GraphQL, and Smithy specifications.

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

  • Multi-file specifications can only have one root file.

  • Files cannot exceed a maximum of 12 MB in size.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesThe specification's name.
typeYesThe type of API specification.
filesYesA list of the specification's files and their contents.
workspaceIdYesThe workspace's ID.
Behavior4/5

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

The annotations already mark this as a write operation (readOnlyHint:false), and the description adds valuable behavioral details: file size limit (12 MB), folder creation when paths contain '/', and the requirement that multi-file specs have exactly one ROOT file. These constraints go beyond the schema and help set expectations.

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 front-loaded with the primary action, followed by a focused bullet list of five relevant notes. No redundant content; each note addresses a likely usage question (supported formats, folder behavior, file size).

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 create operation with a complex 'files' array, the description covers supported formats, folder creation, root file constraints, and file size limits. It doesn't describe the return value or error conditions, but given the annotations and schema, this is largely 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?

Schema coverage is 100% for all four parameters. The description adds meaningful context about the 'files' parameter, specifically how path separators create folders and the ROOT/DEFAULT file type requirement for multi-file specs, which is not fully evident from the schema alone.

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 clearly states 'Creates an API specification in Postman's Spec Hub', specifying the action and resource. It also distinguishes itself by mentioning single or multi-file specs, making it clear this creates a spec rather than merely adding files to an existing one (as with createSpecFile).

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

Usage Guidelines3/5

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

The description provides rich context about supported formats and constraints, but it doesn't explicitly state when to use this tool versus createSpecFile or other spec-related siblings. There's no explicit alternative or exclusion, so an agent must infer the boundary.

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