Skip to main content
Glama

updateSpecFile

Idempotent

Update a file in an OpenAPI or protobuf specification, changing its content, name, or type between root and 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
specIdYesThe spec's ID.
filePathYesThe path to the file.
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.
contentNoThe specification's stringified contents.
Behavior4/5

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

Beyond annotations (idempotentHint=true, destructiveHint=false), the description reveals additional behaviors: non-empty body required, no multiple properties, root file handling with automatic type conversion, and a 10 MB size limit. This adds meaningful context for the agent.

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: a single sentence stating the purpose followed by bulleted notes. Every sentence adds value, and the structure is easy to parse. No wasted words.

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?

The description covers behavioral constraints well but does not mention the return value or response format. Given no output schema, an agent might need to know what the tool returns (e.g., the updated file resource or a success message). Additionally, authorization or prerequisite conditions are not addressed. This gap reduces completeness.

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?

Although the input schema already has 100% description coverage, the description adds important usage constraints: the note about not passing multiple request body properties clarifies the interaction of 'type' and 'content', and the root/DEFAULT type behavior provides context for the 'type' parameter. This goes beyond schema documentation.

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 updates a file for an OpenAPI or protobuf specification, distinguishing it from siblings like createSpecFile (creation) and getSpecFile (retrieval). The verb 'updates' and resource 'file for an OpenAPI or protobuf 2 or 3 specification' are specific.

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 explicit notes on what the endpoint does not accept (empty body, multiple properties) and key constraints (single root file, root type change behavior). It lacks an explicit 'when to use' statement but gives sufficient context for proper usage.

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