Skip to main content
Glama

delete_team_membership

Remove a team membership by ID in Webex using this tool. Ideal for managing team access and roles effectively within the Webex MCP Server.

Instructions

Delete a team membership by ID in Webex.

Input Schema

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

Implementation Reference

  • The main handler function `executeFunction` that performs the Webex API DELETE request to remove a team membership by ID, handles errors, and returns success or error status.
    const executeFunction = async ({ membershipId }) => {
    
      try {
        // Construct the URL for the request
        const url = getWebexUrl('/team/memberships/${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 team membership:', error);
        return { error: 'An error occurred while deleting the team membership.' };
      }
    };
  • The tool definition including the schema for input parameters (membershipId), description, and name 'delete_team_membership'.
    const apiTool = {
      function: executeFunction,
      definition: {
        type: 'function',
        function: {
          name: 'delete_team_membership',
          description: 'Delete a team membership by ID in Webex.',
          parameters: {
            type: 'object',
            properties: {
              membershipId: {
                type: 'string',
                description: 'The unique identifier for the team membership to be deleted.'
              }
            },
            required: ['membershipId']
          }
        }
      }
    };
  • lib/tools.js:7-16 (registration)
    Generic tool registration/discovery function that dynamically imports all tool modules from paths listed in tools/paths.js and extracts their `apiTool` objects, including delete_team_membership.
    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:10-10 (registration)
    The specific path entry for the delete_team_membership tool file, which enables its inclusion in the discoverTools() registration.
    'webex-public-workspace/webex-messaging/delete-a-team-membership.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. While 'Delete' implies a destructive operation, the description doesn't specify whether this action is reversible, what permissions are required, what happens to associated data, or what the response looks like. For a destructive operation with zero annotation coverage, this represents a significant gap in behavioral transparency.

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 communicates the core purpose without unnecessary words. It's appropriately sized for a simple delete operation and front-loads the essential information.

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 operation with no annotations and no output schema, the description is insufficiently complete. It doesn't address critical context like what happens after deletion, whether the action is reversible, what permissions are required, or what the response contains. The description should provide more behavioral context given the tool's destructive nature and lack of structured metadata.

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%, with the single parameter 'membershipId' clearly documented in the schema. The description adds no additional parameter information beyond what's already in the structured schema, so the baseline score of 3 is appropriate when the schema does the heavy lifting.

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 team membership by ID in Webex'), providing a specific verb+resource combination. However, it doesn't distinguish this tool from its sibling 'delete_membership' which appears to serve a similar purpose, leaving some ambiguity about when to use one versus the other.

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?

No guidance is provided about when to use this tool versus alternatives like 'delete_membership' or 'update_team_membership'. The description lacks context about prerequisites, permissions needed, or when this operation is appropriate versus other membership management tools.

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