> ## Documentation Index
> Fetch the complete documentation index at: https://www.greptile.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Reports & Analytics

> Generate code review reports and analytics using MCP tools. Track PR status, weekly summaries, team metrics, and review completion rates from your IDE.

Use MCP tools to generate reports on review activity and track team progress.

## PR Status

Get a quick status check for any PR:

```text theme={}
What's the review status for PR #5 in owner/repo?
```

<Frame>
  <img src="https://mintcdn.com/greptile/sJeefWhR1h6iqsSa/images/individual-pr-stats-mcp.png?fit=max&auto=format&n=sJeefWhR1h6iqsSa&q=85&s=e89663c29becbde8fb048a0154af6abe" alt="Individual PR stats" width="1490" height="1274" data-path="images/individual-pr-stats-mcp.png" />
</Frame>

**Tool:** [`get_merge_request`](/mcp-v2/tools#get_merge_request)

Response includes:

* `reviewCompleteness`: "2/5 Greptile comments addressed"
* `hasNewCommitsSinceReview`: Whether re-review needed
* `addressedComments` / `unaddressedComments`: Full lists

***

## Weekly Summary

Generate a report of open PR status:

```text theme={}
Give me a weekly summary of all open PRs with their review status and make a nice visual graph for important stats.
```

<Frame>
  <img src="https://mintcdn.com/greptile/sJeefWhR1h6iqsSa/images/pr-report-mcp.png?fit=max&auto=format&n=sJeefWhR1h6iqsSa&q=85&s=06200c301ea59e4e7a0388a14f9207c0" alt="PR report visualization" width="2450" height="1640" data-path="images/pr-report-mcp.png" />
</Frame>

The assistant:

1. Calls `list_pull_requests` with `state: "open"`
2. For each PR, calls `get_merge_request` to get `reviewAnalysis`
3. Compiles: PR number, title, author, age, completeness, unaddressed count

Claude took the MCP data and whipped up a basic webpage to visualize it.

***

## Team Metrics

<AccordionGroup>
  <Accordion title="Comments by repository">
    ```text theme={}
    How many unaddressed Greptile comments do we have per repository?
    ```

    **Tool:** [`list_pull_requests`](/mcp-v2/tools#list_pull_requests) + [`list_merge_request_comments`](/mcp-v2/tools#list_merge_request_comments) for each
  </Accordion>

  <Accordion title="Review completion rate">
    ```text theme={}
    What percentage of Greptile comments have been addressed across all open PRs?
    ```

    **Tool:** [`get_merge_request`](/mcp-v2/tools#get_merge_request) → aggregates `reviewAnalysis` across PRs
  </Accordion>

  <Accordion title="Stale PRs">
    ```text theme={}
    Which open PRs are older than 7 days and still have unaddressed comments?
    ```

    **Tool:** [`list_pull_requests`](/mcp-v2/tools#list_pull_requests) → filters by `createdAt`
  </Accordion>

  <Accordion title="Issues with fixes available">
    ```text theme={}
    How many unaddressed comments have suggested code fixes?
    ```

    **Tool:** [`search_greptile_comments`](/mcp-v2/tools#search_greptile_comments) → checks `summary.withSuggestions`
  </Accordion>

  <Accordion title="Issues by file">
    ```text theme={}
    Which files have the most unaddressed Greptile comments?
    ```

    **Tool:** [`search_greptile_comments`](/mcp-v2/tools#search_greptile_comments) → groups by `filePath`
  </Accordion>
</AccordionGroup>

***

## Code Review History

<AccordionGroup>
  <Accordion title="Recent reviews">
    ```text theme={}
    Show me the last 10 completed code reviews
    ```

    **Tool:** [`list_code_reviews`](/mcp-v2/tools#list_code_reviews) with `status: "COMPLETED"` and `limit: 10`
  </Accordion>

  <Accordion title="Review details">
    ```text theme={}
    Get details for code review 1382118
    ```

    **Tool:** [`get_code_review`](/mcp-v2/tools#get_code_review)

    Returns `strictness`, `totalFiles`, `completedFiles`, full PR info.
  </Accordion>

  <Accordion title="Failed reviews">
    ```text theme={}
    Are there any failed or skipped code reviews?
    ```

    **Tool:** [`list_code_reviews`](/mcp-v2/tools#list_code_reviews) with `status: "FAILED"` or `"SKIPPED"`
  </Accordion>
</AccordionGroup>

***

## Next Steps

<CardGroup cols={2}>
  <Card title="Auto-Fix Workflow" icon="wand-magic-sparkles" href="/mcp-v2/auto-fix">
    Fix issues identified in your reports
  </Card>

  <Card title="Custom Context" icon="brain" href="/mcp-v2/custom-context">
    Track which patterns trigger the most comments
  </Card>
</CardGroup>
