delete_room_tab
Remove a Room Tab in Webex by specifying its unique identifier, simplifying workspace management and ensuring clutter-free collaboration environments.
Instructions
Delete a Room Tab in Webex.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | The unique identifier for the Room Tab to delete. |
Implementation Reference
- The handler function that executes the tool logic: constructs Webex API URL for /room/tabs/{id}, sends DELETE request with auth headers, handles response or error.const executeFunction = async ({ id }) => { try { // Construct the URL with the path variable const url = getWebexUrl(`/room/tabs/${encodeURIComponent(id)}`); // Set up headers for the request const headers = getWebexHeaders(); // Perform the fetch request const response = await fetch(url, { method: 'DELETE', headers }); // Check if the response was successful if (!response.ok) { const errorData = await response.json(); throw new Error(errorData); } // Parse and return the response data return await response.json(); } catch (error) { console.error('Error deleting Room Tab:', error); return { error: 'An error occurred while deleting the Room Tab.' }; } };
- Input schema definition: object with required 'id' property (string, unique identifier of the room tab).parameters: { type: 'object', properties: { id: { type: 'string', description: 'The unique identifier for the Room Tab to delete.' } }, required: ['id'] }
- The apiTool export that defines the tool's name 'delete_room_tab', schema, description, and references the handler; discovered and registered via lib/tools.js.const apiTool = { function: executeFunction, definition: { type: 'function', function: { name: 'delete_room_tab', description: 'Delete a Room Tab in Webex.', parameters: { type: 'object', properties: { id: { type: 'string', description: 'The unique identifier for the Room Tab to delete.' } }, required: ['id'] } } } };
- tools/paths.js:7-7 (registration)Specific path to this tool file listed in the toolPaths array used by discoverTools() for dynamic import.'webex-public-workspace/webex-messaging/delete-a-room-tab.js',
- lib/tools.js:7-16 (registration)Generic tool discovery function that imports each tool file from paths.js and extracts the apiTool object for registration in MCP server.export async function discoverTools() { const toolPromises = toolPaths.map(async (file) => { const module = await import(`../tools/${file}`); return { ...module.apiTool, path: file, }; }); return Promise.all(toolPromises); }