Skip to content
This repository was archived by the owner on Feb 17, 2026. It is now read-only.

Escape double quotes inside compiled code description strings#63

Merged
evilsocket merged 1 commit intoevilsocket:mainfrom
wouterken:fix/escape_double_quotes_in_compiled_tool_descriptions
Jun 30, 2025
Merged

Escape double quotes inside compiled code description strings#63
evilsocket merged 1 commit intoevilsocket:mainfrom
wouterken:fix/escape_double_quotes_in_compiled_tool_descriptions

Conversation

@wouterken
Copy link
Contributor

Currently, tools which report a double quote in the description field, will cause an error inside nerve, within the compiled mcp code.

This patch does a naive escape of backslashes and double-quotes to fix this use-case.

Other cases of syntax errors due to improper escaping of interpolated code are likely possible.

@evilsocket
Copy link
Owner

good catch, thanks! will replace with a json.dumps(s).strip('"')

@evilsocket evilsocket merged commit 48aa2ca into evilsocket:main Jun 30, 2025
3 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants