-
Notifications
You must be signed in to change notification settings - Fork 615
[BUG][API]: Tool description validation ignores VALIDATION_STRICT env var β blocks MCP server registrationΒ #3711
Copy link
Copy link
Labels
MUSTP1: Non-negotiable, critical requirements without which the product is non-functional or unsafeP1: Non-negotiable, critical requirements without which the product is non-functional or unsafeapiREST API Related itemREST API Related itembugSomething isn't workingSomething isn't working
Milestone
Description
π Bug Summary
Briefly describe the issue or unexpected behavior.
validation is hardcoded and ignores these env vars
- name: VALIDATION_STRICT
value: "false"
- name: JSON_SCHEMA_VALIDATION_STRICT
value: "false"
- name: EXPERIMENTAL_VALIDATE_IO
value: "false"
Version 0.9.0 works smoothly with unsafe characters in description for MCP gateway
Version 1.0.0.Beta2 stops loading up the MCP server tools. Error received:
All 1 tools failed validation. First error: Validation failed for tool 'search': [{'type': 'value_error', 'loc': ('description',), 'msg': "Value error, Description contains unsafe characters: '> '", 'input': 'Search FICO product documentation
After trying to mute a lot of validation toggles, I think we still have this issue that the description validation uses a hardcoded
_HTML_SPECIAL_CHARS_RE pattern that can't be disabled via settings.
π§© Affected Component
Select the area of the project impacted:
-
mcpgateway- API -
mcpgateway- UI (admin panel) -
mcpgateway.wrapper- stdio wrapper - Federation or Transports
- CLI, Makefiles, or shell scripts
- Container setup (Docker/Podman/Compose)
- Other (explain below)
π Steps to Reproduce
- Spin up an MCP server with description including special characters for especially Markdown (** or <>)
- Connect that MCP server to Contextforge
- Will get gateway connection error
π€ Expected Behavior
What should have happened instead?
If we set vars to null those validation checks, the MCP server should pass registration in Contextforge (as it did work in 0.9.0)
Should have a generic skip_validation flag if we dont really need strict validation
π Logs / Error Output
Paste any relevant stack traces or logs here.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
MUSTP1: Non-negotiable, critical requirements without which the product is non-functional or unsafeP1: Non-negotiable, critical requirements without which the product is non-functional or unsafeapiREST API Related itemREST API Related itembugSomething isn't workingSomething isn't working