@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,
107 lines • 3.32 kB
TypeScript
/**
* @fileoverview Defines the core logic, schemas, and types for the git_remote tool.
* @module src/mcp-server/tools/gitRemote/logic
*/
import { z } from "zod";
import { type RequestContext } from "../../../utils/index.js";
export declare const GitRemoteBaseSchema: z.ZodObject<{
path: z.ZodDefault<z.ZodString>;
mode: z.ZodEnum<["list", "add", "remove", "show"]>;
name: z.ZodOptional<z.ZodString>;
url: z.ZodOptional<z.ZodString>;
}, "strip", z.ZodTypeAny, {
path: string;
mode: "add" | "list" | "show" | "remove";
url?: string | undefined;
name?: string | undefined;
}, {
mode: "add" | "list" | "show" | "remove";
path?: string | undefined;
url?: string | undefined;
name?: string | undefined;
}>;
export declare const GitRemoteInputSchema: z.ZodEffects<z.ZodEffects<z.ZodObject<{
path: z.ZodDefault<z.ZodString>;
mode: z.ZodEnum<["list", "add", "remove", "show"]>;
name: z.ZodOptional<z.ZodString>;
url: z.ZodOptional<z.ZodString>;
}, "strip", z.ZodTypeAny, {
path: string;
mode: "add" | "list" | "show" | "remove";
url?: string | undefined;
name?: string | undefined;
}, {
mode: "add" | "list" | "show" | "remove";
path?: string | undefined;
url?: string | undefined;
name?: string | undefined;
}>, {
path: string;
mode: "add" | "list" | "show" | "remove";
url?: string | undefined;
name?: string | undefined;
}, {
mode: "add" | "list" | "show" | "remove";
path?: string | undefined;
url?: string | undefined;
name?: string | undefined;
}>, {
path: string;
mode: "add" | "list" | "show" | "remove";
url?: string | undefined;
name?: string | undefined;
}, {
mode: "add" | "list" | "show" | "remove";
path?: string | undefined;
url?: string | undefined;
name?: string | undefined;
}>;
export declare const GitRemoteOutputSchema: z.ZodObject<{
success: z.ZodBoolean;
mode: z.ZodString;
message: z.ZodOptional<z.ZodString>;
remotes: z.ZodOptional<z.ZodArray<z.ZodObject<{
name: z.ZodString;
fetchUrl: z.ZodString;
pushUrl: z.ZodString;
}, "strip", z.ZodTypeAny, {
name: string;
fetchUrl: string;
pushUrl: string;
}, {
name: string;
fetchUrl: string;
pushUrl: string;
}>, "many">>;
details: z.ZodOptional<z.ZodString>;
}, "strip", z.ZodTypeAny, {
success: boolean;
mode: string;
message?: string | undefined;
details?: string | undefined;
remotes?: {
name: string;
fetchUrl: string;
pushUrl: string;
}[] | undefined;
}, {
success: boolean;
mode: string;
message?: string | undefined;
details?: string | undefined;
remotes?: {
name: string;
fetchUrl: string;
pushUrl: string;
}[] | undefined;
}>;
export type GitRemoteInput = z.infer<typeof GitRemoteInputSchema>;
export type GitRemoteOutput = z.infer<typeof GitRemoteOutputSchema>;
/**
* 4. IMPLEMENT the core logic function.
* @throws {McpError} If the logic encounters an unrecoverable issue.
*/
export declare function gitRemoteLogic(params: GitRemoteInput, context: RequestContext & {
getWorkingDirectory: () => string | undefined;
}): Promise<GitRemoteOutput>;
//# sourceMappingURL=logic.d.ts.map