Skip to main content
Glama

Update a spec file

updateSpecFile
Idempotent

Update an OpenAPI or protobuf 2/3 specification file by changing its content, name, or file type (ROOT/DEFAULT).

Instructions

Updates a file for an OpenAPI or protobuf 2 or 3 specification.

Note:

  • This endpoint does not accept an empty request body. You must pass one of the accepted values.

  • This endpoint does not accept multiple request body properties in a single call. For example, you cannot pass both the `content` and `type` property at the same time.

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

  • When updating a file type to `ROOT`, the previous root file is updated to the `DEFAULT` file type.

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

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameNoThe file's name.
typeNoThe type of file: - `ROOT` — The file containing the full OpenAPI structure. This serves as the entry point for the API spec and references other (`DEFAULT`) spec files. Multi-file specs can only have one root file. - `DEFAULT` — A file referenced by the `ROOT` file.
specIdYesThe spec's ID.
contentNoThe specification's stringified contents.
filePathYesThe path to the file.
Behavior4/5

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

Annotations already indicate a write operation (readOnlyHint=false, destructiveHint=false), but the description adds valuable behavioral details: no empty body, cannot pass multiple body properties, root file switching behavior, and file size limit. This covers important side effects and constraints beyond the annotations, improving transparency.

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 highly concise, front-loading the purpose and then using bullet points for critical notes. No superfluous text; every sentence adds value.

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?

Given the tool's complexity and lack of output schema, the description covers essential constraints (no empty body, no multi-property, root-file behavior, size limit) that are critical for correct usage. It does not explicitly address error conditions, but the provided notes are substantial enough for a complex mutation tool.

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 covers all 5 parameters at 100%, so baseline is 3. The description adds cross-parameter constraints (cannot pass both content and type simultaneously) and explains the root file behavior, which enriches the parameter semantics beyond individual field descriptions.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states it updates a spec file for OpenAPI or protobuf, using a specific verb+resource. It implicitly distinguishes from createSpecFile (updating vs creating), though it doesn't explicitly name alternative tools. The title and description align well.

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?

It gives context on when to use (updating existing spec files) but does not explicitly mention when not to use it or contrast with sibling tools like createSpecFile or updateSpecProperties. The constraints (no empty body, one property at a time, root file rules) are helpful but are more about how to use than when.

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