-
Notifications
You must be signed in to change notification settings - Fork 9.1k
feat(git): add date-based commit log retrieval functions #2057
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(git): add date-based commit log retrieval functions #2057
Conversation
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.
|
@olaservo can you take a look please? |
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>
…Berg-it/servers into feature/add-git-date-tools-docs
…e/add-git-date-tools-docs
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.
domdomegg
left a comment
There was a problem hiding this 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.
Replace separate date range log functions with timestamp parameters in git_log Remove deprecated GitLogDateRange and GitLogByDate classes and tools
|
@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
src/git/src/mcp_server_git/server.py
Outdated
| max_count: int = 10 | ||
| start_timestamp: Optional[str] = Field( | ||
| None, | ||
| description="Start timestamp for filtering commits (ISO format or git-compatible date string)" |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
domdomegg
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Per comment
Clarify supported timestamp formats in field descriptions by listing specific examples of ISO 8601, relative and absolute date formats

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
Checklist
Additional context