Skip to main content
Glama

Google Workspace MCP Server

scopes.test.ts1.46 kB
import { scopeRegistry } from '../../../modules/tools/scope-registry.js'; import { DRIVE_SCOPES, registerDriveScopes, validateDriveScopes } from '../scopes.js'; describe('Drive Scopes', () => { beforeEach(() => { // Clear any existing scopes jest.clearAllMocks(); }); describe('registerDriveScopes', () => { it('should register all drive scopes', () => { registerDriveScopes(); const registeredScopes = scopeRegistry.getAllScopes(); expect(registeredScopes).toContain(DRIVE_SCOPES.FULL); expect(registeredScopes).toContain(DRIVE_SCOPES.READONLY); expect(registeredScopes).toContain(DRIVE_SCOPES.FILE); expect(registeredScopes).toContain(DRIVE_SCOPES.METADATA); expect(registeredScopes).toContain(DRIVE_SCOPES.APPDATA); }); }); describe('validateDriveScopes', () => { it('should return true for valid scopes', () => { const validScopes = [ DRIVE_SCOPES.FULL, DRIVE_SCOPES.READONLY, DRIVE_SCOPES.FILE ]; expect(validateDriveScopes(validScopes)).toBe(true); }); it('should return false for invalid scopes', () => { const invalidScopes = [ DRIVE_SCOPES.FULL, 'invalid.scope', DRIVE_SCOPES.FILE ]; expect(validateDriveScopes(invalidScopes)).toBe(false); }); it('should return true for empty scope array', () => { expect(validateDriveScopes([])).toBe(true); }); }); });

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/aaronsb/google-workspace-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server