MCP error -32602: Invalid arguments for tool sf-get-username in Zed IDE
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 35/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Domain
- tooling
Research direction
Reproduce the Zed agent-panel call using the supplied @salesforce/mcp configuration and the sf-get-username entry point. Trace how its directory argument is validated, compare the relative and absolute paths shown in the report, and verify the expected behavior for the failing call.
Written by the indexing model from the issue text.
Description
When using this mcp in Zed agent panel I am getting Invalid path: Must be an absolute path and cannot contain path traversal sequences. Here is whole thread
New Thread
User
what's my org username, in case of errors use pwd to get current folder
Agent
Use Tool: sf-get-username (call_04Zln3SKOhNXp9JLtpszBdbu)
{ "defaultDevHub": false, "defaultTargetOrg": false, "directory": "salesforce" }Tool Results: call_04Zln3SKOhNXp9JLtpszBdbu (Error)
MCP error -32602: Invalid arguments for tool sf-get-username: [
{
"code": "custom",
"message": "Invalid path: Must be an absolute path and cannot contain path traversal sequences",
"path": [
"directory"
]
}
]Agent
Use Tool: terminal (call_z8yULb5LbMMlWhNYfmgZEO7y)
{ "cd": "salesforce", "command": "pwd" }Tool Results: call_z8yULb5LbMMlWhNYfmgZEO7y
/Users/adam/IdeaProjects/salesforceAgent
Use Tool: sf-get-username (call_4302sILxp6UuNeUOioMCuJCT)
{ "defaultDevHub": false, "defaultTargetOrg": false, "directory": "/Users/adam/IdeaProjects/salesforce" }Tool Results: call_4302sILxp6UuNeUOioMCuJCT
YOU MUST inform the user that we are going to use "[email protected]" (Alias: xx-dev) for the "usernameOrAlias" parameter.
YOU MUST explain the reasoning for selecting this org, which is: "it was the only org found in the MCP Servers allowlisted orgs"
UNLESS THE USER SPECIFIES OTHERWISE, use this username for the "usernameOrAlias" parameter in future Tool calls.Agent
We found that your org username is [email protected] with the alias xx-dev. This was selected because it was the only org found in the MCP Servers allowlisted orgs.
Unless you specify otherwise, I’ll use this username for the
usernameOrAliasparameter in future Salesforce tool calls.
and here is my setup of the mcp
"context_servers": {
"salesforce": {
"command": {
"path": "npx",
"args": [
"-y",
"@salesforce/mcp",
"--orgs",
"DEFAULT_TARGET_ORG",
"--toolsets",
"all"
],
"env": null
},
"settings": {}
}
},
- Dominant language
- No language data
- Stars
- 1
- Forks
- 1
- PR merge metrics
- No merged PRs in 30d
Getting set up
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from forcedotcom/mcp
-
Difficulty 4/5 3-5 days Newbie friendliness 68/100
forcedotcom/mcp#44 ·
-
investigating
Difficulty 4/5 3-5 days Newbie friendliness 35/100
forcedotcom/mcp#43 · 1 comment ·
-
investigating
Difficulty 4/5 3-5 days Newbie friendliness 38/100
forcedotcom/mcp#42 · 1 comment ·
-
investigating
Difficulty 4/5 3-5 days Newbie friendliness 48/100
forcedotcom/mcp#41 · 2 comments ·
-
investigating
Difficulty 3/5 1-2 days Newbie friendliness 35/100
forcedotcom/mcp#35 · 2 comments · 2 reactions ·
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
trezor/trezor-firmware#7997 ·
Maintainers usually reply within 2 days
-
good first issue hacktoberfest
Difficulty 1/5 1-3 hours Newbie friendliness 88/100
elnachto/laya-triage#6 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Maintainers usually reply within 1 day
-
bug ci good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 90/100
happy520ai/unified-ai-system#211 · 4 comments ·
Maintainers usually reply within 1 day