update_pan_element
Update an element or folder in your Private API Network by specifying the element ID and type, with optional changes to name, description, summary, or parent folder.
Instructions
Update element or folder in Private API Network
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| elementId | Yes | Element ID | |
| elementType | Yes | Element type | |
| name | No | Updated name | |
| description | No | Updated description | |
| summary | No | Updated summary | |
| parentFolderId | No | New parent folder ID |
Implementation Reference
- The updatePanElement handler function that executes the tool logic. It builds a payload based on elementType (folder vs other), then sends a PUT request to the Private API Network endpoint.
async updatePanElement(args: any): Promise<ToolCallResponse> { const payload: any = {}; const path = `/network/private/${args.elementType}/${args.elementId}`; switch (args.elementType) { case 'folder': payload.folder = { name: args.name, description: args.description, parentFolderId: args.parentFolderId }; break; default: payload[args.elementType] = { name: args.name, description: args.description, summary: args.summary, parentFolderId: args.parentFolderId }; } const response = await this.client.put(path, payload); return this.createResponse(response.data); } - Input schema definition for the 'update_pan_element' tool, specifying elementId, elementType (enum of api/collection/workspace/folder), name, description, summary, and parentFolderId fields.
{ name: 'update_pan_element', description: 'Update element or folder in Private API Network', inputSchema: { type: 'object', properties: { elementId: { type: 'string', description: 'Element ID' }, elementType: { type: 'string', enum: ['api', 'collection', 'workspace', 'folder'], description: 'Element type' }, name: { type: 'string', description: 'Updated name' }, description: { type: 'string', description: 'Updated description' }, summary: { type: 'string', description: 'Updated summary' }, parentFolderId: { type: 'integer', description: 'New parent folder ID' } }, required: ['elementId', 'elementType'] } - src/tools/api/additional-features/index.ts:44-45 (registration)Registration of 'update_pan_element' in the handleToolCall switch statement, routing to the updatePanElement method.
case 'update_pan_element': return await this.updatePanElement(args);