Skip to main content
Glama

list_rooms

Retrieve and filter rooms or spaces in Webex by team, type, public status, or time range. Use this tool to organize and manage access to collaborative spaces.

Instructions

List rooms for the authenticated user in Webex.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
fromNoFilters rooms made public after this time.
maxNoThe maximum number of rooms to return.
orgPublicSpacesNoWhether to show the org's public spaces. Cannot be used with type parameter.
sortByNoThe field to sort the results by.
teamIdNoThe ID of the team to list rooms for (optional - if not provided, lists all accessible rooms).
toNoFilters rooms made public before this time.
typeNoThe type of rooms to list. Cannot be used with orgPublicSpaces parameter.

Implementation Reference

  • The main handler function that executes the list_rooms tool by making a GET request to the Webex /rooms API endpoint with optional query parameters for filtering and pagination.
    const executeFunction = async ({ teamId, type, orgPublicSpaces, from, to, sortBy = 'id', max = 100 }) => {
    
      try {
        // Construct the URL with query parameters
        const url = new URL(getWebexUrl('/rooms'));
        if (teamId) url.searchParams.append('teamId', teamId);
    
        // Note: 'type' and 'orgPublicSpaces' cannot be used together according to Webex API
        if (type) {
          url.searchParams.append('type', type);
        } else if (orgPublicSpaces !== undefined) {
          url.searchParams.append('orgPublicSpaces', orgPublicSpaces.toString());
        }
    
        if (from) url.searchParams.append('from', from);
        if (to) url.searchParams.append('to', to);
        url.searchParams.append('sortBy', sortBy);
        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 errorText = await response.text();
          let errorMessage = `HTTP ${response.status}: ${response.statusText}`;
          try {
            const errorData = JSON.parse(errorText);
            errorMessage = errorData.message || errorData.error || JSON.stringify(errorData);
          } catch (e) {
            errorMessage = errorText || errorMessage;
          }
          throw new Error(errorMessage);
        }
    
        // Parse and return the response data
        const data = await response.json();
        return data;
      } catch (error) {
        console.error('Error listing rooms:', error);
        return { error: 'An error occurred while listing rooms.' };
      }
    };
  • The MCP tool schema definition including name, description, and input parameters schema for the list_rooms tool.
    definition: {
      type: 'function',
      function: {
        name: 'list_rooms',
        description: 'List rooms for the authenticated user in Webex.',
        parameters: {
          type: 'object',
          properties: {
            teamId: {
              type: 'string',
              description: 'The ID of the team to list rooms for (optional - if not provided, lists all accessible rooms).'
            },
            type: {
              type: 'string',
              enum: ['group', 'direct'],
              description: 'The type of rooms to list. Cannot be used with orgPublicSpaces parameter.'
            },
            orgPublicSpaces: {
              type: 'boolean',
              description: 'Whether to show the org\'s public spaces. Cannot be used with type parameter.'
            },
            from: {
              type: 'string',
              description: 'Filters rooms made public after this time.'
            },
            to: {
              type: 'string',
              description: 'Filters rooms made public before this time.'
            },
            sortBy: {
              type: 'string',
              description: 'The field to sort the results by.'
            },
            max: {
              type: 'integer',
              description: 'The maximum number of rooms to return.'
            }
          },
          required: []
        }
      }
    }
  • tools/paths.js:49-49 (registration)
    The file path for the list_rooms tool is listed in the toolPaths array, which is used for dynamic tool discovery and registration in the MCP server.
    'webex-public-workspace/webex-messaging/list-rooms.js',
Behavior2/5

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

With no annotations provided, the description carries full burden but offers minimal behavioral insight. It mentions authentication ('for the authenticated user') but doesn't cover rate limits, pagination, error handling, or what 'list' entails (e.g., returns all rooms vs. a subset). This is inadequate for a read operation with 7 parameters.

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 appropriately sized and front-loaded, with every word earning its place.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a list tool with 7 parameters and no output schema, the description is minimally complete but lacks depth. It covers the basic purpose but doesn't address behavioral aspects like pagination or error handling, which are important given the tool's complexity. With no annotations, more context would be helpful.

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 7 parameters. The description adds no parameter-specific information beyond what's in the schema, meeting the baseline of 3 where 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 action ('List rooms') and scope ('for the authenticated user in Webex'), providing a specific verb+resource combination. However, it doesn't differentiate from sibling tools like 'list_direct_messages' or 'list_teams', 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 'list_direct_messages' or 'list_teams', nor does it mention prerequisites or context for usage. It simply states what the tool does without indicating appropriate scenarios.

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