fix: allow backticks in tool descriptions for Markdown formatting#2615
Merged
crivetimihai merged 1 commit intoIBM:mainfrom Jan 31, 2026
Merged
Conversation
278f00b to
80c8859
Compare
Member
|
Thanks @jonathan-fulton! Good fix. I verified that tool descriptions are never passed to shell execution, and the remaining forbidden patterns ( |
Backticks are commonly used in tool descriptions for:
- Inline code examples: `{app="foo"}`
- JSON examples: `{"streams": 5}`
- Parameter references: `labelName`
This is standard Markdown/documentation formatting and poses no security risk.
The remaining forbidden patterns still protect against command injection.
Fixes IBM#2576
Signed-off-by: Jonathan Fulton <jonathan@jonathanfulton.com>
80c8859 to
5ced8a4
Compare
crivetimihai
approved these changes
Jan 31, 2026
|
Thank you @jonathan-fulton for the fix. Many thanks! |
hughhennelly
pushed a commit
to hughhennelly/mcp-context-forge
that referenced
this pull request
Feb 8, 2026
…M#2615) Backticks are commonly used in tool descriptions for: - Inline code examples: `{app="foo"}` - JSON examples: `{"streams": 5}` - Parameter references: `labelName` This is standard Markdown/documentation formatting and poses no security risk. The remaining forbidden patterns still protect against command injection. Fixes IBM#2576 Signed-off-by: Jonathan Fulton <jonathan@jonathanfulton.com> Signed-off-by: hughhennnelly <hughhennelly06@gmail.com>
kcostell06
pushed a commit
to kcostell06/mcp-context-forge
that referenced
this pull request
Feb 24, 2026
…M#2615) Backticks are commonly used in tool descriptions for: - Inline code examples: `{app="foo"}` - JSON examples: `{"streams": 5}` - Parameter references: `labelName` This is standard Markdown/documentation formatting and poses no security risk. The remaining forbidden patterns still protect against command injection. Fixes IBM#2576 Signed-off-by: Jonathan Fulton <jonathan@jonathanfulton.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Removes backtick from the forbidden patterns in tool description validation. Backticks are commonly used in Markdown for inline code examples and pose no security risk in descriptions.
Problem
The gateway rejects tools with backticks in their descriptions (Issue #2576), blocking legitimate tools like Grafana's Loki query tools that use standard Markdown formatting:
{app="foo"}{"streams": 5}labelNameSolution
Allow backticks in descriptions while maintaining other security patterns that prevent command injection (
&&,;,||,$(, etc.).Testing
The existing validation tests still pass, and tools with Markdown-formatted descriptions can now be registered.
Fixes #2576