feat(mcp): say what this deployment is on its own handshake #863

Merged
coilyco-ops merged 1 commit from aos/claude/bk79-own-instructions into main 2026-08-16 06:42:26 +00:00
Member

Refs #647. The producing side of the same gap #862 opened the consuming side of.

The gap

Echo serves its own turn as an MCP tool and published no Instructions. A client holding several servers sees a tool called turn sitting beside data lookups, with nothing saying it is an agent rather than a lookup.

Built from the definition, not fixed

Echo and Deep are one binary with different definitions, so a constant would publish the same sentence for both and distinguish nothing - which is exactly the failure I found in mcp-beaver while checking this. A test asserts the two differ.

It names the things a client gets wrong otherwise: it answers in prose rather than records, it may decline, and it is not a passthrough to the underlying model.

One thing I checked rather than assumed

The options pointer was nil and is now &mcp.ServerOptions{Instructions: ...}. NewServer dereferences a nil pointer into a zero-value ServerOptions, so setting only Instructions leaves capabilities and every other field exactly as before. Verified in the SDK source, because mcp-beaver carries a comment about nil-versus-empty options changing the advertised capabilities and I did not want to trip the same wire.

Verification

just gate PASS on all six steps. Four tests: the deployment is named, two deployments differ, an empty identity still yields a whole sentence, and the text stays short enough to be carried on every turn by a consumer that inlines it.

Refs #647. The producing side of the same gap #862 opened the consuming side of. ## The gap Echo serves its own turn as an MCP tool and published **no** `Instructions`. A client holding several servers sees a tool called `turn` sitting beside data lookups, with nothing saying it is an agent rather than a lookup. ## Built from the definition, not fixed Echo and Deep are one binary with different definitions, so a constant would publish the same sentence for both and distinguish nothing - which is exactly the failure I found in mcp-beaver while checking this. A test asserts the two differ. It names the things a client gets wrong otherwise: it answers in prose rather than records, it may decline, and it is **not** a passthrough to the underlying model. ## One thing I checked rather than assumed The options pointer was `nil` and is now `&mcp.ServerOptions{Instructions: ...}`. `NewServer` dereferences a nil pointer into a zero-value `ServerOptions`, so setting only `Instructions` leaves capabilities and every other field exactly as before. Verified in the SDK source, because mcp-beaver carries a comment about nil-versus-empty options changing the advertised capabilities and I did not want to trip the same wire. ## Verification `just gate` PASS on all six steps. Four tests: the deployment is named, two deployments differ, an empty identity still yields a whole sentence, and the text stays short enough to be carried on every turn by a consumer that inlines it.
feat(mcp): say what this deployment is on its own handshake
All checks were successful
ci / image-build (pull_request) Successful in 25s
ci / test (pull_request) Successful in 49s
ci / publish-echo-image (pull_request) Has been skipped
ci / publish-observed (pull_request) Has been skipped
c5d9bb8217
Echo serves its own turn as an MCP tool and told a client nothing about
what it is. A client holding several servers sees a tool called "turn"
beside data lookups, with no way to tell an agent from a data source.

The text is built from the definition rather than fixed, because Echo and
Deep are one binary with different definitions and a constant would say
the same thing for both. A test asserts the two differ, which is the
whole point of publishing it.

It says the parts a client gets wrong otherwise: it answers in prose
rather than records, it may decline, and it is not a passthrough to the
underlying model.

Only Instructions is set on the options. A nil options pointer is
dereferenced into a zero value by the SDK, so this changes nothing else
about the server, which I checked rather than assumed.

`just gate` PASS on all six steps.

Refs #647

Co-authored-by: Kai Siren <coilysiren@gmail.com>
Co-authored-by: Claude <noreply@anthropic.com>
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
coilyco-gaming/sirens-echo!863
No description provided.