Sitelet https://github.com/hookdeck/hookdeck-cli/pull/348/commits/29145267c91dd0a1685939ee4e1576c83fdc8595
Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
76 commits
Select commit Hold shift + click to select a range
2d8f9d9
feat(outpost): add Outpost API client, schema cache and live tests
leggetter Aug 14, 2026
85ba39c
feat(outpost): add outpost command group and tenant commands
leggetter Aug 14, 2026
a38bfe8
feat(outpost): add destination commands
leggetter Aug 14, 2026
9fce42b
feat(outpost): add destination-type commands and per-type dynamic help
leggetter Aug 14, 2026
ea4ee42
feat(outpost): support dotted paths in --config and --credential
leggetter Aug 14, 2026
000cd7f
feat(outpost): add event, attempt, publish, topic, metrics, config an…
leggetter Aug 14, 2026
c235fd5
test(outpost): add acceptance suite and CI slice
leggetter Aug 14, 2026
1303023
docs(outpost): add REFERENCE.md and README sections
leggetter Aug 14, 2026
640b00f
test(outpost): cover event get, attempt get, tenant token and retry
leggetter Aug 14, 2026
b09cda9
Update package.json version to 2.6.0-beta.1
github-actions[bot] Aug 14, 2026
9445c8a
refactor(mcp): extract product-agnostic MCP server into pkg/mcpcore
leggetter Aug 14, 2026
536935d
feat(outpost): add an MCP server for AI agent access
leggetter Aug 14, 2026
2914526
refactor(mcp): keep login and projects on the hookdeck_ prefix in eve…
leggetter Aug 14, 2026
bf22092
Merge remote-tracking branch 'origin/main' into integrate/outpost-mcp
leggetter Aug 14, 2026
2b4ec87
Merge remote-tracking branch 'origin/main' into feat/outpost-api-client
leggetter Aug 14, 2026
e7cf41a
fix(mcp): resolve project names, and scope the publish credential
leggetter Aug 14, 2026
eb6ca42
docs: regenerate REFERENCE.md for the publish-api-key rename
leggetter Aug 14, 2026
1868d69
fix(outpost): stop publish silently going to the wrong project
leggetter Aug 14, 2026
3b48ac6
test(outpost): update MCP acceptance test for the platform tool prefix
leggetter Aug 17, 2026
f1e1923
Merge remote-tracking branch 'origin/integrate/outpost-mcp' into feat…
leggetter Aug 17, 2026
da683e3
Update package.json version to 2.6.0-beta.2
github-actions[bot] Aug 17, 2026
f16f1a0
refactor(mcp): lift the write-gating machinery into mcpcore
leggetter Aug 19, 2026
29ee04d
feat(gateway mcp): add write mode behind --allow-write, rename tools …
leggetter Aug 19, 2026
3a2b4a5
test(gateway mcp): cover the write-mode gate, and document it
leggetter Aug 19, 2026
0317f11
test(outpost): prove every MCP action with a successful call
leggetter Aug 19, 2026
ff7e3b2
feat(outpost): add --metadata to destination create and update
leggetter Aug 19, 2026
c065c77
fix(outpost): make API errors readable, and cover the portal and cust…
leggetter Aug 19, 2026
d2d0b91
ci(outpost): run the live smoke test nightly instead of never
leggetter Aug 19, 2026
db63434
fix(outpost): break the project-switch loop on the first-run path
leggetter Aug 19, 2026
0506c0c
test(outpost): keep the custom-domain test from colliding with a para…
leggetter Aug 19, 2026
e536308
fix(gateway mcp): treat transformations run as a read, not a write
leggetter Aug 19, 2026
c18a1d7
test(gateway mcp): call every tool action successfully at least once
leggetter Aug 19, 2026
38e12ee
test(outpost): stop the portal test assuming propagation is stable
leggetter Aug 19, 2026
a965637
Merge Gateway MCP write mode and the gateway_ tool rename into v3.0.0
leggetter Aug 19, 2026
0eb550b
Update package.json version to 3.0.0-pin-pre-tool-shape-review
github-actions[bot] Aug 19, 2026
cd58f8b
ci: pass the CLI key to acceptance runs so project tests stop skipping
leggetter Aug 19, 2026
e0f090d
feat(gateway mcp)!: split events and requests into plural search and …
leggetter Aug 19, 2026
1ef3e21
docs(mcp): document the events/requests plural-singular split
leggetter Aug 19, 2026
eda57f9
revert: restore the package.json version after an accidental release
leggetter Aug 20, 2026
2ca2cdb
feat(gateway): add the missing documented query filters to events and…
leggetter Aug 20, 2026
689d698
fix(mcp): stop numeric filters being dropped when sent as JSON numbers
leggetter Aug 20, 2026
f8c59a5
fix(api): reject identifiers that would retarget a request
leggetter Aug 20, 2026
26ffa5b
fix(cmd): stop --help printing the API key from the environment
leggetter Aug 20, 2026
9cdb193
fix(mcp): stop boolean and numeric filters being dropped when quoted
leggetter Aug 20, 2026
e78bdbf
fix(mcp): name the login tool and publish key that actually exist
leggetter Aug 20, 2026
731d38b
fix(outpost): allow partial destination updates
leggetter Aug 20, 2026
f34a8cd
fix(mcp): send topics when creating an Outpost destination
leggetter Aug 20, 2026
05003ee
fix(mcp): stop a tool offering pause claiming to be a pure read
leggetter Aug 20, 2026
f2de696
fix(mcp): do not sign the user out when a reauth is never completed
leggetter Aug 20, 2026
deabb51
test(listen): capture subprocess output so a failure says why
leggetter Aug 20, 2026
77fb794
test(listen): run a built binary instead of go run
leggetter Aug 20, 2026
f929ff5
refactor(mcp): remove the unused ToolSpec.DefaultAction field
leggetter Aug 20, 2026
68f773a
chore: set the package version to the 3.0.0 line
leggetter Aug 20, 2026
738e61d
docs(search): say that search_term matches a whole value, not a subst…
leggetter Aug 20, 2026
61ca177
fix(outpost): send the schema's declared defaults when creating a des…
leggetter Aug 20, 2026
6c16792
fix(events): report the status the API returned, not the one requested
leggetter Aug 20, 2026
94a4c08
fix(transformations): report a run that failed instead of an empty re…
leggetter Aug 20, 2026
0103488
fix(mcp): hide write-only prose and properties in read-only mode
leggetter Aug 20, 2026
dbd7948
docs(outpost): record why webhook secrets are readable and others are…
leggetter Aug 20, 2026
8176987
docs(filters): stop claiming count filters accept operator syntax
leggetter Aug 20, 2026
0fece55
fix(outpost): refuse to publish to a tenant the credential cannot see
leggetter Aug 20, 2026
dd15126
fix(mcp): reject arguments a tool does not have, and honour "id or name"
leggetter Aug 20, 2026
303996f
feat(mcp): make the plural/singular split recoverable when an agent g…
leggetter Aug 20, 2026
7afc68f
fix(help): stop pointing users at things that cannot help them
leggetter Aug 20, 2026
60c108a
test(events): stop asserting that a no-op reports success
leggetter Aug 20, 2026
f37253d
docs(mcp): say which test fails if a deliberate choice is "fixed"
leggetter Aug 21, 2026
dda6646
fix(mcp): close three read-only leaks found in review
leggetter Aug 21, 2026
14c0cb6
test(acceptance): stop the suite leaking sources and destinations
leggetter Aug 21, 2026
66168a0
fix: report the state the API returned, not the one that was asked for
leggetter Aug 21, 2026
a734bf4
docs: add a manual QA skill with a credential guard
leggetter Aug 21, 2026
ccfb191
fix: reject MCP argument values the tool cannot use
leggetter Aug 21, 2026
411b70c
docs: say that an upsert with no metadata clears it
leggetter Aug 21, 2026
9581891
test(acceptance): run the outpost slice locally and report each slice
leggetter Aug 21, 2026
78f7b7b
fix: stop update commands discarding the values they were given
leggetter Aug 21, 2026
7dae336
fix(mcp): stop write mode reopening the filter-that-does-not-filter hole
leggetter Aug 21, 2026
a81ce5b
fix: report what a request retry actually did, and what a dismiss cha…
leggetter Aug 21, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
refactor(mcp): keep login and projects on the hookdeck_ prefix in eve…
…ry server

