UNPKG

git-mob-mcp-server

Version:
30 lines (29 loc) 1.02 kB
import { z } from "zod"; import { setMobSessionCoauthors } from "../clients/gitMobClient.js"; const name = "set_mob_session_coauthors"; const description = "Sets the active pairing or mob session by specifying the " + "keys of the team members to include as coauthors. " + "If Git Mob is setup, these coauthors will be automatically added as " + "Co-authored-by trailers to the commit's message when making commits during the session."; const inputSchema = { coauthorKeys: z.array(z.string()).min(1), }; const annotations = { title: "Set Mob or Pairing Session Coauthors using Team Members", readOnlyHint: false, destructiveHint: true, idempotentHint: true, openWorldHint: false, }; const callback = async ({ coauthorKeys }) => { const { ok, value } = await setMobSessionCoauthors(coauthorKeys); return { isError: !ok, content: [{ type: "text", text: value }] }; }; const tool = { name, description, inputSchema, annotations, callback, }; export default tool;