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

Function validateInput

src/tools/WebFetchTool/WebFetchTool.ts:258–271  ·  view source on GitHub ↗
(input)

Source from the content-addressed store, hash-verified

256${DESCRIPTION}`
257 },
258 async validateInput(input) {
259 const { url } = input
260 try {
261 new URL(url)
262 } catch {
263 return {
264 result: false,
265 message: `Error: Invalid URL "${url}". The URL provided could not be parsed.`,
266 meta: { reason: 'invalid_url' },
267 errorCode: 1,
268 }
269 }
270 return { result: true }
271 },
272 renderToolUseMessage,
273 renderToolUseProgressMessage,
274 renderToolResultMessage,

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected