Skip to main content
Glama

delete_team

Remove a team from Webex by specifying its unique ID to manage and organize workspace structures effectively.

Instructions

Delete a team by ID in Webex.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
teamIdYesThe unique identifier for the team to be deleted.

Implementation Reference

  • The main handler function 'executeFunction' that performs the logic to delete a team by ID using a DELETE request to the Webex API.
    const executeFunction = async ({ teamId }) => {
    
      try {
        // Construct the URL with the team ID
        const url = getWebexUrl(`/teams/${encodeURIComponent(teamId)}`);
    
        // 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);
        }
    
        // Return the response status
        return { status: response.status, message: 'Team deleted successfully.' };
      } catch (error) {
        console.error('Error deleting team:', error);
        return { error: 'An error occurred while deleting the team.' };
      }
    };
  • The tool definition object 'apiTool' that includes the schema for the 'delete_team' tool, specifying parameters and description.
    const apiTool = {
      function: executeFunction,
      definition: {
        type: 'function',
        function: {
          name: 'delete_team',
          description: 'Delete a team by ID in Webex.',
          parameters: {
            type: 'object',
            properties: {
              teamId: {
                type: 'string',
                description: 'The unique identifier for the team to be deleted.'
              }
            },
            required: ['teamId']
          }
        }
      }
    };

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/Kashyap-AI-ML-Solutions/webex-messaging-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server