UNPKG

git-mob-mcp-server

Version:
34 lines (33 loc) 1.06 kB
import { listTeamMembers } from "../clients/gitMobClient.js"; const name = "list_team_members"; const description = "Lists all team members that have been added to Git Mob. " + "The team members can then be used in pairing / mobbing sessions as coauthors." + "Each entry is formatted as: <key> <name> <email>." + "Ask the user which team member(s) they want to pair or mob with."; const inputSchema = {}; const annotations = { title: "List Team Members", readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false, }; const callback = async () => { const { ok, value } = await listTeamMembers(); 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;