updateSpecProperties
Update an API specification's properties, such as its name, using the spec ID and new values.
Instructions
Updates an API spec's properties (e.g., name).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| specId | Yes | Spec ID | |
| name | Yes | New spec name |
Implementation Reference
- tools/postman_tools.py:1030-1061 (handler)Handler class UpdateSpecPropertiesTool that implements the updateSpecProperties tool. It sends a PATCH request to Postman API's /apis/{specId} endpoint to update an API spec's name property.
class UpdateSpecPropertiesTool(ToolHandler): """Update API spec properties""" def __init__(self): super().__init__("updateSpecProperties") def get_tool_description(self) -> Tool: return Tool( name=self.name, description="Updates an API spec's properties (e.g., name).", inputSchema={ "type": "object", "properties": { "specId": { "type": "string", "description": "Spec ID" }, "name": { "type": "string", "description": "New spec name" } }, "required": ["specId", "name"] }, ) async def run_tool(self, args: dict) -> list[TextContent]: spec_id = args["specId"] body = {"name": args["name"]} result = await postman_api_call("PATCH", f"/apis/{spec_id}", body=body) return [TextContent(type="text", text=json.dumps(result, indent=2))] - tools/postman_tools.py:1868-1868 (registration)Registration of UpdateSpecPropertiesTool() in the register_all_tools() function within the Specs section.
UpdateSpecPropertiesTool(), - tools/postman_tools.py:1036-1054 (schema)Input schema definition for the tool: requires specId (string) and name (string) parameters.
def get_tool_description(self) -> Tool: return Tool( name=self.name, description="Updates an API spec's properties (e.g., name).", inputSchema={ "type": "object", "properties": { "specId": { "type": "string", "description": "Spec ID" }, "name": { "type": "string", "description": "New spec name" } }, "required": ["specId", "name"] }, )