Skip to main content
Glama

createSpec

Create an API specification in Postman's Spec Hub. Supports OpenAPI, AsyncAPI, GraphQL, and more with single or multi-file definitions.

Instructions

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

Note:

  • Postman supports OpenAPI 2.0, OpenAPI 3.0, OpenAPI 3.1, AsyncAPI 2.0, protobuf 2 and 3, and GraphQL 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 indicate readOnlyHint=false and destructiveHint=false, confirming this is a write operation. The description adds behavioral context beyond annotations: file size limit (10 MB), auto-folder creation on '/' in path, and the constraint that multi-file specs require exactly one ROOT file. 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.

Conciseness4/5

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

The description is well-structured with a main sentence and a bulleted note section. It is fairly concise, though the note about supported formats could be integrated more tightly. Every sentence adds value, and the structure aids readability.

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

Completeness3/5

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

With no output schema, the description lacks information about the return value (e.g., created spec ID or object). While it covers constraints and file types, it does not mention what the agent should expect as a response, which is a gap for a creation tool with four required parameters.

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?

Schema description coverage is 100%, so baseline is 3. The description adds marginal value: it notes that files cannot exceed 10 MB and that path with '/' creates folders, but these details are not in the schema. However, the parameter descriptions in the schema already cover the essential semantics adequately.

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 tool creates an API specification in Postman's Spec Hub, distinguishing it from sibling tools like createSpecFile (which likely creates files within a spec) and updateSpecProperties. The verb 'creates' and resource 'API specification' are explicit, and the ability to handle single or multi-file specs adds specificity.

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 useful constraints (supported formats, file path behavior, multi-file root rule, size limit) but does not explicitly guide when to use this tool versus alternatives like createSpecFile or updateSpecProperties. It implies usage for creating new specs but lacks direct comparison with siblings.

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