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

Function validateInput

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

Source from the content-addressed store, hash-verified

189${DESCRIPTION}`
190 },
191 async validateInput(input) {
192 const { url } = input
193 try {
194 new URL(url)
195 } catch {
196 return {
197 result: false,
198 message: `Error: Invalid URL "${url}". The URL provided could not be parsed.`,
199 meta: { reason: 'invalid_url' },
200 errorCode: 1,
201 }
202 }
203 return { result: true }
204 },
205 renderToolUseMessage,
206 renderToolUseProgressMessage,
207 renderToolResultMessage,

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected