Skip to main content
Glama

delete_room

Remove a Webex room by specifying its unique room ID. This tool is part of the Webex MCP Server, enabling AI assistants to manage Webex messaging resources.

Instructions

Delete a room in Webex by its ID.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
roomIdYesThe unique identifier for the room to be deleted.

Implementation Reference

  • The core handler function that executes the tool logic: constructs the Webex API URL for the room, sends a DELETE request with appropriate headers, handles the response, and returns success or error details.
    const executeFunction = async ({ roomId }) => {
    
      try {
        // Construct the URL with the room ID
        const url = getWebexUrl(`/rooms/${encodeURIComponent(roomId)}`);
    
        // 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 errorText = await response.text();
          let errorMessage = `HTTP ${response.status}: ${response.statusText}`;
          try {
            const errorData = JSON.parse(errorText);
            errorMessage = errorData.message || errorData.error || JSON.stringify(errorData);
          } catch (e) {
            errorMessage = errorText || errorMessage;
          }
          throw new Error(errorMessage);
        }
    
        // For DELETE requests, return success message (204 No Content has no body)
        if (response.status === 204) {
          return { success: true, message: 'Room deleted successfully' };
        }
    
        // Return the response data (if any)
        try {
          return await response.json();
        } catch (e) {
          // If no JSON body, return success
          return { success: true, message: 'Room deleted successfully' };
        }
      } catch (error) {
        console.error('Error deleting the room:', error);
        return { error: 'An error occurred while deleting the room.' };
      }
    };
  • Input schema definition for the 'delete_room' tool, specifying an object with a required 'roomId' string property.
    parameters: {
      type: 'object',
      properties: {
        roomId: {
          type: 'string',
          description: 'The unique identifier for the room to be deleted.'
        }
      },
      required: ['roomId']
    }
  • The tool registration object 'apiTool' that binds the handler to the schema definition with name 'delete_room' and exports it for dynamic loading.
    const apiTool = {
      function: executeFunction,
      definition: {
        type: 'function',
        function: {
          name: 'delete_room',
          description: 'Delete a room in Webex by its ID.',
          parameters: {
            type: 'object',
            properties: {
              roomId: {
                type: 'string',
                description: 'The unique identifier for the room to be deleted.'
              }
            },
            required: ['roomId']
          }
        }
      }
    };
    
    export { apiTool };
  • lib/tools.js:7-16 (registration)
    Central registration mechanism that dynamically loads all tools (including delete_room) by importing their paths from toolPaths, extracting apiTool, and returning the list of registered tools.
    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);
    }
  • tools/paths.js:24-24 (registration)
    The specific path to the delete_room tool file is included in the toolPaths array used for dynamic tool discovery.
    'webex-public-workspace/webex-messaging/delete-a-room.js',
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries full burden for behavioral disclosure. It states the destructive action ('Delete') but doesn't mention whether deletion is permanent, reversible, requires specific permissions, affects associated data (e.g., messages, memberships), or has rate limits. This leaves significant gaps for a mutation tool.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, direct sentence with no wasted words, front-loading the core action and resource. It efficiently communicates the essential purpose without unnecessary elaboration.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a destructive mutation tool with no annotations and no output schema, the description is insufficient. It lacks critical context such as permissions required, permanence of deletion, impact on related resources, error conditions, or return values, leaving the agent with incomplete operational understanding.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100% for the single parameter (roomId), so the schema already documents it adequately. The description adds no additional semantic context beyond implying the ID identifies the target room, meeting the baseline for high schema coverage.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('Delete') and target resource ('a room in Webex by its ID'), making the purpose immediately understandable. It doesn't explicitly differentiate from sibling deletion tools like delete_team or delete_message, but the resource specificity is adequate for clarity.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives, prerequisites (e.g., permissions needed), or consequences of deletion. It mentions the room ID parameter but doesn't explain how to obtain it or when deletion is appropriate versus updating or archiving.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Related Tools

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