UNPKG

git-mob-mcp-server

Version:
34 lines (33 loc) 1.14 kB
import { listMobSessionCoauthorTrailers } from "../clients/gitMobClient.js"; const name = "list_mob_session_coauthor_trailers"; const description = "Lists the git Co-authored-by trailers for the coauthors " + "currently included in the active mob or pairing session. " + "If Git Mob is setup, these Co-authored-by trailers will be automatically " + "added to the commit's message when making commits during the session."; const inputSchema = {}; const annotations = { title: "List Mob Session Coauthor Trailers", readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false, }; const callback = async () => { const { ok, value } = await listMobSessionCoauthorTrailers(); if (!ok) { return { isError: true, content: [{ type: "text", text: value }] }; } const lines = value.split("\n").filter((line) => line.trim() !== ""); return { isError: false, content: lines.map((line) => ({ type: "text", text: line })), }; }; const tool = { name, description, inputSchema, annotations, callback, }; export default tool;