Skip to main content
Glama

activity_log

Track project changes and review recent activity in Saga MCP's structured database to maintain continuity across sessions.

Instructions

View the activity log showing what changed and when. Useful for understanding recent progress or reviewing what happened since the last session.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
entity_typeNoFilter by entity type
entity_idNoFilter by specific entity
actionNoFilter by action type
sinceNoISO 8601 datetime - show only activity after this time
limitNo

Implementation Reference

  • The handler function for the 'activity_log' tool which queries the activity_log table based on provided filters.
    function handleActivityLog(args: Record<string, unknown>) {
      const db = getDb();
      const entityType = args.entity_type as string | undefined;
      const entityId = args.entity_id as number | undefined;
      const action = args.action as string | undefined;
      const since = args.since as string | undefined;
      const limit = (args.limit as number) ?? 50;
    
      const whereClauses: string[] = [];
      const params: unknown[] = [];
    
      if (entityType) {
        whereClauses.push('entity_type = ?');
        params.push(entityType);
      }
      if (entityId !== undefined) {
        whereClauses.push('entity_id = ?');
        params.push(entityId);
      }
      if (action) {
        whereClauses.push('action = ?');
        params.push(action);
      }
      if (since) {
        whereClauses.push('created_at > ?');
        params.push(since);
      }
    
      const whereStr = whereClauses.length > 0 ? `WHERE ${whereClauses.join(' AND ')}` : '';
      const sql = `SELECT * FROM activity_log ${whereStr} ORDER BY created_at DESC LIMIT ?`;
      params.push(limit);
    
      return db.prepare(sql).all(...params);
    }
  • The definition and input schema for the 'activity_log' tool.
    {
      name: 'activity_log',
      description:
        'View the activity log showing what changed and when. Useful for understanding recent progress or reviewing what happened since the last session.',
      annotations: { title: 'Activity Log', readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false },
      inputSchema: {
        type: 'object',
        properties: {
          entity_type: {
            type: 'string',
            enum: ['project', 'epic', 'task', 'subtask', 'note'],
            description: 'Filter by entity type',
          },
          entity_id: { type: 'integer', description: 'Filter by specific entity' },
          action: {
            type: 'string',
            enum: ['created', 'updated', 'deleted', 'status_changed'],
            description: 'Filter by action type',
          },
          since: { type: 'string', description: 'ISO 8601 datetime - show only activity after this time' },
          limit: { type: 'integer', default: 50 },
        },
      },
    },
  • Registration of the 'activity_log' handler within the tools module.
    export const handlers: Record<string, ToolHandler> = {
      activity_log: handleActivityLog,

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/spranab/saga-mcp'

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