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

Method constructor

src/ToolHandler.ts:152–170  ·  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

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

Callers

nothing calls this directly

Calls 1

getToolStatusInfoFunction · 0.85

Tested by

no test coverage detected