Skip to main content
Glama

get_message_details

Retrieve detailed information about a specific message in Webex using its unique ID. Enables precise message analysis and management within Cisco Webex messaging systems.

Instructions

Get details of a message by its ID.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
messageIdYesThe unique identifier for the message.

Implementation Reference

  • The core handler function `executeFunction` that implements the tool logic: fetches message details from Webex API using the `messageId`, handles HTTP errors, and returns the JSON response or an error object.
    const executeFunction = async ({ messageId }) => {
    
      try {
        // Construct the URL with the message ID
        const url = getWebexUrl(`/messages/${encodeURIComponent(messageId)}`);
    
        // 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(JSON.stringify(errorData));
        }
    
        // Parse and return the response data
        const data = await response.json();
        return data;
      } catch (error) {
        console.error('Error fetching message details:', error);
        return {
          error: error.message || 'An error occurred while fetching message details.',
          details: error.stack
        };
      }
    };
  • The input parameters schema specifying a required `messageId` string for the tool.
    parameters: {
      type: 'object',
      properties: {
        messageId: {
          type: 'string',
          description: 'The unique identifier for the message.'
        }
      },
      required: ['messageId']
    }
  • lib/tools.js:7-16 (registration)
    Central registration/discovery function that dynamically imports all Webex tool modules (including get-message-details.js) via paths.js and spreads their `apiTool` definitions to register them as MCP tools.
    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);
    }
  • tools/paths.js:16-16 (registration)
    The path to the get_message_details tool file, listed for use in dynamic tool discovery and registration.
    'webex-public-workspace/webex-messaging/get-message-details.js',

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