Skip to main content
Glama

get_membership_details

Retrieve detailed information about a specific Webex membership using its unique ID to manage and organize team interactions effectively.

Instructions

Get details for a membership by ID.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
membershipIdYesThe unique identifier for the membership.

Implementation Reference

  • The main handler function that fetches membership details from the Webex API endpoint /memberships/{membershipId} using a GET request.
    const executeFunction = async ({ membershipId }) => {
    
      try {
        // Construct the URL with the membership ID
        const url = getWebexUrl('/memberships/${membershipId}');
    
        // Set up headers for the request
        const headers = getWebexHeaders();
    
        // Perform the fetch request
        const response = await fetch(url, {
          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 getting membership details:', error);
        return { error: 'An error occurred while retrieving membership details.' };
      }
    };
  • The input schema definition for the tool, specifying the required 'membershipId' string parameter.
    definition: {
      type: 'function',
      function: {
        name: 'get_membership_details',
        description: 'Get details for a membership by ID.',
        parameters: {
          type: 'object',
          properties: {
            membershipId: {
              type: 'string',
              description: 'The unique identifier for the membership.'
            }
          },
          required: ['membershipId']
        }
      }
    }
  • tools/paths.js:8-8 (registration)
    Specific path entry for this tool in the toolPaths array used for dynamic tool discovery and registration.
    'webex-public-workspace/webex-messaging/get-membership-details.js',
  • lib/tools.js:7-16 (registration)
    The discoverTools function that dynamically imports apiTool from each path in toolPaths and collects them for registration.
    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);
    }

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