@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,
115 lines • 4.4 kB
TypeScript
/**
* @fileoverview Defines the core logic, schemas, and types for the git_status tool.
* @module src/mcp-server/tools/gitStatus/logic
*/
import { z } from "zod";
import { type RequestContext } from "../../../utils/index.js";
export declare const GitStatusInputSchema: z.ZodObject<{
path: z.ZodDefault<z.ZodString>;
}, "strip", z.ZodTypeAny, {
path: string;
}, {
path?: string | undefined;
}>;
export declare const GitStatusOutputSchema: z.ZodObject<{
current_branch: z.ZodNullable<z.ZodString>;
staged_changes: z.ZodObject<{
Added: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
Modified: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
Deleted: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
Renamed: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
Copied: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
TypeChanged: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
}, "strip", z.ZodTypeAny, {
Added?: string[] | undefined;
Modified?: string[] | undefined;
Deleted?: string[] | undefined;
Renamed?: string[] | undefined;
Copied?: string[] | undefined;
TypeChanged?: string[] | undefined;
}, {
Added?: string[] | undefined;
Modified?: string[] | undefined;
Deleted?: string[] | undefined;
Renamed?: string[] | undefined;
Copied?: string[] | undefined;
TypeChanged?: string[] | undefined;
}>;
unstaged_changes: z.ZodObject<{
Added: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
Modified: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
Deleted: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
Renamed: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
Copied: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
TypeChanged: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
}, "strip", z.ZodTypeAny, {
Added?: string[] | undefined;
Modified?: string[] | undefined;
Deleted?: string[] | undefined;
Renamed?: string[] | undefined;
Copied?: string[] | undefined;
TypeChanged?: string[] | undefined;
}, {
Added?: string[] | undefined;
Modified?: string[] | undefined;
Deleted?: string[] | undefined;
Renamed?: string[] | undefined;
Copied?: string[] | undefined;
TypeChanged?: string[] | undefined;
}>;
untracked_files: z.ZodArray<z.ZodString, "many">;
conflicted_files: z.ZodArray<z.ZodString, "many">;
is_clean: z.ZodBoolean;
}, "strip", z.ZodTypeAny, {
current_branch: string | null;
staged_changes: {
Added?: string[] | undefined;
Modified?: string[] | undefined;
Deleted?: string[] | undefined;
Renamed?: string[] | undefined;
Copied?: string[] | undefined;
TypeChanged?: string[] | undefined;
};
unstaged_changes: {
Added?: string[] | undefined;
Modified?: string[] | undefined;
Deleted?: string[] | undefined;
Renamed?: string[] | undefined;
Copied?: string[] | undefined;
TypeChanged?: string[] | undefined;
};
untracked_files: string[];
conflicted_files: string[];
is_clean: boolean;
}, {
current_branch: string | null;
staged_changes: {
Added?: string[] | undefined;
Modified?: string[] | undefined;
Deleted?: string[] | undefined;
Renamed?: string[] | undefined;
Copied?: string[] | undefined;
TypeChanged?: string[] | undefined;
};
unstaged_changes: {
Added?: string[] | undefined;
Modified?: string[] | undefined;
Deleted?: string[] | undefined;
Renamed?: string[] | undefined;
Copied?: string[] | undefined;
TypeChanged?: string[] | undefined;
};
untracked_files: string[];
conflicted_files: string[];
is_clean: boolean;
}>;
export type GitStatusInput = z.infer<typeof GitStatusInputSchema>;
export type GitStatusOutput = z.infer<typeof GitStatusOutputSchema>;
/**
* 4. IMPLEMENT the core logic function.
* @throws {McpError} If the logic encounters an unrecoverable issue.
*/
export declare function getGitStatus(params: GitStatusInput, context: RequestContext & {
getWorkingDirectory: () => string | undefined;
}): Promise<GitStatusOutput>;
//# sourceMappingURL=logic.d.ts.map