Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

MCP error -32602: Invalid arguments for tool sf-get-username in Zed IDE

Open
#3 7 comments 0 reactions 0 assignees View on GitHub

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

bug

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/salesforce

Agent

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 usernameOrAlias parameter 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

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from forcedotcom/mcp

All issues in forcedotcom/mcp

Similar issues

More DevTools issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.