boscli_system_git_status
Check the current git repository status including branch, commit hash, and list of changed files.
Instructions
Get BOS git repository status - branch, commit, changed files
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/tools/system.ts:20-25 (handler)The handler for boscli_system_git_status - calls client.get('/boscli/system/git-status')
{ name: 'boscli_system_git_status', description: 'Get BOS git repository status - branch, commit, changed files', schema: {}, handler: async (_, client) => client.get('/boscli/system/git-status'), }, - src/tools/system.ts:23-23 (schema)The schema for boscli_system_git_status - empty object, no parameters needed
schema: {}, - src/tools/system.ts:4-32 (registration)The systemTools array definition that includes all system tool registrations, including boscli_system_git_status
export const systemTools: McpTool[] = [ { name: 'boscli_system_info', description: 'Get BOS system information - version, PHP, Laravel, environment', schema: {}, handler: async (_, client) => client.get('/boscli/system/info'), }, { name: 'boscli_system_logs', description: 'Read recent BOS log entries', schema: { lines: { type: 'number', optional: true }, level: { type: 'string', enum: ['error', 'warning', 'info'], optional: true }, }, handler: async (args, client) => client.get('/boscli/system/logs', args), }, { name: 'boscli_system_git_status', description: 'Get BOS git repository status - branch, commit, changed files', schema: {}, handler: async (_, client) => client.get('/boscli/system/git-status'), }, { name: 'boscli_system_deploy_status', description: 'Get deployment status for BOS servers', schema: { customer: { type: 'string', optional: true } }, handler: async (args, client) => client.get('/boscli/system/deploy-status', args), }, ]; - src/index.ts:27-76 (registration)Tools are imported and spread into allTools array, then registered via server.tool() in the registration loop
const allTools: McpTool[] = [ ...healthTools, ...moduleTools, ...routeTools, ...cacheTools, ...systemTools, ...productTools, ...orderTools, ...cartTools, ...customerTools, ...inventoryTools, ...voucherTools, ...loyaltyTools, ...storeTools, ...checkoutTools, ...promotionTools, ...engagementTools, ...erpTools, ...smartTools, ]; const client = new BosApiClient(); const server = new McpServer({ name: 'bos-mcp', version: '1.0.0', }); // Register all tools with proper Zod schemas for (const tool of allTools) { const zodSchema = toZodSchema(tool.schema); server.tool( tool.name, tool.description, zodSchema.shape, async (args: any) => { try { const result = await tool.handler(args, client); return { content: [{ type: 'text' as const, text: JSON.stringify(result, null, 2) }], }; } catch (error: any) { return { content: [{ type: 'text' as const, text: JSON.stringify({ error: error.message || 'Unknown error' }) }], isError: true, }; } } ); } - src/client/index.ts:90-92 (helper)The client.get() method that executes the actual HTTP GET request to the BOS API endpoint
async get<T>(path: string, params?: Record<string, any>): Promise<T> { return this.request<T>('GET', path, undefined, params); }