Skip to main content
Glama

update_team_membership

Modify team membership roles in Webex by updating the moderator status for a specific user. Enter the membership ID and set the isModerator flag to adjust permissions.

Instructions

Update a team membership in Webex.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
isModeratorYesIndicates if the user is a moderator.
membershipIdYesThe unique identifier for the team membership.

Implementation Reference

  • The core handler function `executeFunction` that performs the HTTP PUT request to the Webex API endpoint `/team/memberships/{membershipId}` to update the isModerator status. Includes URL construction using helpers, JSON body preparation, fetch call, response validation, JSON parsing, and comprehensive error handling with logging.
    const executeFunction = async ({ membershipId, isModerator }) => {
    
      try {
        // Construct the URL with the membership ID
        const url = getWebexUrl(`/team/memberships/${encodeURIComponent(membershipId)}`);
    
        // Set up headers for the request
        const headers = getWebexJsonHeaders();
    
        // Prepare the request body
        const body = JSON.stringify({ isModerator });
    
        // Perform the fetch request
        const response = await fetch(url, {
          method: 'PUT',
          headers,
          body
        });
    
        // Check if the response was successful
        if (!response.ok) {
          const errorData = await response.json();
          throw new Error(errorData);
        }
    
        // Parse and return the response data
        const data = await response.json();
        return data;
      } catch (error) {
        console.error('Error updating team membership:', error);
        return { error: 'An error occurred while updating the team membership.' };
      }
    };
  • Tool schema defining the name 'update_team_membership', description, and parameters: membershipId (required string) and isModerator (required boolean). Used for input validation in MCP.
      name: 'update_team_membership',
      description: 'Update a team membership in Webex.',
      parameters: {
        type: 'object',
        properties: {
          membershipId: {
            type: 'string',
            description: 'The unique identifier for the team membership.'
          },
          isModerator: {
            type: 'boolean',
            description: 'Indicates if the user is a moderator.'
          }
        },
        required: ['membershipId', 'isModerator']
      }
    }
  • tools/paths.js:18-18 (registration)
    Specific registration of the tool by including its relative path in the central toolPaths array. This array is mapped in lib/tools.js#discoverTools() to dynamically import and load apiTool from each file for MCP server registration.
    'webex-public-workspace/webex-messaging/update-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. 'Update' implies mutation, but it doesn't specify whether this requires admin permissions, what happens to existing settings not mentioned, or if changes are reversible. It lacks critical context about authentication needs, rate limits, or error conditions.

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 with zero wasted words. It's appropriately sized for a simple update 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 mutation tool with no annotations and no output schema, the description is insufficient. It doesn't explain what the tool returns, error conditions, or behavioral nuances. Given the complexity of team membership updates and lack of structured metadata, more contextual information is needed.

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%, so the schema fully documents both parameters (membershipId and isModerator). The description adds no additional parameter information beyond what's already in the schema, meeting the baseline expectation when schema coverage is high.

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 ('Update') and resource ('team membership in Webex'), providing a specific verb+resource combination. However, it doesn't distinguish this tool from sibling tools like 'update_membership' or 'update_team', which have similar naming patterns and could cause confusion.

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 like 'update_membership' or 'create_team_membership'. There's no mention of prerequisites, context, or exclusions, leaving the agent without usage direction.

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