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());
    }
Behavior3/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It clearly indicates this is a read operation ('fetch'), but doesn't specify authentication requirements, rate limits, pagination behavior, or what happens if no events are found. It adds some context about date range usage but lacks comprehensive behavioral details.

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 perfectly concise with two sentences that each earn their place. The first sentence establishes the core purpose and usage context, while the second provides critical exclusion criteria. There's zero wasted language and it's effectively front-loaded.

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 read-only tool with 2 parameters and no output schema, the description provides good purpose and usage guidance but lacks information about return format, error conditions, or authentication requirements. The absence of annotations means the description should do more to compensate, particularly regarding behavioral transparency.

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?

The schema description coverage is 100%, with both parameters thoroughly documented in the input schema. The description doesn't add any parameter-specific information beyond what's already in the schema descriptions. It mentions date range context but doesn't provide additional syntax or format details.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose with specific verb ('fetch') and resource ('meetings/events'), and distinguishes it from sibling tools by specifying it's for fetching events rather than contacts, groups, notes, or interactions. It explicitly differentiates from counting, analyzing, or finding patterns.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides explicit usage guidelines with clear 'when to use' examples (e.g., 'what meetings next week?', 'show calendar for tomorrow') and explicit 'when not to use' exclusions (counting meetings, analyzing patterns, finding frequent participants). It effectively distinguishes this tool from potential alternatives.

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

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