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 };

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