Skip to main content
Glama

tracker_session_diff

Read-onlyIdempotent

Compare project tracker changes since a specific timestamp to identify new tasks, updates, and completed work at session start.

Instructions

Show what changed since a given timestamp. Returns aggregated summary with counts by action and entity type, plus highlights of key changes. Call this at the start of a session to understand what happened since the last one.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sinceYesISO 8601 datetime — show changes after this time (e.g. "2026-02-21T15:00:00")

Implementation Reference

  • The handler function 'handleSessionDiff' that processes the 'tracker_session_diff' tool request by querying the activity log and aggregating the results.
    function handleSessionDiff(args: Record<string, unknown>) {
      const db = getDb();
      const since = args.since as string;
    
      const rows = db
        .prepare('SELECT * FROM activity_log WHERE created_at >= ? ORDER BY created_at ASC')
        .all(since) as Array<Record<string, unknown>>;
    
      const now = new Date().toISOString().replace('T', ' ').slice(0, 19);
    
      // Aggregate by action
      const summary: Record<string, number> = { created: 0, updated: 0, status_changed: 0, deleted: 0 };
      // Aggregate by entity_type -> action
      const byEntity: Record<string, Record<string, number>> = {};
    
      const highlights: string[] = [];
    
      for (const row of rows) {
        const action = row.action as string;
        const entityType = row.entity_type as string;
    
        summary[action] = (summary[action] ?? 0) + 1;
    
        if (!byEntity[entityType]) {
          byEntity[entityType] = { created: 0, updated: 0, status_changed: 0, deleted: 0 };
        }
        byEntity[entityType][action] = (byEntity[entityType][action] ?? 0) + 1;
    
        // Pick out highlights: status changes, creates, and deletes
        if (action === 'status_changed' || action === 'created' || action === 'deleted') {
          if (row.summary) highlights.push(row.summary as string);
        }
      }
    
      return {
        since,
        until: now,
        total_changes: rows.length,
        summary,
        by_entity_type: byEntity,
        highlights,
        activity: rows,
      };
    }
  • Tool definition and schema for 'tracker_session_diff' in the definitions array.
    {
      name: 'tracker_session_diff',
      description:
        'Show what changed since a given timestamp. Returns aggregated summary with counts by action and entity type, plus highlights of key changes. Call this at the start of a session to understand what happened since the last one.',
      annotations: { title: 'Session Diff', readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false },
      inputSchema: {
        type: 'object',
        properties: {
          since: {
            type: 'string',
            description: 'ISO 8601 datetime — show changes after this time (e.g. "2026-02-21T15:00:00")',
          },
        },
        required: ['since'],
      },
    },
  • Tool registration mapping 'tracker_session_diff' to 'handleSessionDiff'.
    export const handlers: Record<string, ToolHandler> = {
      activity_log: handleActivityLog,
      tracker_session_diff: handleSessionDiff,
      task_batch_update: handleTaskBatchUpdate,
    };
Behavior4/5

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

Annotations already cover read-only, non-destructive, and idempotent behavior, but the description adds valuable context about the return format ('aggregated summary with counts by action and entity type, plus highlights of key changes') and the session-oriented use case, which isn't captured in annotations.

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?

It's front-loaded with the core purpose, followed by return details and usage guidance in two efficient sentences, with no wasted words or redundancy.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a single-parameter tool with rich annotations and no output schema, the description provides good context on purpose, usage, and return behavior, though it could slightly enhance completeness by mentioning potential limitations like time range constraints or data scope.

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?

Schema description coverage is 100%, with the 'since' parameter fully documented in the schema. The description doesn't add any parameter-specific details beyond what the schema provides, so it meets the baseline for high coverage.

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 verbs ('show what changed', 'returns aggregated summary') and resources ('since a given timestamp'), distinguishing it from siblings like activity_log or tracker_search by focusing on session-based change aggregation rather than raw logging or general search.

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?

It provides explicit guidance on when to use this tool ('Call this at the start of a session to understand what happened since the last one'), with a clear alternative context implied for non-session scenarios, though it doesn't name specific sibling 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

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