Skip to main content
Glama

get_message_history

Retrieve message history from the Multi-MCPs server, filtering by a specific start date if needed. Simplify tracking and accessing past communication data across integrated services.

Instructions

List message history optionally since a date

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
from_dateNo

Implementation Reference

  • The main handler function for the 'get_message_history' tool. It validates Twilio configuration, extracts the optional 'from_date' parameter from args, and calls the Twilio client's getMessageHistory method.
    async get_message_history(args: Record<string, unknown>) { if (!cfg.twilioAccountSid || !cfg.twilioAuthToken) throw new Error("TWILIO_ACCOUNT_SID/TWILIO_AUTH_TOKEN are not configured"); const fromDate = args.from_date ? String(args.from_date) : undefined; return client.getMessageHistory(fromDate); },
  • Tool registration object for 'get_message_history' in Twilio module's registerTwilio() function, defining name, description, and input schema.
    { name: "get_message_history", description: "List message history optionally since a date", inputSchema: { type: "object", properties: { from_date: { type: "string" } }, }, },
  • TwilioClient helper method that makes the HTTP request to Twilio API to retrieve message history, optionally filtered by 'DateSent' query parameter.
    getMessageHistory(fromDate?: string) { return this.request(`/Accounts/${this.accountSid}/Messages.json`, { headers: { Authorization: `Basic ${this.authHeader}` }, query: fromDate ? { DateSent: fromDate } : undefined, }); }
  • Central registration of Twilio tools (including get_message_history) by calling registerTwilio() in the registerAllTools function.
    registerTwilio(),
  • Import of the Twilio registration function used to register the get_message_history tool.
    import { registerTwilio } from "../apis/twilio/twilio.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/TaylorChen/muti-mcps'

If you have feedback or need assistance with the MCP directory API, please join our Discord server