Skip to main content
Glama

get_commit_history

Retrieve recent commit history from GitHub repositories to track changes and maintain version control for remote memory data synchronization.

Instructions

최근 커밋 히스토리를 조회합니다

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNo조회할 커밋 수 (기본: 10)

Implementation Reference

  • Main handler function that processes the tool call, extracts limit parameter, fetches commit history via syncManager, formats and returns the response as JSON text.
    private async handleGetCommitHistory(args: any) { try { const limit = args.limit || 10; const commits = await this.syncManager.getCommitHistory(limit); return { content: [{ type: 'text', text: JSON.stringify({ success: true, commits, count: commits.length }, null, 2), }], }; } catch (error) { return { content: [{ type: 'text', text: JSON.stringify({ success: false, error: error instanceof Error ? error.message : 'Unknown error' }, null, 2), }], }; } }
  • src/index.ts:360-371 (registration)
    Tool registration in the MCP tools array, defining name, description, and input schema for limit parameter.
    name: 'get_commit_history', description: '최근 커밋 히스토리를 조회합니다', inputSchema: { type: 'object', properties: { limit: { type: 'number', description: '조회할 커밋 수 (기본: 10)' } }, }, },
  • Helper method in SyncManager that calls GitHub API via githubClient to retrieve recent commits for the memory file and formats the commit data.
    async getCommitHistory(limit: number = 10): Promise<any[]> { try { const response = await this.githubClient.getCommits(this.MEMORY_FILE_PATH, limit); return response.map(commit => ({ sha: commit.sha.substring(0, 7), message: commit.commit.message, author: commit.commit.author.name, date: commit.commit.author.date, url: commit.html_url })); } catch (error) { console.error('Failed to get commit history:', error); return []; } }
  • Dispatch case in the main request handler that routes 'get_commit_history' tool calls to the specific handler function.
    case 'get_commit_history': return await this.handleGetCommitHistory(args);

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/YeomYuJun/remote-memory-mcp-server'

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