Repository navigation
fix(mcp): correct tool annotations, unbreak writes, add console tools - #17
Merged
Merged
Conversation
troian
approved these changes
Jul 29, 2026
Three things were wrong with the MCP server, none of them visible from the outside. Annotations were never set, so the MCP spec defaults applied: every tool advertised destructiveHint=true and readOnlyHint=false. All 19 were read-only queries. Clients decide what to auto-approve from those hints, so a balance check looked exactly as dangerous as closing a deployment, and there was no signal left to distinguish the two. The policy now lives at registration -- addQueryTool vs addWriteTool -- so a tool cannot drift from the set it was registered into. --enable-writes could not start at all. The command installs no tx flags, so the sign mode was never set and building the write client failed with 'invalid sign mode ""'. The write half of the server had therefore never run. Default it to the value the flag would have supplied. The Console rail had no tools. A managed context reaches deployments, wallet, providers and pricing through the Console API rather than a chain node, so an assistant working against one had nothing to call. Adds eight read tools and two write tools, registered only when a key resolves -- otherwise every call would fail on auth. Verified against the live Console API: the tools register, and console_wallet_balance and console_list_deployments return real data through tools/call. Signed-off-by: Joseph Chalabi <chalabi.joseph@gmail.com>
chalabi2
force-pushed
the
chalabi/mcp-spec-console
branch
from
July 29, 2026 16:49
637cac5 to
a37b36c
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Three things were wrong with the MCP server, none visible from the outside.
1. Every tool was advertised as destructive
Annotations were never set anywhere in
internal/mcp, so the MCP spec defaults applied —destructiveHint=true,readOnlyHint=false. All 19 tools were read-only queries:Clients decide what to auto-approve from those hints, so a balance check looked exactly as dangerous as closing a deployment — and there was no signal left to distinguish the two. The policy now lives at registration (
addQueryToolvsaddWriteTool), so a tool can't drift from the set it was registered into.2.
--enable-writescould not start at allThe command installs no tx flags, so
SignModeStrwas never set and the write client failed to build. The write half of the server had never run. Now defaults to what the flag would have supplied.3. The Console rail had no tools
A managed (
console-api) context reaches deployments, wallet, providers and pricing through the Console API rather than a chain node — so an assistant working against one had nothing to call. Adds 8 read tools and 2 write tools, registered only when a key resolves.Verification
tools/list— confirmed it fails without the sign-mode fix (invalid sign mode "")console_wallet_balance/console_list_deploymentsreturn real data throughtools/call