Skip to main content
Glama

Get Team Activity

get_team_activity

Track recent team activity in Jira by retrieving issue updates, status changes, comments, and assignments within a specified timeframe.

Instructions

Get recent issue updates (status changes, comments, assignments) from TEAM_MEMBERS

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
timeframeDaysNoNumber of days to look back (default: 7)

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
errorNo
activitiesNo

Implementation Reference

  • Core handler function that executes the tool logic: queries Jira API using JQL to find recent updates on issues assigned to or reported by team members within the given timeframe, maps results to activity items.
    export async function getTeamActivity(
      teamMembers: string[],
      timeframeDays: number = 7
    ): Promise<JiraActivityItem[]> {
      const startDate = new Date();
      startDate.setDate(startDate.getDate() - timeframeDays);
      const startDateStr = startDate.toISOString().split('T')[0];
    
      // Build JQL for team member activity
      const membersList = teamMembers.map((m) => `"${m}"`).join(', ');
      const jql = `(assignee IN (${membersList}) OR reporter IN (${membersList})) AND updated >= "${startDateStr}" ORDER BY updated DESC`;
    
      const params = new URLSearchParams({
        jql,
        maxResults: '50',
      });
      // Add fields as separate params for the new API
      ['summary', 'status', 'assignee', 'updated'].forEach(f => params.append('fields', f));
    
      const response = await jiraFetch<{
        issues: Array<{
          key: string;
          id: string;
          fields: {
            summary: string;
            status: { name: string };
            assignee?: { displayName: string; accountId: string };
            updated: string;
          };
        }>;
        isLast?: boolean;
        nextPageToken?: string;
      }>(`/search/jql?${params.toString()}`);
    
      return response.issues.map((issue) => ({
        issueKey: issue.key,
        teamMember: issue.fields.assignee?.displayName || 'Unassigned',
        activityType: 'issue_updated',
        timestamp: issue.fields.updated,
        summary: issue.fields.summary,
      }));
    }
  • src/index.ts:226-275 (registration)
    MCP tool registration including input/output schemas, description, and wrapper handler that calls the core getTeamActivity function.
    server.registerTool(
      'get_team_activity',
      {
        title: 'Get Team Activity',
        description: 'Get recent issue updates (status changes, comments, assignments) from TEAM_MEMBERS',
        inputSchema: {
          timeframeDays: z.number().optional().describe('Number of days to look back (default: 7)'),
        },
        outputSchema: {
          activities: z.array(z.object({
            issueKey: z.string(),
            teamMember: z.string(),
            activityType: z.string(),
            timestamp: z.string(),
            summary: z.string().optional(),
          })).optional(),
          error: z.object({
            message: z.string(),
            statusCode: z.number().optional(),
            details: z.unknown().optional(),
          }).optional(),
        },
      },
      async ({ timeframeDays }) => {
        try {
          if (TEAM_MEMBERS.length === 0) {
            throw new Error('TEAM_MEMBERS is not configured. Please add team member usernames or accountIds.');
          }
    
          const days = timeframeDays ?? 7;
          if (days < 1 || days > 365) {
            throw new Error('timeframeDays must be between 1 and 365');
          }
    
          const activities = await getTeamActivity(TEAM_MEMBERS, days);
          const output = { activities };
          return {
            content: [{ type: 'text', text: JSON.stringify(output, null, 2) }],
            structuredContent: output,
          };
        } catch (error) {
          const output = formatError(error);
          return {
            content: [{ type: 'text', text: JSON.stringify(output, null, 2) }],
            structuredContent: output,
            isError: true,
          };
        }
      }
    );
  • TypeScript interface defining the structure of activity items returned by the tool.
    export interface JiraActivityItem {
      issueKey: string;
      teamMember: string;
      activityType: string;
      timestamp: string;
      summary?: string;
    }
  • Configuration constant for team members used by the get_team_activity tool.
    const TEAM_MEMBERS: string[] = process.env.JIRA_TEAM_MEMBERS
      ? process.env.JIRA_TEAM_MEMBERS.split(',').map(m => m.trim())
      : [];
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states it's a read operation ('Get'), but doesn't mention permissions required, rate limits, pagination, error handling, or what the output looks like (though an output schema exists). For a tool with zero annotation coverage, this is a significant gap in transparency about how it behaves beyond basic functionality.

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 a single, efficient sentence that front-loads the core purpose without unnecessary words. It directly states what the tool does ('Get recent issue updates') and specifies the types and source, with zero waste or redundancy. Every part of the sentence earns its place by adding clarity.

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?

Given the tool has one parameter with full schema coverage and an output schema exists, the description is minimally complete for a simple read operation. However, with no annotations and multiple sibling tools, it lacks context on usage guidelines and behavioral details like permissions or limitations. The output schema reduces the need to explain return values, but the description could better address when to use this versus alternatives.

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 adds no parameter-specific information beyond what's in the input schema, which has 100% coverage for the single parameter 'timeframeDays'. The schema already describes it as 'Number of days to look back (default: 7)', so the description doesn't compensate or add extra meaning. With high schema coverage, the baseline is 3 even without param details in the description.

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 verb 'Get' and the resource 'recent issue updates' with specific types mentioned (status changes, comments, assignments) and the source 'from TEAM_MEMBERS'. It distinguishes from siblings like 'get_my_issues' by focusing on team-wide activity rather than personal issues. However, it doesn't explicitly differentiate from 'get_my_work_summary' or 'search_issues' which might overlap in scope.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention when to choose this over 'get_my_issues' for personal tracking, 'search_issues' for filtered queries, or 'get_my_work_summary' for summaries. There's no context about prerequisites, exclusions, or specific use cases, leaving the agent to infer usage from the purpose alone.

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/eh24905-wiz/jira-mcp'

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