(
private readonly tool: ToolDefinition | DefinedPageTool,
private readonly serverArgs: ReturnType<typeof parseArguments>,
private readonly getContext: () => Promise<McpContext>,
private readonly toolMutex: Mutex,
)
| 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( |
nothing calls this directly
no test coverage detected