(
private readonly tool: ToolDefinition | DefinedPageTool,
private readonly serverArgs: ParsedArguments,
private readonly getContext: () => Promise<McpContext>,
private readonly toolMutex: Mutex,
)
| 230 | private readonly disabledReason?: string; |
| 231 | |
| 232 | constructor( |
| 233 | private readonly tool: ToolDefinition | DefinedPageTool, |
| 234 | private readonly serverArgs: ParsedArguments, |
| 235 | private readonly getContext: () => Promise<McpContext>, |
| 236 | private readonly toolMutex: Mutex, |
| 237 | ) { |
| 238 | const {disabled, reason} = getToolStatusInfo(tool, serverArgs); |
| 239 | this.disabledReason = reason; |
| 240 | this.shouldRegister = !(disabled && !serverArgs.viaCli); |
| 241 | |
| 242 | this.inputSchema = |
| 243 | 'pageScoped' in tool && |
| 244 | tool.pageScoped && |
| 245 | serverArgs.pageIdRouting && |
| 246 | !serverArgs.slim |
| 247 | ? {...pageIdSchema, ...tool.schema} |
| 248 | : tool.schema; |
| 249 | this.registeredInputSchema = zod.object(this.inputSchema).passthrough(); |
| 250 | } |
| 251 | |
| 252 | unknownArgumentNames(params: Record<string, unknown>): string[] { |
| 253 | return Object.keys(params).filter( |
nothing calls this directly
no test coverage detected