Skip to content

Commit 0a32924

Browse files
Merge pull request #131 from codacy/fix-windows-path
fix: mcp calling tools with URL-encoded paths CF-1739
2 parents 4f18f7a + 3bf3dee commit 0a32924

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

src/commands/configureMCP.ts

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,11 @@ const newRulesTemplate = (params?: RepositoryParams, excludedScopes?: ('guardrai
9696
}
9797

9898
const commonRules: Rule[] = [
99+
{
100+
when: 'Trying to call a tool that needs a rootPath as a parameter',
101+
enforce: ['Always use the standard, non-URL-encoded file system path'],
102+
scope: 'guardrails',
103+
},
99104
{
100105
when: 'After ANY successful `edit_file` or `reapply` operation',
101106
enforce: [
@@ -482,8 +487,8 @@ export async function configureMCP(params?: RepositoryParams, isUpdate = false)
482487
args: ['-y', '@codacy/codacy-mcp@latest'],
483488
env: apiToken
484489
? {
485-
CODACY_ACCOUNT_TOKEN: apiToken,
486-
}
490+
CODACY_ACCOUNT_TOKEN: apiToken,
491+
}
487492
: undefined,
488493
}
489494

0 commit comments

Comments
 (0)