Skip to main content
Glama

delete_membership

Remove a specific membership by its unique ID from Webex using the MCP server. This tool ensures targeted deletion of memberships to manage access and participation effectively.

Instructions

Delete a membership by ID in Webex.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
membershipIdYesThe unique identifier for the membership to be deleted.

Implementation Reference

  • The main handler function that performs the DELETE request to the Webex API to delete a membership by its ID.
    const executeFunction = async ({ membershipId }) => {
    
      try {
        // Construct the URL with the membership ID
        const url = getWebexUrl(`/memberships/${encodeURIComponent(membershipId)}`);
    
        // 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: 'Membership deleted successfully.' };
      } catch (error) {
        console.error('Error deleting membership:', error);
        return { error: 'An error occurred while deleting the membership.' };
      }
    };
  • Tool schema definition including the name, description, input parameters (membershipId as required string), used for validation.
      definition: {
        type: 'function',
        function: {
          name: 'delete_membership',
          description: 'Delete a membership by ID in Webex.',
          parameters: {
            type: 'object',
            properties: {
              membershipId: {
                type: 'string',
                description: 'The unique identifier for the membership to be deleted.'
              }
            },
            required: ['membershipId']
          }
        }
      }
    };
  • The apiTool object that bundles the handler function and schema definition, exported for registration in the MCP tools system.
    const apiTool = {
      function: executeFunction,
      definition: {
        type: 'function',
        function: {
          name: 'delete_membership',
          description: 'Delete a membership by ID in Webex.',
          parameters: {
            type: 'object',
            properties: {
              membershipId: {
                type: 'string',
                description: 'The unique identifier for the membership to be deleted.'
              }
            },
            required: ['membershipId']
          }
        }
      }
    };
    
    export { apiTool };
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It states the action is a deletion, implying a destructive operation, but doesn't mention permissions required, whether it's reversible, rate limits, or what happens upon success/failure. 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, efficient sentence that directly states the tool's purpose without unnecessary words. It's front-loaded with the key action and resource, making it easy to parse quickly.

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 tool with no annotations and no output schema, the description is inadequate. It doesn't cover behavioral aspects like side effects, return values, or error handling, leaving the agent with insufficient context to use it safely and effectively.

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?

The schema description coverage is 100%, with the parameter 'membershipId' well-documented in the schema. The description adds no additional semantic context beyond implying deletion targets a membership by ID, so it meets the baseline for high schema coverage without compensating value.

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 resource ('a membership by ID in Webex'), making the purpose unambiguous. However, it doesn't differentiate from sibling tools like 'delete_team_membership' or 'delete_room', which might handle similar deletion operations in different contexts.

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, such as 'delete_team_membership' or 'update_membership' for modifying instead of deleting. There are no explicit instructions on prerequisites, error conditions, or contextual usage.

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