@cyanheads/git-mcp-server
Version:
An MCP (Model Context Protocol) server enabling LLMs and AI agents to interact with Git repositories. Provides tools for comprehensive Git operations including clone, commit, branch, diff, log, status, push, pull, merge, rebase, worktree, tag management,
92 lines • 2.9 kB
TypeScript
/**
* @fileoverview Defines the core logic, schemas, and types for the git_log tool.
* @module src/mcp-server/tools/gitLog/logic
*/
import { z } from "zod";
import { type RequestContext } from "../../../utils/index.js";
export declare const GitLogInputSchema: z.ZodObject<{
path: z.ZodDefault<z.ZodString>;
maxCount: z.ZodOptional<z.ZodNumber>;
author: z.ZodOptional<z.ZodString>;
since: z.ZodOptional<z.ZodString>;
until: z.ZodOptional<z.ZodString>;
branchOrFile: z.ZodOptional<z.ZodString>;
showSignature: z.ZodDefault<z.ZodBoolean>;
}, "strip", z.ZodTypeAny, {
path: string;
showSignature: boolean;
author?: string | undefined;
maxCount?: number | undefined;
since?: string | undefined;
until?: string | undefined;
branchOrFile?: string | undefined;
}, {
path?: string | undefined;
author?: string | undefined;
maxCount?: number | undefined;
since?: string | undefined;
until?: string | undefined;
branchOrFile?: string | undefined;
showSignature?: boolean | undefined;
}>;
export declare const GitLogOutputSchema: z.ZodObject<{
success: z.ZodBoolean;
message: z.ZodString;
commits: z.ZodOptional<z.ZodArray<z.ZodObject<{
hash: z.ZodString;
authorName: z.ZodString;
authorEmail: z.ZodString;
timestamp: z.ZodNumber;
subject: z.ZodString;
body: z.ZodOptional<z.ZodString>;
}, "strip", z.ZodTypeAny, {
timestamp: number;
hash: string;
authorName: string;
authorEmail: string;
subject: string;
body?: string | undefined;
}, {
timestamp: number;
hash: string;
authorName: string;
authorEmail: string;
subject: string;
body?: string | undefined;
}>, "many">>;
rawOutput: z.ZodOptional<z.ZodString>;
}, "strip", z.ZodTypeAny, {
message: string;
success: boolean;
commits?: {
timestamp: number;
hash: string;
authorName: string;
authorEmail: string;
subject: string;
body?: string | undefined;
}[] | undefined;
rawOutput?: string | undefined;
}, {
message: string;
success: boolean;
commits?: {
timestamp: number;
hash: string;
authorName: string;
authorEmail: string;
subject: string;
body?: string | undefined;
}[] | undefined;
rawOutput?: string | undefined;
}>;
export type GitLogInput = z.infer<typeof GitLogInputSchema>;
export type GitLogOutput = z.infer<typeof GitLogOutputSchema>;
/**
* 4. IMPLEMENT the core logic function.
* @throws {McpError} If the logic encounters an unrecoverable issue.
*/
export declare function logGitHistory(params: GitLogInput, context: RequestContext & {
getWorkingDirectory: () => string | undefined;
}): Promise<GitLogOutput>;
//# sourceMappingURL=logic.d.ts.map