Skip to main content
Glama

list_team_memberships

Retrieve and display team memberships for a specified team in Webex using the provided team ID and optional maximum results limit.

Instructions

List team memberships for a given team in Webex.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
maxNoThe maximum number of team memberships to return.
teamIdYesThe ID of the team to list memberships for.

Implementation Reference

  • The main handler function `executeFunction` that lists team memberships by making a GET request to the Webex /team/memberships endpoint.
    const executeFunction = async ({ teamId, max = 100 }) => {
    
      try {
        // Construct the URL with query parameters
        const url = new URL(getWebexUrl('/team/memberships'));
        url.searchParams.append('teamId', teamId);
        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 team memberships:', error);
        return { error: 'An error occurred while listing team memberships.' };
      }
    };
  • The `apiTool` object defining the tool's schema, including name, description, parameters, and the handler reference.
    const apiTool = {
      function: executeFunction,
      definition: {
        type: 'function',
        function: {
          name: 'list_team_memberships',
          description: 'List team memberships for a given team in Webex.',
          parameters: {
            type: 'object',
            properties: {
              teamId: {
                type: 'string',
                description: 'The ID of the team to list memberships for.'
              },
              max: {
                type: 'integer',
                description: 'The maximum number of team memberships to return.'
              }
            },
            required: ['teamId']
          }
        }
      }
    };
  • tools/paths.js:30-30 (registration)
    The path to the tool's implementation file is listed in the `toolPaths` array.
    'webex-public-workspace/webex-messaging/list-team-memberships.js',
  • lib/tools.js:7-16 (registration)
    The `discoverTools` function dynamically loads and registers all tools by importing their `apiTool` exports based on paths from `toolPaths`.
    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);
    }
Behavior2/5

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

No annotations are provided, so the description carries full burden for behavioral disclosure. It states it's a list operation but doesn't mention whether it's paginated, rate-limited, requires specific permissions, or what format the output takes. For a tool with no annotation coverage, 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 states the core purpose without unnecessary words. It's appropriately sized and front-loaded, with zero wasted text earning its place.

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 no annotations and no output schema, the description is incomplete for a tool that likely returns a list of memberships. It doesn't explain what information is included in the results, how results are structured, or any behavioral aspects like pagination. For a list operation with multiple sibling tools, more context 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 already documents both parameters ('teamId' and 'max') thoroughly. The description doesn't add any additional meaning beyond what's in the schema, such as parameter interactions or constraints. Baseline 3 is appropriate when the 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 ('team memberships for a given team in Webex'), making the purpose specific and understandable. However, it doesn't explicitly differentiate from sibling tools like 'list_memberships' or 'get_team_membership_details', which could cause confusion about when to use each.

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. With siblings like 'list_memberships' and 'get_team_membership_details' available, there's no indication of whether this tool is for bulk listing, filtered results, or other specific contexts. The agent must infer usage from the name alone.

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