MCPcopy Create free account
hub / github.com/Noumena-Network/code / isPreapprovedUrl

Function isPreapprovedUrl

src/tools/WebFetchTool/utils.ts:133–140  ·  view source on GitHub ↗
(url: string)

Source from the content-addressed store, hash-verified

131export const MAX_MARKDOWN_LENGTH = 100_000
132
133export function isPreapprovedUrl(url: string): boolean {
134 try {
135 const parsedUrl = new URL(url)
136 return isPreapprovedHost(parsedUrl.hostname, parsedUrl.pathname)
137 } catch {
138 return false
139 }
140}
141
142export function validateURL(url: string): boolean {
143 if (url.length > MAX_URL_LENGTH) {

Callers 1

callFunction · 0.85

Calls 1

isPreapprovedHostFunction · 0.85

Tested by

no test coverage detected