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
| Name | Required | Description | Default |
|---|---|---|---|
| membershipId | Yes | The 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); }