Skip to main content
Glama

createSpecFile

Creates a file for an OpenAPI or protobuf specification. Provide the spec ID, file path, and content to add a new file to the spec.

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
specIdYesThe spec's ID.
pathYesThe file's path. Accepts JSON or YAML files.
contentYesThe file's stringified contents.
Behavior5/5

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

Annotations are minimal (readOnlyHint=false, destructiveHint=false, idempotentHint=false). The description adds valuable behavioral context: folder creation on '/', DEFAULT file type assignment, single root for multi-file specs, and 10 MB limit. No contradictions.

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?

Description is two paragraphs with bulleted notes, front-loading the purpose. It is reasonably concise but could be streamlined further by removing minor repetition.

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 covers essential aspects: purpose, supported spec types, folder behavior, file type, multi-file rule, and size limit. It is fairly complete but could mention error conditions or access requirements.

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?

Input schema has 100% description coverage, describing each parameter. The description adds context like 'path accepts JSON or YAML files' and 'content is stringified', which enhances understanding beyond schema definitions.

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?

Title and description clearly state the tool creates a file for OpenAPI or protobuf specifications. It specifies the spec types and includes notes about folder creation, file type assignment, and constraints, which distinguishes it from sibling tools like updateSpecFile.

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 usage notes on folder creation, file type, multi-file root restriction, and size limit. However, it does not explicitly distinguish when to use this tool over alternatives like updateSpecFile or createSpec, leaving some ambiguity.

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