Skip to main content
Glama

list_memberships

Retrieve and filter memberships in a Webex room using room ID, person ID, email, or limit results by specifying a maximum number. Integrates with the Webex MCP Server for efficient access to messaging data.

Instructions

List memberships in a Webex room.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
maxNoThe maximum number of memberships to return.
personEmailNoThe email address of the person to filter memberships by.
personIdNoThe ID of the person to filter memberships by.
roomIdYesThe ID of the room to list memberships for.

Implementation Reference

  • The handler function that executes the tool logic by making a GET request to the Webex memberships API endpoint with query parameters for roomId, optional personId, personEmail, and max.
    const executeFunction = async ({ roomId, personId, personEmail, max = 100 }) => {
    
      try {
        // Construct the URL with query parameters
        const url = new URL(getWebexUrl('/memberships'));
        url.searchParams.append('roomId', roomId);
        if (personId) url.searchParams.append('personId', personId);
        if (personEmail) url.searchParams.append('personEmail', personEmail);
        url.searchParams.append('max', max.toString());
    
        // Set up headers for the request
        const headers = getWebexHeaders();
    
        // Perform the fetch request
        const response = await fetch(url.toString(), {
          method: 'GET',
          headers
        });
    
        // 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 listing memberships:', error);
        return { error: 'An error occurred while listing memberships.' };
      }
    };
  • Input schema defining the parameters for the list_memberships tool.
    parameters: {
      type: 'object',
      properties: {
        roomId: {
          type: 'string',
          description: 'The ID of the room to list memberships for.'
        },
        personId: {
          type: 'string',
          description: 'The ID of the person to filter memberships by.'
        },
        personEmail: {
          type: 'string',
          description: 'The email address of the person to filter memberships by.'
        },
        max: {
          type: 'integer',
          description: 'The maximum number of memberships to return.'
        }
      },
      required: []
    }
  • The apiTool export that registers the tool with its name, description, schema, and handler reference.
    const apiTool = {
      function: executeFunction,
      definition: {
        type: 'function',
        function: {
          name: 'list_memberships',
          description: 'List memberships in a Webex room.',
          parameters: {
            type: 'object',
            properties: {
              roomId: {
                type: 'string',
                description: 'The ID of the room to list memberships for.'
              },
              personId: {
                type: 'string',
                description: 'The ID of the person to filter memberships by.'
              },
              personEmail: {
                type: 'string',
                description: 'The email address of the person to filter memberships by.'
              },
              max: {
                type: 'integer',
                description: 'The maximum number of memberships to return.'
              }
            },
            required: []
          }
        }
      }
    };
    
    export { apiTool };
Behavior2/5

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

No annotations are provided, so the description carries the full burden. It states it's a list operation, implying read-only behavior, but doesn't disclose critical traits like pagination (hinted by 'max' parameter), rate limits, authentication requirements, or what the output looks like (no output schema). For a tool with 4 parameters and no annotations, this leaves significant behavioral gaps.

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 front-loads the core purpose ('List memberships in a Webex room'). There is no wasted verbiage, repetition, or unnecessary elaboration, making it highly concise and well-structured for quick understanding.

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?

Given the tool's complexity (4 parameters, no annotations, no output schema), the description is incomplete. It lacks details on behavioral traits (e.g., pagination, auth), output format, and usage context versus siblings. While concise, it doesn't provide enough context for an agent to confidently invoke the tool without relying heavily on the schema and external knowledge.

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 all 4 parameters (roomId, max, personEmail, personId). The description adds no additional meaning beyond the schema, such as explaining parameter interactions (e.g., filtering by email vs. ID) or default behaviors. Baseline 3 is appropriate when 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 verb ('List') and resource ('memberships in a Webex room'), making the purpose immediately understandable. It distinguishes itself from siblings like 'get_membership_details' (singular) and 'list_team_memberships' (different resource). However, it doesn't specify the scope (e.g., all memberships vs. filtered) or explicitly contrast with 'list_people' (which might overlap in listing persons).

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. It doesn't mention siblings like 'list_team_memberships' (for team contexts) or 'get_membership_details' (for single membership details), nor does it indicate prerequisites (e.g., needing roomId). Usage is implied by the name but not explicitly stated.

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