libraries
This commit is contained in:
20
mcp-server/tools/libraries/index.js
Normal file
20
mcp-server/tools/libraries/index.js
Normal file
@@ -0,0 +1,20 @@
|
||||
import { canEditCode } from "../helpers/roleCheck.js";
|
||||
import { registerListGlobalLibrariesTool } from "./list_global_libraries.js";
|
||||
import { registerAddGlobalLibraryTool } from "./add_global_library.js";
|
||||
import { registerRemoveGlobalLibraryTool } from "./remove_global_library.js";
|
||||
import { registerSetGlobalLibrariesTool } from "./set_global_libraries.js";
|
||||
|
||||
/**
|
||||
* Tools to manage the project's global libraries (CSS/JS/fonts) that are
|
||||
* injected site-wide via layout.json. The list tool is always exposed (read
|
||||
* only); mutating tools are gated by canEditCode() — same pattern used by
|
||||
* hooks/ and project/ writers.
|
||||
*/
|
||||
export function registerLibrariesTools(server) {
|
||||
registerListGlobalLibrariesTool(server);
|
||||
if (canEditCode()) {
|
||||
registerAddGlobalLibraryTool(server);
|
||||
registerRemoveGlobalLibraryTool(server);
|
||||
registerSetGlobalLibrariesTool(server);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user