Login and project switching are Hookdeck platform operations, not Gateway or
Outpost ones. You log in to Hookdeck; you switch a Hookdeck project. So both
servers now expose hookdeck_login and hookdeck_projects, while product tools
keep their own prefix: outpost_tenants, hookdeck_connections.

Outpost previously named these outpost_login and outpost_projects. The original
reasoning was collision avoidance when both servers are configured in one
client, which does not hold up: it is the same operation, clients namespace by
server, and one consistent name for it is a feature rather than a clash.

Gateway is unchanged, verified over stdio. Outpost is unreleased, so this costs
nothing now and would be a breaking rename later.

Two things this surfaced:

- HelpTopic prepended the product prefix unconditionally, so a platform topic
  became outpost_hookdeck_projects and missed. It now tries the exact tool name
  first, which is what a caller passing a name from tools/list will send.
- A test asserted the Outpost error must not mention hookdeck_login, on the
  grounds that the gateway tool does not exist in that session. That premise is
  now deliberately false. Rewritten to assert the error names a tool the session
  actually registers, which is the property worth holding.

Note this does not address Gateway's own inconsistency: its product tools are
also hookdeck_-prefixed, which needs a rename and a major bump (#352).

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01Wajsob136PyRh6nc92w5L3
  • Loading branch information
leggetter and claude committed Aug 14, 2026
commit 29145267c91dd0a1685939ee4e1576c83fdc8595
108 changes: 54 additions & 54 deletions pkg/login/claimed_cli_key.go
Original file line number Diff line number Diff line change
@@ -1,54 +1,54 @@
package login
import (
"fmt"
"os"
"strings"
"github.com/hookdeck/hookdeck-cli/pkg/ansi"
configpkg "github.com/hookdeck/hookdeck-cli/pkg/config"
"github.com/hookdeck/hookdeck-cli/pkg/validators"
)
// ConfigureFromClaimedCliKey validates a product-issued CLI key (dashboard onboarding, Console
// destination, etc.) and saves the profile. Unlike Login(), this path does not start browser
// device auth or guest sandbox claim—even when the existing profile is a guest Console session.
func ConfigureFromClaimedCliKey(config *configpkg.Config, cli_key string) error {
cli_key = strings.TrimSpace(cli_key)
if cli_key == "" {
return fmt.Errorf("--cli-key is required")
}
if err := validators.APIKey(cli_key); err != nil {
return err
}
config.Profile.APIKey = cli_key
spinner := ansi.StartNewSpinner("Verifying credentials...", os.Stdout)
response, err := config.GetAPIClient().ValidateAPIKey()
if err != nil {
ansi.StopSpinner(spinner, "", os.Stdout)
return err
}
message := SuccessMessage(
response.UserName,
response.UserEmail,
response.OrganizationName,
response.ProjectName,
response.ProjectMode == "console",
)
ansi.StopSpinner(spinner, message, os.Stdout)
config.Profile.ApplyValidateAPIKeyResponse(response, true)
if err := config.Profile.SaveProfile(); err != nil {
return err
}
if err := config.Profile.UseProfile(); err != nil {
return err
}
config.RefreshCachedAPIClient()
return nil
}
package login

import (
"fmt"
"os"
"strings"

"github.com/hookdeck/hookdeck-cli/pkg/ansi"
configpkg "github.com/hookdeck/hookdeck-cli/pkg/config"
"github.com/hookdeck/hookdeck-cli/pkg/validators"
)

// ConfigureFromClaimedCliKey validates a product-issued CLI key (dashboard onboarding, Console
// destination, etc.) and saves the profile. Unlike Login(), this path does not start browser
// device auth or guest sandbox claim—even when the existing profile is a guest Console session.
func ConfigureFromClaimedCliKey(config *configpkg.Config, cli_key string) error {
cli_key = strings.TrimSpace(cli_key)
if cli_key == "" {
return fmt.Errorf("--cli-key is required")
}
if err := validators.APIKey(cli_key); err != nil {
return err
}

config.Profile.APIKey = cli_key

spinner := ansi.StartNewSpinner("Verifying credentials...", os.Stdout)
response, err := config.GetAPIClient().ValidateAPIKey()
if err != nil {
ansi.StopSpinner(spinner, "", os.Stdout)
return err
}

message := SuccessMessage(
response.UserName,
response.UserEmail,
response.OrganizationName,
response.ProjectName,
response.ProjectMode == "console",
)
ansi.StopSpinner(spinner, message, os.Stdout)

config.Profile.ApplyValidateAPIKeyResponse(response, true)

if err := config.Profile.SaveProfile(); err != nil {
return err
}
if err := config.Profile.UseProfile(); err != nil {
return err
}
config.RefreshCachedAPIClient()

return nil
}
8 changes: 6 additions & 2 deletions pkg/mcpcore/help.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,14 @@ import (
// suffix is appended to every topic that resolves — products use it to repeat
// shared documentation such as the JSON response shape.
func HelpTopic(prefix string, topics map[string]string, topic, suffix string) *mcpsdk.CallToolResult {
if prefix != "" && !strings.HasPrefix(topic, prefix) {
// An exact tool name always wins. Platform tools (hookdeck_login,
// hookdeck_projects) do not carry the product prefix, so prepending it
// unconditionally would turn a valid topic into a miss.
text, ok := topics[topic]
if !ok && prefix != "" && !strings.HasPrefix(topic, prefix) {
topic = prefix + topic
text, ok = topics[topic]
}
text, ok := topics[topic]
if ok {
if suffix != "" {
return TextResult(text + "\n\n" + suffix)
Expand Down
30 changes: 28 additions & 2 deletions pkg/mcpcore/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,11 @@ type Options struct {
// without colliding.
ToolPrefix string

// PlatformPrefix namespaces tools that belong to the Hookdeck platform
// rather than to a single product (login, projects). Defaults to
// DefaultPlatformPrefix, which is what every server should use.
PlatformPrefix string

// Client is the API client shared by every tool handler. Handlers mutate it
// in place (e.g. ProjectID on a project switch), so each server must be given
// the client for its own API.
Expand Down Expand Up @@ -146,10 +151,31 @@ func (s *Server) ToolPrefix() string {
}

// LoginToolName returns the name of this server's login tool.
func (s *Server) LoginToolName() string { return s.ToolName("login") }
func (s *Server) LoginToolName() string { return s.platformToolName("login") }

// DefaultPlatformPrefix is the prefix for platform-level tools. You log in to
// Hookdeck and switch Hookdeck projects, whichever product's server you are in.
const DefaultPlatformPrefix = "hookdeck"

// ProjectsToolName returns the name of this server's projects tool.
func (s *Server) ProjectsToolName() string { return s.ToolName("projects") }
func (s *Server) ProjectsToolName() string { return s.platformToolName("projects") }

// platformToolName names a tool that belongs to the Hookdeck platform rather
// than to one product.
//
// Logging in and switching projects are Hookdeck operations, not Gateway or
// Outpost ones, so they keep the platform prefix in every server. Product tools
// (ToolName) take the product's own prefix. Both servers therefore expose the
// same hookdeck_login and hookdeck_projects, which is correct: it is the same
// operation, and a client that has both configured sees one consistent name for
// it.
func (s *Server) platformToolName(resource string) string {
prefix := s.opts.PlatformPrefix
if prefix == "" {
prefix = DefaultPlatformPrefix
}
return prefix + "_" + resource
}

// RequireAuth guards a handler on an unauthenticated session, naming this
// server's login tool.
Expand Down
6 changes: 3 additions & 3 deletions pkg/mcpcore/tool_projects_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -109,12 +109,12 @@ func TestProjectsTool_ToolNamesFollowThePrefix(t *testing.T) {
api := projectsAPI(t)
srv, _ := newProjectsServer(t, api, config.ProjectTypeOutpost)

assert.Equal(t, "outpost_projects", srv.ProjectsToolName())
assert.Equal(t, "outpost_login", srv.LoginToolName())
assert.Equal(t, "hookdeck_projects", srv.ProjectsToolName())
assert.Equal(t, "hookdeck_login", srv.LoginToolName())
assert.Equal(t, "outpost_events", srv.ToolName("events"))
assert.Equal(t, "outpost_", srv.ToolPrefix())

def := srv.ProjectsToolDef("desc")
assert.Equal(t, "outpost_projects", def.Tool.Name)
assert.Equal(t, "hookdeck_projects", def.Tool.Name)
assert.Equal(t, "desc", def.Tool.Description)
}
6 changes: 3 additions & 3 deletions pkg/outpost/mcp/projects_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ func TestProjectsTool_UsesTheAccountAPIAndSwitchesTheOutpostClient(t *testing.T)
session := connect(t, ServerOptions{Client: outpostClient, AccountClient: accountClient})

t.Run("list returns only Outpost projects", func(t *testing.T) {
result := callTool(t, session, "outpost_projects", map[string]any{"action": "list"})
result := callTool(t, session, "hookdeck_projects", map[string]any{"action": "list"})
require.False(t, result.IsError, resultText(t, result))
text := resultText(t, result)
assert.Contains(t, text, "outpost-project")
Expand All @@ -61,7 +61,7 @@ func TestProjectsTool_UsesTheAccountAPIAndSwitchesTheOutpostClient(t *testing.T)
})

t.Run("use switches the Outpost client, not just the account one", func(t *testing.T) {
result := callTool(t, session, "outpost_projects", map[string]any{
result := callTool(t, session, "hookdeck_projects", map[string]any{
"action": "use",
"project_id": "proj_other",
})
Expand All @@ -73,7 +73,7 @@ func TestProjectsTool_UsesTheAccountAPIAndSwitchesTheOutpostClient(t *testing.T)
})

t.Run("use refuses a Gateway project", func(t *testing.T) {
result := callTool(t, session, "outpost_projects", map[string]any{
result := callTool(t, session, "hookdeck_projects", map[string]any{
"action": "use",
"project_id": "proj_gateway",
})
Expand Down
10 changes: 5 additions & 5 deletions pkg/outpost/mcp/tool_help.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ Successful tool calls that return JSON share one envelope. Parse the tool result
unresolved. "active_project_org" (string) is included when known; omitted when empty.
If no project id is set, "meta" is {}.

Plain text (not this shape): outpost_help text, outpost_login prompts, and error messages.
Plain text (not this shape): outpost_help text, hookdeck_login prompts, and error messages.
Errors use the host error flag; bodies are plain text, not JSON envelopes.`

// formatCurrentProject builds a display label from org + short name, and
Expand Down Expand Up @@ -107,7 +107,7 @@ Current project: %s

%s

All tools operate on the active project, which must be an Outpost project. Call outpost_projects
All tools operate on the active project, which must be an Outpost project. Call hookdeck_projects
first when the user references a project by name, or when unsure which project is active.

%s
Expand Down Expand Up @@ -171,7 +171,7 @@ func toolSummaryLines(srv *mcpcore.Server, opts ServerOptions) []string {
// never documents an action this session cannot perform.
func toolHelp(srv *mcpcore.Server) map[string]string {
topics := map[string]string{
srv.ProjectsToolName(): `outpost_projects — List or switch the active project
srv.ProjectsToolName(): `hookdeck_projects — List or switch the active project

Always call this first when the user references a specific project by name. Every other tool is
scoped to the active project. Only Outpost projects are listed and only an Outpost project can be
Expand All @@ -185,7 +185,7 @@ Parameters:
action (string, required) — "list" or "use"
project_id (string) — Required for "use"`,

srv.LoginToolName(): `outpost_login — Browser sign-in for the Hookdeck CLI inside MCP
srv.LoginToolName(): `hookdeck_login — Browser sign-in for the Hookdeck CLI inside MCP

Without arguments when already authenticated: confirms the session is active.
When not authenticated: returns a URL the user opens in a browser; poll by calling this tool again.
Expand All @@ -194,7 +194,7 @@ Note: signing in here does not supply a Project API key, which outpost_publish n

Parameters:
reauth (boolean) — If true, clears stored credentials and starts a new browser login. Use when
outpost_projects list fails and the key may be a single-project or dashboard
hookdeck_projects list fails and the key may be a single-project or dashboard
API key that cannot list projects.`,

helpToolName: `outpost_help — Overview of the Outpost tools, or detailed help for one
Expand Down
4 changes: 2 additions & 2 deletions pkg/outpost/mcp/tools.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ const (
helpToolName = toolPrefix + "_help"
helpTopicPrefix = toolPrefix + "_"

loginToolDesc = "Authenticate the Hookdeck CLI or sign in again. Without arguments, returns a URL for browser login when not yet authenticated, or confirms if already signed in. Set reauth: true to clear the current session and start a new browser login (use when outpost_projects list fails and the stored key may be a single-project or dashboard API key)."
projectsToolDesc = "Always call this first when the user references a specific project by name. List available Outpost projects to find the matching project ID, then use the `use` action to switch to it before calling any other tools. Every other tool is scoped to the active project — if the wrong project is active, all results will be wrong. Only Outpost projects are listed: this server has no access to Event Gateway projects. If list or use fails (especially 401/403), the error may suggest outpost_login with reauth: true. JSON successes use a standard data/meta envelope; see outpost_help."
loginToolDesc = "Authenticate the Hookdeck CLI or sign in again. Without arguments, returns a URL for browser login when not yet authenticated, or confirms if already signed in. Set reauth: true to clear the current session and start a new browser login (use when hookdeck_projects list fails and the stored key may be a single-project or dashboard API key)."
projectsToolDesc = "Always call this first when the user references a specific project by name. List available Outpost projects to find the matching project ID, then use the `use` action to switch to it before calling any other tools. Every other tool is scoped to the active project — if the wrong project is active, all results will be wrong. Only Outpost projects are listed: this server has no access to Event Gateway projects. If list or use fails (especially 401/403), the error may suggest hookdeck_login with reauth: true. JSON successes use a standard data/meta envelope; see outpost_help."
)

// ServerOptions configure the Outpost MCP server.
Expand Down
28 changes: 21 additions & 7 deletions pkg/outpost/mcp/tools_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ func TestListTools_ReadOnlyMode(t *testing.T) {

t.Run("registers every read tool", func(t *testing.T) {
for _, name := range []string{
"outpost_projects", "outpost_login", "outpost_help",
"hookdeck_projects", "hookdeck_login", "outpost_help",
"outpost_tenants", "outpost_destinations", "outpost_events",
"outpost_attempts", "outpost_topics", "outpost_destination_types",
"outpost_metrics", "outpost_config", "outpost_status",
Expand Down Expand Up @@ -291,19 +291,33 @@ func TestUnknownAction(t *testing.T) {
// Authentication
// ---------------------------------------------------------------------------

func TestUnauthenticated_PointsAtTheOutpostLoginTool(t *testing.T) {
// TestUnauthenticated_PointsAtALoginToolThatExists guards the platform/product
// prefix split: login is a Hookdeck operation, not an Outpost one, so it keeps
// the platform prefix here and in the Gateway server. An unauthenticated tool
// must name a tool this session actually registers.
func TestUnauthenticated_PointsAtALoginToolThatExists(t *testing.T) {
api := mockAPI(t, nil)
client := newTestClient(t, api.URL)
client.APIKey = ""
session := connect(t, ServerOptions{Client: client})

for _, name := range []string{"outpost_tenants", "outpost_events", "outpost_status", "outpost_projects"} {
registered := map[string]bool{}
for name := range listTools(t, session) {
registered[name] = true
}
require.True(t, registered["hookdeck_login"], "login is platform-level, so it is hookdeck_login in every server")
require.False(t, registered["outpost_login"], "the product prefix must not be used for a platform tool")

for _, name := range []string{"outpost_tenants", "outpost_events", "outpost_status", "hookdeck_projects"} {
t.Run(name, func(t *testing.T) {
result := callTool(t, session, name, map[string]any{"action": "list"})
require.True(t, result.IsError)

text := resultText(t, result)
assert.Contains(t, text, "outpost_login")
assert.NotContains(t, text, "hookdeck_login", "the gateway tool does not exist in this session")
assert.Contains(t, text, "hookdeck_login")
// Naming a tool the session does not expose would send an agent
// chasing something that cannot be called.
assert.True(t, registered["hookdeck_login"])
})
}
}
Expand Down Expand Up @@ -677,8 +691,8 @@ func TestServerIdentity(t *testing.T) {

// The Outpost server must only ever serve Outpost projects.
assert.Equal(t, config.ProjectTypeOutpost, srv.ProjectFilter())
assert.Equal(t, "outpost_projects", srv.ProjectsToolName())
assert.Equal(t, "outpost_login", srv.LoginToolName())
assert.Equal(t, "hookdeck_projects", srv.ProjectsToolName())
assert.Equal(t, "hookdeck_login", srv.LoginToolName())

var _ *mcpcore.Server = srv
}