Skip to content

CLI: connection pause/unpause should accept connection name or ID #276

@leggetter

Description

@leggetter

Summary

hookdeck connection pause and hookdeck connection unpause (and the equivalent hookdeck gateway connection … commands) currently take a positional argument documented as connection ID only. Users who work from hookdeck connection list often have the name handy; connection get already accepts name or ID via resolveConnectionID in pkg/cmd/connection_get.go, but pause/unpause pass the argument straight to the API.

Expected behavior

  • Accept the same name-or-ID resolution as connection get: try ID (including conn_ / web_ prefix path), then list/filter by name; surface the existing ambiguous-name error when multiple connections share a name.

Suggested implementation

  • Reuse resolveConnectionID before PauseConnection / UnpauseConnection in pkg/cmd/connection_pause.go and pkg/cmd/connection_unpause.go.
  • Update Use, Long, and cli.arguments annotations to say name or ID (mirror connection_get.go).
  • MCP: hookdeck_connections pause/unpause currently require an id field; extend tool handling (and tools.go / tool_help.go descriptions) so agents can pass a connection name as well—same resolution as the CLI.

References

  • resolveConnectionID: pkg/cmd/connection_get.go (approx. lines 180–211)
  • Pause: pkg/cmd/connection_pause.go
  • Unpause: pkg/cmd/connection_unpause.go
  • MCP: pkg/gateway/mcp/tool_connections.go (connectionsPause / connectionsUnpause)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions