Skip to content

Conversation

@Berg-it
Copy link
Contributor

@Berg-it Berg-it commented Jun 9, 2025

Description

Enhanced the git_log function to support date-based filtering with optional start_timestamp and end_timestamp parameters. This enables users to filter commit history by date ranges or specific time periods, which is useful for auditing and reporting purposes

Motivation and Context

These changes align with the project's focus on providing granular Git history analysis tools while maintaining backward compatibility with existing integrations

How Has This Been Tested?

Tested with Trae IDE

Breaking Changes

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update

Checklist

  • I have read the MCP Protocol Documentation
  • My changes follows MCP security best practices
  • I have updated the server's README accordingly
  • I have tested this with an LLM client
  • My code follows the repository's style guidelines
  • New and existing tests pass locally
  • I have added appropriate error handling
  • I have documented all environment variables and configuration options

Additional context

maberguiga added 2 commits June 9, 2025 21:49
Add git_log_date_range and git_log_by_date functions to retrieve commits within a date range or for a specific date. Includes corresponding models and tool definitions for API integration.
Add git_log_date_range and git_log_by_date functions to retrieve commits within a date range or for a specific date. This enables users to filter commit history by date, which is useful for auditing and reporting purposes.
@Berg-it Berg-it marked this pull request as draft June 9, 2025 20:00
@Berg-it Berg-it marked this pull request as ready for review June 9, 2025 20:01
@Berg-it
Copy link
Contributor Author

Berg-it commented Jun 11, 2025

@olaservo can you take a look please?

@olaservo olaservo added server-git Reference implementation for the Git MCP server - src/git enhancement New feature or request labels Jun 13, 2025
Berg-it and others added 23 commits June 16, 2025 09:56
Adding the Microsoft Docs MCP server github repo and description to the servers list.
Would like to move MS Docs MCP Server link and description up to official integrations. This is a server officially supported by Microsoft with canonical Microsoft product documentation hosted on learn.microsoft.com.
Add Alpaca’s official MCP server to community servers list
- Add head/tail functionality for memory-efficient file reading
- Implement new list_directory_with_sizes command with file size info
- Add formatSize utility for human-readable file sizes
Signed-off-by: rithin-pullela-aws <rithinp@amazon.com>
Signed-off-by: rithin-pullela-aws <rithinp@amazon.com>
maberguiga and others added 5 commits July 7, 2025 11:16
Implemented functionality to retrieve branch information based on specified criteria, enhancing the Git tools available in the server. This includes support for local and remote branches, as well as filtering by commit containment.
…reamline commit history retrieval options.
Copy link
Member

@domdomegg domdomegg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we instead add these as parameters to git_log? I think we just need start_timestamp and end_timestamp, as a model could pass in the start and end of a day to get a particular day.

Berg-it and others added 2 commits August 20, 2025 14:35
Replace separate date range log functions with timestamp parameters in git_log
Remove deprecated GitLogDateRange and GitLogByDate classes and tools
@Berg-it
Copy link
Contributor Author

Berg-it commented Aug 20, 2025

@domdomegg The requested updates are done. Please proceed with the review.

Remove separate git_log_date_range and git_log_by_date functions as their functionality is now included in git_log with optional timestamp parameters
@Berg-it Berg-it requested a review from domdomegg August 21, 2025 08:46
max_count: int = 10
start_timestamp: Optional[str] = Field(
None,
description="Start timestamp for filtering commits (ISO format or git-compatible date string)"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ISO format or git-compatible date string

I think it would be good to be more explicit about a strict format here.

And also from the implementation, I don't think this looks true? (i.e. args.extend(['--format=%H%n%an%n%ad%n%s%n']) requires a certain format). Might have misunderstood though.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@domdomegg For args.extend(['--format=%H%n%an%n%ad%n%s%n']): This line of code defines the output format for the git log command when date filtering is used. I’ve added more details to the description.

Copy link
Member

@domdomegg domdomegg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Per comment

maberguiga added 2 commits August 25, 2025 15:04
Clarify supported timestamp formats in field descriptions by listing specific examples of ISO 8601, relative and absolute date formats
@Berg-it Berg-it requested a review from domdomegg August 25, 2025 13:05
@domdomegg
Copy link
Member

CleanShot 2025-08-25 at 18 25 47@2x

nice!

@domdomegg domdomegg merged commit 09adff0 into modelcontextprotocol:main Aug 25, 2025
19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request server-git Reference implementation for the Git MCP server - src/git

Projects

None yet

Development

Successfully merging this pull request may close these issues.