Skip to content

[Bug]: Long input names in tool creation reflected back to user in error message #598

@madhav165

Description

@madhav165

🐞 Bug Summary

Long input names in tool creation reflected back to user in error message


🧩 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

  1. Run the following
curl -X POST http://localhost:4444/tools -H "Authorization: Bearer $MCPGATEWAY_BEARER_TOKEN" -H "Content-Type: application/json" -d '{"name": "'"$(printf 'a%.0s' {1..300})"'", "url": "https://example.com"}'
  1. Error returns input

🤔 Expected Behavior

Error response should not return input back to user.


Metadata

Metadata

Assignees

Labels

bugSomething isn't workingsecurityImproves securitytriageIssues / Features awaiting triage

Type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions