Skip to main content
Glama

createSpec

Create an API specification in Postman's Spec Hub. Supports OpenAPI, AsyncAPI, protobuf, GraphQL, and Smithy formats with single or multi-file specifications.

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
workspaceIdYesThe workspace's ID.
nameYesThe specification's name.
typeYesThe type of API specification.
filesYesA list of the specification's files and their contents.
Behavior5/5

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

Annotations indicate readOnlyHint=false, destructiveHint=false, idempotentHint=false. The description adds behavioral context beyond annotations: file size limit (12 MB), multi-file root file requirement, and folder creation via '/' in path. No contradictions 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 and well-structured: a one-sentence purpose, followed by bullet-pointed notes. Every sentence provides necessary information without redundancy. It is front-loaded with the core action, and the notes are clearly separated.

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

Completeness5/5

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

Given the tool's complexity (multi-file specs, multiple spec types, folder creation), the description covers all essential constraints: supported types, single root file, folder creation via '/', and file size limit. No output schema exists, but the description is adequate for an agent to understand behavior and constraints.

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%, so schema already documents all parameters. The description adds value by clarifying that file paths with '/' create folders and that multi-file specs require a ROOT file type, which supplements the schema's enum descriptions. However, it does not add extensive new meaning for most parameters.

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 it creates an API specification in Postman's Spec Hub, distinguishing it from sibling tools like createSpecFile (which creates individual files) and updateSpecProperties (which updates existing specs). It mentions single or multi-file options, making the purpose specific and 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 provides implicit usage context by listing supported spec types, file path behavior, and multi-file constraints (only one root file, 12 MB limit). However, it does not explicitly state when to use this tool versus alternatives like createSpecFile or updateSpecProperties, which would be clearer.

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