Skip to main content
Glama

createSpec

Generate API specifications in Postman's Spec Hub for OpenAPI 3.0 or AsyncAPI 2.0 formats, supporting both single and multi-file structures.

Instructions

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

Note:

  • Postman supports OpenAPI 3.0 and AsyncAPI 2.0 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 10 MB in size.

Input Schema

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

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

Annotations provide readOnlyHint=false, destructiveHint=false, and idempotentHint=false, establishing this as a non-destructive creation operation. The description adds valuable behavioral context beyond annotations: file size limits (10 MB), folder creation rules based on path slashes, and the constraint that multi-file specs can only have one root file. No contradiction with annotations exists.

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 efficiently structured with a clear purpose statement followed by bullet-pointed notes. Every sentence adds value: the first establishes core functionality, and each bullet addresses specific constraints or behaviors. No redundant information is present.

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 creation tool with no output schema, the description provides good context about supported formats, file structure rules, and limitations. It covers the essential behavioral aspects needed to use the tool correctly, though it doesn't describe the return value or error conditions. The annotations cover safety aspects, making this reasonably complete.

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

Parameters3/5

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

With 100% schema description coverage, the schema fully documents all 4 parameters. The description doesn't add parameter-specific semantics beyond what's in the schema, but it provides context about file handling (path behavior, size limits) that relates to the 'files' parameter. Baseline 3 is appropriate when schema coverage is complete.

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 the verb ('Creates') and resource ('API specification in Postman's Spec Hub'), with explicit mention that specifications can be single or multi-file. It distinguishes from sibling tools like 'createSpecFile' (which creates individual files) and 'updateSpecProperties' (which modifies existing specs).

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 implies usage context through the notes about supported specification types (OpenAPI 3.0, AsyncAPI 2.0) and file structure rules, but doesn't explicitly state when to use this tool versus alternatives like 'createSpecFile' or 'generateSpecFromCollection'. No explicit when-not-to-use guidance is provided.

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