Skip to content

[Bug]: Tool name update silently fails #1485

@gabe-l-hart

Description

@gabe-l-hart

🐞 Bug Summary

A call to PUT on /tools/{tool_id} that changes the name field does not update the name and also doesn't return an error.


🧩 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

import requests

# Log into CF
print("--> LOGGING IN")
res = requests.post("http://localhost:4444/auth/login", json={"email": "admin@example.com", "password": "changeme"})
token = res.json()["access_token"]
headers = {"Authorization": f"Bearer {token}"}

# Create a new tool
print("--> REGISTERING MCP SERVER")
res = requests.post("http://localhost:4444/tools", headers=headers, json={"tool": {"name": "foo", "url": "http://foobar.com"}})
print(res.text)
res.raise_for_status()
tool_id = res.json()["id"]

# Update the name
res = requests.put(f"http://localhost:4444/tools/{tool_id}", headers=headers, json={"name": "foobar"})
print(res.text)
res.raise_for_status()

# Fetch and check name
res = requests.get(f"http://localhost:4444/tools/{tool_id}", headers=headers)
assert res.json()["name"] == "foobar" # <-- this will fail

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingtriageIssues / Features awaiting triage

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions