Skip to main content
Glama

Vertex AI MCP Server

utils.ts662 B
import * as path from 'node:path'; import { WORKSPACE_ROOT } from './config.js'; export const sleep = (ms: number) => new Promise(resolve => setTimeout(resolve, ms)); // Basic path validation export function sanitizePath(inputPath: string): string { const absolutePath = path.resolve(WORKSPACE_ROOT, inputPath); if (!absolutePath.startsWith(WORKSPACE_ROOT)) { throw new Error(`Access denied: Path is outside the workspace: ${inputPath}`); } // Basic check against path traversal if (absolutePath.includes('..')) { throw new Error(`Access denied: Invalid path component '..': ${inputPath}`); } return absolutePath; }

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/shariqriazz/vertex-ai-mcp-server'

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