Skip to main content
Glama

activity_log

Read-onlyIdempotent

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,
Behavior4/5

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

The description adds valuable behavioral context beyond annotations: it explains the log shows 'what changed and when' and is 'useful for understanding recent progress.' Annotations already declare readOnlyHint=true, destructiveHint=false, idempotentHint=true, and openWorldHint=false, covering safety and idempotency. The description complements this by clarifying the tool's purpose as a review/audit mechanism without contradicting 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?

The description is perfectly concise with two sentences that each earn their place. The first sentence states the core purpose, and the second provides usage context. There's zero wasted language, and it's front-loaded with the essential information.

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?

Given the tool's moderate complexity (5 parameters, no output schema), annotations provide good safety coverage (read-only, non-destructive, idempotent), and schema coverage is high at 80%. The description adequately complements this by explaining the tool's purpose and general use case. However, it could be more complete by mentioning the default limit or filtering capabilities hinted at in the schema.

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 description doesn't mention any parameters explicitly. With schema description coverage at 80%, the schema already documents most parameters well (entity_type, entity_id, action, since, limit). The baseline score of 3 is appropriate since the schema does the heavy lifting, and the description doesn't add parameter-specific details beyond what's in the schema.

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

Purpose4/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 as 'View the activity log showing what changed and when,' which is a specific verb+resource combination. It distinguishes itself from siblings by focusing on audit/log functionality rather than CRUD operations on specific entities. However, it doesn't explicitly contrast with similar tools like 'tracker_session_diff' which might also show changes.

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

Usage Guidelines3/5

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

The description provides implied usage context with 'Useful for understanding recent progress or reviewing what happened since the last session,' suggesting it's for audit/review purposes. However, it doesn't explicitly state when to use this versus alternatives like 'tracker_session_diff' or 'tracker_search,' nor does it provide any exclusions or prerequisites for usage.

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