Skip to main content
Glama

list_people

Retrieve and organize user data within Webex by listing people based on email, name, ID, roles, or location. Facilitates targeted access and management of user details via the Webex Messaging API.

Instructions

List people in an organization using the Webex Messaging API.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
callingDataNoInclude Webex Calling user details in the response.
displayNameNoList people whose name starts with this string. For non-admin requests, either this or email are required.
emailNoList people with this email address. For non-admin requests, either this or displayName are required.
idNoList people by ID. Accepts up to 85 person IDs separated by commas.
locationIdNoList people present in this location.
maxNoLimit the maximum number of people in the response.
orgIdNoList people in this organization. Only admin users of another organization may use this parameter.
rolesNoList of roleIds separated by commas.

Implementation Reference

  • The main handler function `executeFunction` that builds the Webex `/people` API URL with query parameters, performs a GET request using fetch, handles errors, and returns the list of people or an error object.
    const executeFunction = async ({ email, displayName, id, orgId, roles, callingData = true, locationId, max = 100 }) => {
    
      try {
        // Construct the URL with query parameters
        const url = new URL(getWebexUrl('/people'));
        if (email) url.searchParams.append('email', email);
        if (displayName) url.searchParams.append('displayName', displayName);
        if (id) url.searchParams.append('id', id);
        if (orgId) url.searchParams.append('orgId', orgId);
        if (roles) url.searchParams.append('roles', roles);
        if (locationId) url.searchParams.append('locationId', locationId);
        url.searchParams.append('callingData', callingData.toString());
        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 people:', error);
        return { error: 'An error occurred while listing people.' };
      }
    };
  • The input schema definition for the `list_people` tool, specifying parameters like email, displayName, id, etc., with types, descriptions, and required fields.
    parameters: {
      type: 'object',
      properties: {
        email: {
          type: 'string',
          description: 'List people with this email address. For non-admin requests, either this or displayName are required.'
        },
        displayName: {
          type: 'string',
          description: 'List people whose name starts with this string. For non-admin requests, either this or email are required.'
        },
        id: {
          type: 'string',
          description: 'List people by ID. Accepts up to 85 person IDs separated by commas.'
        },
        orgId: {
          type: 'string',
          description: 'List people in this organization. Only admin users of another organization may use this parameter.'
        },
        roles: {
          type: 'string',
          description: 'List of roleIds separated by commas.'
        },
        callingData: {
          type: 'boolean',
          description: 'Include Webex Calling user details in the response.'
        },
        locationId: {
          type: 'string',
          description: 'List people present in this location.'
        },
        max: {
          type: 'integer',
          description: 'Limit the maximum number of people in the response.'
        }
      },
      required: ['email']
    }
  • The `apiTool` object that bundles the handler function and tool definition (including name 'list_people' and schema), which is exported and dynamically loaded by the tools discovery system.
    const apiTool = {
      function: executeFunction,
      definition: {
        type: 'function',
        function: {
          name: 'list_people',
          description: 'List people in an organization using the Webex Messaging API.',
          parameters: {
            type: 'object',
            properties: {
              email: {
                type: 'string',
                description: 'List people with this email address. For non-admin requests, either this or displayName are required.'
              },
              displayName: {
                type: 'string',
                description: 'List people whose name starts with this string. For non-admin requests, either this or email are required.'
              },
              id: {
                type: 'string',
                description: 'List people by ID. Accepts up to 85 person IDs separated by commas.'
              },
              orgId: {
                type: 'string',
                description: 'List people in this organization. Only admin users of another organization may use this parameter.'
              },
              roles: {
                type: 'string',
                description: 'List of roleIds separated by commas.'
              },
              callingData: {
                type: 'boolean',
                description: 'Include Webex Calling user details in the response.'
              },
              locationId: {
                type: 'string',
                description: 'List people present in this location.'
              },
              max: {
                type: 'integer',
                description: 'Limit the maximum number of people in the response.'
              }
            },
            required: ['email']
          }
        }
      }
    };
    
    export { apiTool };
  • tools/paths.js:52-52 (registration)
    The path to the list_people tool file listed in toolPaths array, used by lib/tools.js to dynamically import and register the tool.
    'webex-public-workspace/webex-messaging/list-people.js',
  • lib/tools.js:7-16 (registration)
    The `discoverTools` function that dynamically imports all tools from paths listed in toolPaths, spreads their apiTool, and adds the path for bulk 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);
    }
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. It states it's a list operation, implying read-only behavior, but doesn't disclose key traits like pagination (implied by 'max' parameter), authentication needs, rate limits, or error handling. For a tool with 8 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 directly states the tool's purpose without unnecessary words. It's front-loaded with the core action and resource, making it easy to parse quickly. Every part of the sentence earns its place by specifying the API context.

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 complexity (8 parameters, no output schema, no annotations), the description is incomplete. It lacks details on return values, pagination, authentication, error cases, and how to interpret results. For a list tool with many filtering options, more context is needed to guide effective use, especially without annotations or output schema.

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 8 parameters. The description adds no additional parameter information beyond what's in the schema, such as explaining interactions between parameters or usage examples. With high schema coverage, the baseline is 3, as the description doesn't compensate but also doesn't detract.

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 ('people in an organization'), making the purpose understandable. It specifies the API context ('using the Webex Messaging API'), which adds specificity. However, it doesn't explicitly differentiate from sibling tools like 'get_person_details' or 'list_direct_messages', which would require a 5.

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 like 'get_person_details' (for single person details) or 'list_direct_messages' (for messaging context). It mentions the API but doesn't specify scenarios, prerequisites, or exclusions, leaving usage unclear beyond the basic purpose.

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