Shorten the MCP gateway tool names to seal_use and seal_use_write

This commit is contained in:
gitea committed 2026-09-30 16:23:07 +08:00
1 parent 2a5fb3d9c4
commit 7bd8adfea4
4 files changed
+14 -14

No files matched your search

+3 -3
View File
@@ -31,15 +31,15 @@ export type SealCapability = (typeof sealCapabilities)[number];
* Registry naming boundary: these entries are INTERNAL domain capability handlers, NOT MCP tools.
* The camelCase `sealXxx` strings are identifiers for internal dispatch (`runCapability`) and for
* the MCP gateway allow-lists below — the MCP server itself only ever exposes the
* `seal_use_mcp` / `seal_use_mcp_write` gateway pair and never these names. CLI verbs such as
* `seal_use` / `seal_use_write` gateway pair and never these names. CLI verbs such as
* `seal-use context` are the only human-facing names (see README "One registry, two doors").
*
* MCP read/write classification for the capability registry.
*
* The two sets are exhaustive by construction: `capabilities.test.ts` asserts they partition `sealCapabilities`
* exactly, so a newly added capability fails the suite until it is classified here. The read-only MCP tool
* (`seal_use_mcp`) may only invoke names in {@link SEAL_READ_ONLY_CAPABILITIES}; everything else is reachable
* solely through `seal_use_mcp_write`.
* (`seal_use`) may only invoke names in {@link SEAL_READ_ONLY_CAPABILITIES}; everything else is reachable
* solely through `seal_use_write`.
*
* Read-only means it reads tenant state, or writes only a local file. Anything that creates, updates,
* deletes, publishes, pushes, replays, uploads, activates or mints a credential counts as mutating —
+4 -4
View File
@@ -14,8 +14,8 @@ const serverEntryFile = fileURLToPath(import.meta.url);
// no packaged bundle anymore, so two levels up is always the app root.
const pluginRoot = dirname(dirname(serverEntryFile));
export const SEAL_USE_MCP_TOOL_NAME = "seal_use_mcp";
export const SEAL_USE_MCP_WRITE_TOOL_NAME = "seal_use_mcp_write";
export const SEAL_USE_MCP_TOOL_NAME = "seal_use";
export const SEAL_USE_MCP_WRITE_TOOL_NAME = "seal_use_write";
export const SEAL_MCP_ENABLED_ENV = "SEAL_USE_MCP_ENABLED";
export const LEGACY_SEAL_MCP_ENABLED_ENV = "SEAL_HOME_MCP_ENABLED";
@@ -35,7 +35,7 @@ export function createServer(options: { enableCli?: boolean } = {}): McpServer {
},
{
// Declared explicitly so that `tools/list` answers with an empty list (rather than a
// method-not-found error) when seal_use_mcp is switched off by configuration.
// method-not-found error) when seal_use is switched off by configuration.
capabilities: { tools: {} }
}
);
@@ -161,7 +161,7 @@ export function startServer(): StdioServerHandle {
console.error(
enableCli
? "seal-use MCP server running on stdio"
: "seal-use MCP server connected with seal_use_mcp disabled by configuration"
: "seal-use MCP server connected with seal_use disabled by configuration"
);
return handle;
}