@andrebuzeli/git-mcp 7.0.1 → 7.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/server.js +5 -0
  2. package/package.json +1 -1
package/dist/server.js CHANGED
@@ -53,6 +53,11 @@ function createServer(opts) {
53
53
  const t = toolRegistry.get(tool);
54
54
  if (!t)
55
55
  return res.status(404).json((0, errors_1.createErrorResponse)('TOOL_NOT_FOUND', `Tool not found: ${tool}`));
56
+ // Enforce projectPath presence for all tool calls to avoid agents calling tools without context
57
+ // Many tools require projectPath; centralize the check so callers receive a clear validation error.
58
+ if (!params || !params.projectPath) {
59
+ return res.status(400).json((0, errors_1.createErrorResponse)('VALIDATION_ERROR', 'projectPath is required for all tool calls'));
60
+ }
56
61
  try {
57
62
  // TODO: validate params via JSON Schema
58
63
  const result = await t.handle(params ?? {}, { providerManager: opts.providerManager });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@andrebuzeli/git-mcp",
3
- "version": "7.0.1",
3
+ "version": "7.0.2",
4
4
  "description": "Professional MCP server for Git operations - STDIO UNIVERSAL: works in ANY IDE (Cursor, VSCode, Claude Desktop). Fully autonomous DUAL execution (GitHub + Gitea APIs) with automatic username detection. All tools execute on BOTH providers simultaneously. No manual parameters needed.",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",