MCPcopy Create free account
hub / github.com/ChromeDevTools/chrome-devtools-mcp / buildDisabledMessage

Function buildDisabledMessage

src/ToolHandler.ts:61–71  ·  view source on GitHub ↗
(
  toolName: string,
  flag: string,
  categoryLabel?: string,
)

Source from the content-addressed store, hash-verified

59class ToolCallTimeoutError extends Error {}
60
61function buildDisabledMessage(
62 toolName: string,
63 flag: string,
64 categoryLabel?: string,
65): string {
66 const reason = categoryLabel
67 ? `is in category ${categoryLabel} which`
68 : `requires ${flag.startsWith('--experimental') ? 'experimental feature' : 'flag'} ${flag} and`;
69
70 return `Tool ${toolName} ${reason} is currently disabled. Enable it by running chrome-devtools start ${flag}=true. For more information check the README.`;
71}
72
73function getDisabledReason(
74 tool: AnyToolDefinition,

Callers 1

getDisabledReasonFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected