git_status
Check uncommitted changes in your Hexo blog project to monitor Git status before publishing updates.
Instructions
查看博客项目当前的 Git 状态(未提交的更改)
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/utils/git-runner.ts:28-30 (handler)The function that actually executes `git status --short` and returns the output.
export async function getGitStatus(): Promise<string> { return runCommand("git status --short"); } - src/tools/git-tools.ts:66-87 (registration)The registration of the 'git_status' tool using the MCP server, including the handler wrapper.
server.tool( "git_status", "查看博客项目当前的 Git 状态(未提交的更改)", {}, async () => { try { const status = await getGitStatus(); return { content: [ { type: "text" as const, text: status ? `当前有未提交的更改:\n\n${status}` : "✅ 工作区干净,没有未提交的更改。", }, ], }; } catch (e: any) { return { content: [{ type: "text" as const, text: `错误: ${e.message}` }], isError: true }; } } );