INNER CODE UNIT · TypeScript

isAllowed

google/clasp · src/mcp/server.ts:43

  const isAllowed = allowedBases.some(base => resolved === base || isInside(base, resolved));
  if (!isAllowed) {
    return (
      `Security Error: projectDir must be within the user home directory or ` +
      `current working directory. Resolved path "${resolved}" is not permitted.`
    );
  }
  return null;
}

/**
 * Builds and configures an MCP (Model Context Protocol) server with tools
 * for interacting with Google Apps Script projects via clasp functionalities.
 *
 * The server exposes tools such as:
 * - `push_files`: Pushes local project files to the remote Apps Script project.
 * - `pull_files`: Pulls remote Apps Script project files to the local filesystem.
 * - `create_project`: Creates a new Apps Script project.

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…