Skip to main content
Glama

get_room_meeting_details

Retrieve detailed information about a Webex meeting associated with a specific room using the room's unique identifier for streamlined access and management.

Instructions

Get details of a Webex meeting for a specific room.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
roomIdYesThe unique identifier for the room.

Implementation Reference

  • The core handler function that executes the tool: makes a GET request to Webex API endpoint `/rooms/{roomId}/meetingInfo` to retrieve meeting details, handles errors, and returns the data or error message.
    const executeFunction = async ({ roomId }) => {
    
      try {
        // Construct the URL with the roomId
        const url = getWebexUrl(`/rooms/${encodeURIComponent(roomId)}/meetingInfo`);
    
        // 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 fetching room meeting details:', error);
        return { error: 'An error occurred while fetching room meeting details.' };
      }
    };
  • The apiTool object defining the tool's name, description, input schema (roomId: string, required), and reference to the handler function. This object is exported and dynamically loaded for MCP registration.
    const apiTool = {
      function: executeFunction,
      definition: {
        type: 'function',
        function: {
          name: 'get_room_meeting_details',
          description: 'Get details of a Webex meeting for a specific room.',
          parameters: {
            type: 'object',
            properties: {
              roomId: {
                type: 'string',
                description: 'The unique identifier for the room.'
              }
            },
            required: ['roomId']
          }
        }
      }
    };
  • tools/paths.js:19-19 (registration)
    The relative path to the tool's implementation file listed in the toolPaths array, which is used by lib/tools.js discoverTools() to dynamically import and prepare the tool for registration in mcpServer.js.
    'webex-public-workspace/webex-messaging/get-room-meeting-details.js',
  • Generic registration loop in the MCP server that registers all discovered tools (including 'get_room_meeting_details') by name using McpServer.registerTool(), converting JSON schema to Zod inputSchema, and wrapping the tool's function.
    for (const tool of tools) {
      const definition = tool.definition?.function;
      if (!definition) {
        console.error(`[MCP Server] Skipping tool with invalid definition:`, tool);
        continue;
      }
    
      try {
        server.registerTool(
          definition.name,
          {
            title: definition.name.replace(/_/g, ' ').replace(/\b\w/g, l => l.toUpperCase()),
            description: definition.description,
            // MCP SDK v1.17.4 requires inputSchema with Zod schemas for parameter validation
            inputSchema: convertJsonSchemaToZod(definition.parameters?.properties || {}, definition.parameters?.required || [])
          },
          async (args) => {
            try {
              // Debug logging to see what we actually receive
              console.error(`[DEBUG] Tool ${definition.name} called with args:`, JSON.stringify(args));
              console.error(`[DEBUG] Args type:`, typeof args);
              console.error(`[DEBUG] Args keys:`, Object.keys(args || {}));
    
              // Handle both function and handler patterns
              const toolFunction = tool.function || tool.handler;
              if (!toolFunction) {
                throw new Error(`Tool ${definition.name} has no function or handler`);
              }
    
              const result = await toolFunction(args);
              return {
                content: [{
                  type: 'text',
                  text: JSON.stringify(result, null, 2)
                }]
              };
            } catch (error) {
              console.error(`[MCP Server] Tool ${definition.name} error:`, error);
              return {
                content: [{
                  type: 'text',
                  text: `Error: ${error.message}`
                }],
                isError: true
              };
            }
          }
        );
      } catch (error) {
        console.error(`[MCP Server] Failed to register tool ${definition.name}:`, error);
      }
    }

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