Skip to main content
Glama

getEvents

Fetch meetings and events within a specific date range using Date Math syntax. Retrieve calendar details for queries like 'what meetings next week?' or 'show calendar for tomorrow.' Supports intervals in days, weeks, months, years, hours, minutes, and seconds.

Instructions

Use this tool ONLY to fetch meetings/events in a date range (e.g. "what meetings next week?", "show calendar for tomorrow"). DO NOT use for counting meetings, analyzing patterns, or finding frequent participants.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
endYesUse Date Math with now +/- time intervals. Supported units: d (days), w (weeks), M (months), y (years), h (hours), m (minutes), s (seconds). Examples: now-1d (yesterday), now+2w (2 weeks ahead), now/M (start of month), now+1M/M (start of next month).
startYesUse Date Math with now +/- time intervals. Supported units: d (days), w (weeks), M (months), y (years), h (hours), m (minutes), s (seconds). Examples: now-1d (yesterday), now+2w (2 weeks ahead), now/M (start of month), now+1M/M (start of next month).

Implementation Reference

  • index.js:320-337 (registration)
    Registration of the 'getEvents' tool using server.addTool, defining name, description, input schema, and execute handler that proxies to backend.
    server.addTool({ name: "getEvents", description: 'Use this tool ONLY to fetch meetings/events in a date range (e.g. "what meetings next week?", "show calendar for tomorrow"). DO NOT use for counting meetings, analyzing patterns, or finding frequent participants.', parameters: z.object({ start: z .string() .describe( "Use Date Math with now +/- time intervals. Supported units: d (days), w (weeks), M (months), y (years), h (hours), m (minutes), s (seconds). Examples: now-1d (yesterday), now+2w (2 weeks ahead), now/M (start of month), now+1M/M (start of next month)." ), end: z .string() .describe( "Use Date Math with now +/- time intervals. Supported units: d (days), w (weeks), M (months), y (years), h (hours), m (minutes), s (seconds). Examples: now-1d (yesterday), now+2w (2 weeks ahead), now/M (start of month), now+1M/M (start of next month)." ), }), execute: async (params, { session }) => callTool("/moments/events", params, session), });
  • Zod input schema for 'getEvents' tool, defining 'start' and 'end' string parameters using date math notation.
    parameters: z.object({ start: z .string() .describe( "Use Date Math with now +/- time intervals. Supported units: d (days), w (weeks), M (months), y (years), h (hours), m (minutes), s (seconds). Examples: now-1d (yesterday), now+2w (2 weeks ahead), now/M (start of month), now+1M/M (start of next month)." ), end: z .string() .describe( "Use Date Math with now +/- time intervals. Supported units: d (days), w (weeks), M (months), y (years), h (hours), m (minutes), s (seconds). Examples: now-1d (yesterday), now+2w (2 weeks ahead), now/M (start of month), now+1M/M (start of next month)." ), }),
  • Execute handler for 'getEvents' that forwards parameters to the backend endpoint '/moments/events' using the shared callTool function.
    execute: async (params, { session }) => callTool("/moments/events", params, session), });
  • Shared helper function used by multiple tools, including getEvents, to make authenticated POST requests to Clay's backend API.
    async function callTool(path, params, session) { console.log('Calling tool', path, session) return fetch(`https://nexum.clay.earth/tools${path}`, { body: JSON.stringify(params), headers: { Authorization: `ApiKey ${session.apiKey}`, "Content-Type": "application/json", }, method: "POST", }).then((res) => res.text()); }

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/clay-inc/clay-mcp'

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