Skip to content

Tools override are not returned from the GET of the workload #2385

@samuv

Description

@samuv

Bug description

When editing a workload via POST with a tools_override parameter, the override is successfully applied and functional, but the GET endpoint for the workload always returns null for the tools_override field instead of returning the configured override values.

Steps to reproduce

  1. Make a POST request to edit a workload with tools_override populated:
curl 'http://localhost:50088/api/v1beta/workloads/fetch-2/edit' \
  --data-raw '{"image":"ghcr.io/stackloklabs/gofetch/server:1.0.1","transport":"streamable-http","group":"default","target_port":25900,"cmd_arguments":[],"env_vars":{"FASTMCP_PORT":"25900","MCP_PORT":"25900","MCP_TRANSPORT":"streamable-http"},"secrets":[],"network_isolation":false,"volumes":[],"tools_override":{"fetch":{"name":"fetch_custom"}}}'
  1. Verify the request returns 200 OK
  2. Confirm the override is applied by using the playground and retrieving the tools list (the override should be visible there)
  3. Make a GET request to retrieve the workload configuration:
curl 'http://localhost:50088/api/v1beta/workloads/fetch-2'
  1. Observe the tools_override field in the response

Expected behavior

The GET endpoint should return the tools_override configuration that was set during the POST request:

{
  "tools_override": {
    "fetch": {
      "name": "fetch_custom"
    }
  }
}

Actual behavior

The GET endpoint returns "tools_override": null:

{
    "image": "ghcr.io/stackloklabs/gofetch/server:1.0.1",
    "host": "127.0.0.1",
    ...
    "tools": null,
    "tools_override": null,
    "group": "default",
    ...
}

Even though the override is actually applied and functioning (confirmed via playground tools list).

Environment (if relevant)

  • Endpoint: /api/v1beta/workloads/{workload_id}
  • OS/version: macOS Tahoe Version 26.0.1
  • ToolHive version: v0.5.0

Additional context

The tools override is clearly being stored and applied correctly (evidenced by its appearance in the playground tools list), but the GET endpoint is not serializing/returning this field properly. This appears to be a serialization or response mapping issue in the GET endpoint rather than a storage problem.

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    apiItems related to the APIbugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions