We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/Matthew-Wise/umbraco-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server
index.test.ts•899 B
import { sections } from "@/helpers/umbraco-auth-policies.js";
import { ServerTools } from "../index.js";
import { CurrentUserResponseModel } from "@/umb-management-api/schemas/currentUserResponseModel.js";
describe("server-tool-index", () => {
it("should have no tools when user meets no policies", () => {
const userMock = {
allowedSections: []
} as Partial<CurrentUserResponseModel>;
const tools = ServerTools(userMock as CurrentUserResponseModel);
expect(tools.map(t => t.name)).toMatchSnapshot();
});
it("should have all tools when user has settings access", () => {
const userMock = {
allowedSections: [sections.settings]
} as Partial<CurrentUserResponseModel>;
const tools = ServerTools(userMock as CurrentUserResponseModel);
expect(tools.map(t => t.name)).toMatchSnapshot();
});
});