MCPcopy Create free account
hub / github.com/modelcontextprotocol/mcpb / promptUrls

Function promptUrls

src/cli/init.ts:402–443  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

400}
401
402export async function promptUrls() {
403 const homepage = await input({
404 message: "Homepage URL (optional):",
405 validate: (value) => {
406 if (!value.trim()) return true;
407 try {
408 new URL(value);
409 return true;
410 } catch {
411 return "Must be a valid URL (e.g., https://example.com)";
412 }
413 },
414 });
415
416 const documentation = await input({
417 message: "Documentation URL (optional):",
418 validate: (value) => {
419 if (!value.trim()) return true;
420 try {
421 new URL(value);
422 return true;
423 } catch {
424 return "Must be a valid URL";
425 }
426 },
427 });
428
429 const support = await input({
430 message: "Support URL (optional):",
431 validate: (value) => {
432 if (!value.trim()) return true;
433 try {
434 new URL(value);
435 return true;
436 } catch {
437 return "Must be a valid URL";
438 }
439 },
440 });
441
442 return { homepage, documentation, support };
443}
444
445export async function promptVisualAssets() {
446 const icon = await input({

Callers 1

initExtensionFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…