Skip to content

Properly escape tool description to avoid malformed 'Markup' object #408

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 6, 2025

Conversation

daxian-dbw
Copy link
Member

PR Summary

Tool description may contain characters like "[]", which will result in malformed Markup object because the square brackets characters have special meaning in markup language.

The set_config_value tool from the MCP server desktop-commander is an example of this bug -- it has "empty array ([])" in its description.

The fix is to escape tool description to avoid malformed 'Markup' object.

@daxian-dbw daxian-dbw merged commit 4242593 into PowerShell:main Aug 6, 2025
4 checks passed
@daxian-dbw daxian-dbw deleted the bug branch August 6, 2025 18:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants