delete_schema_file
Removes a schema file from a Postman API by specifying the API ID, schema ID, and file path.
Instructions
Delete a schema file
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| apiId | Yes | API ID | |
| schemaId | Yes | Schema ID | |
| filePath | Yes | Path to the schema file |
Implementation Reference
- src/tools/api/apis/index.ts:407-415 (handler)The handler function 'deleteSchemaFile' that executes the delete schema file logic. It validates required args (apiId, schemaId, filePath), sends a DELETE request to the Postman API, and returns a success message.
async deleteSchemaFile(args: any): Promise<ToolCallResponse> { if (!args.apiId || !args.schemaId || !args.filePath) { throw new McpError(ErrorCode.InvalidParams, 'apiId, schemaId, and filePath are required'); } await this.client.delete( `/apis/${args.apiId}/schemas/${args.schemaId}/files/${args.filePath}` ); return this.createResponse({ message: 'Schema file deleted successfully' }); } - The schema definition for 'delete_schema_file' tool, specifying its name, description, and inputSchema with required parameters: apiId (string), schemaId (string), filePath (string).
{ name: 'delete_schema_file', description: 'Delete a schema file', inputSchema: { type: 'object', properties: { apiId: { type: 'string', description: 'API ID', }, schemaId: { type: 'string', description: 'Schema ID', }, filePath: { type: 'string', description: 'Path to the schema file', }, }, required: ['apiId', 'schemaId', 'filePath'], }, }, - src/tools/api/apis/index.ts:85-86 (registration)The routing/dispatch case in 'handleToolCall' that maps the tool name 'delete_schema_file' to the handler method 'deleteSchemaFile'.
case 'delete_schema_file': return await this.deleteSchemaFile(args); - src/tools/api/apis/index.ts:22-24 (registration)The TOOL_DEFINITIONS constant from definitions.ts is returned by getToolDefinitions() to register all tool definitions including delete_schema_file.
getToolDefinitions(): ToolDefinition[] { return TOOL_DEFINITIONS; }