Skip to content

json.decoder.JSONDecodeError: Invalid \escape: line 2 column 17 (char 17) #1161

@1066196847

Description

@1066196847

Bug Description

run_mcp.py: McpRunner() -> initialize() -> self.agent.initialize() The command parameter passed here is a Python path with slashes, which is later used in tool/mcp.py in the _initialize_and_list_tools function as tool_name. When the large model parses the tool, the slashes cause a JSON parsing error.

bug content:
vllm/entrypoints/openai/tool_parsers/hermes_tool_parser.py", line 88, in extract_tool_calls
[hermes_tool_parser.py:110] json.decoder.JSONDecodeError: Invalid \escape: line 2 column 17 (char 17)

Bug solved method

tool/mcp.py -> initialize_and_list_tools() -> tool_name = f"mcp{server_id}_{original_name}" change to tool_name = f"{original_name}"

Environment information

  • System version: windows
  • Python version: 3.12
  • OpenManus version or branch: main
  • Installation method (e.g., pip install -r requirements.txt or pip install -e .):

Extra information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinginactive

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions