Skip to main content
Glama

poll_events

Retrieve recent events from a timestamp for real-time visibility into CI results, deployments, and file changes when push notifications are unavailable.

Instructions

Get new events since a timestamp (push notification fallback)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sinceNoISO 8601 timestamp — returns events after this time

Implementation Reference

  • Handler implementation for the 'poll_events' tool, which fetches events either from a specific timestamp or the 100 most recent ones.
    private async handlePollEvents(args: Record<string, unknown>) {
      const schema = z.object({ since: z.string().optional() });
      const parsed = schema.parse(args);
    
      const events = parsed.since
        ? getEventsSince(parsed.since)
        : getRecentEvents(100);
    
      return {
        content: [{
          type: 'text' as const,
          text: JSON.stringify(events, null, 2),
        }],
      };
    }
  • src/server.ts:159-167 (registration)
    Registration of the 'poll_events' tool in the ListToolsRequestSchema handler.
      name: 'poll_events',
      description: 'Get new events since a timestamp (push notification fallback)',
      inputSchema: {
        type: 'object',
        properties: {
          since: { type: 'string', description: 'ISO 8601 timestamp — returns events after this time' },
        },
      },
    },

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/jarvisassistantux/loopsense'

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