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

Method constructor

src/ToolHandler.ts:151–169  ·  view source on GitHub ↗
(
    private readonly tool: ToolDefinition | DefinedPageTool,
    private readonly serverArgs: ReturnType<typeof parseArguments>,
    private readonly getContext: () => Promise<McpContext>,
    private readonly toolMutex: Mutex,
  )

Source from the content-addressed store, hash-verified

149 private readonly disabledReason?: string;
150
151 constructor(
152 private readonly tool: ToolDefinition | DefinedPageTool,
153 private readonly serverArgs: ReturnType<typeof parseArguments>,
154 private readonly getContext: () => Promise<McpContext>,
155 private readonly toolMutex: Mutex,
156 ) {
157 const {disabled, reason} = getToolStatusInfo(tool, serverArgs);
158 this.disabledReason = reason;
159 this.shouldRegister = !(disabled && !serverArgs.viaCli);
160
161 this.inputSchema =
162 'pageScoped' in tool &&
163 tool.pageScoped &&
164 serverArgs.experimentalPageIdRouting &&
165 !serverArgs.slim
166 ? {...pageIdSchema, ...tool.schema}
167 : tool.schema;
168 this.registeredInputSchema = zod.object(this.inputSchema).passthrough();
169 }
170
171 unknownArgumentNames(params: Record<string, unknown>): string[] {
172 return Object.keys(params).filter(

Callers

nothing calls this directly

Calls 1

getToolStatusInfoFunction · 0.85

Tested by

no test coverage detected