spacehub

surshar / claude-code

Claude Code is an agentic coding tool that lives in your terminal, understands your codebase, and helps you code faster by executing routine tasks, explaining complex code, and handling git workflows - all through natural language commands.

Built by Anthropic · github.com/anthropics

claude-code / mods / sec-default / hooks / policy / managed-tools-restored / is-org-tool / tool-prefix-of / tool-prefix-of.ts
GitHub Actions (publish-mods)chore: Update mods/ 3deb873 · 15 days ago History
13 lines · 496 BRaw
1import { foldedName } from './folded-name'
2
3/**
4 * What the folded name of every tool under an MCP server, or of a plugin's
5 * own registered tools, begins with: `mcp_<folded name>_`.
6 *
7 * Compared fold to fold (foldedName), never as written: a name in another
8 * case, or with other separators, is the same server to a model.
9 *
10 * @param name a server's name, or a registering plugin's
11 * @returns the folded prefix
12 */
13export const toolPrefixOf = (name: string) => `mcp_${foldedName(name)}_`