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

Method #queueFor

src/ToolHandler.ts:491–508  ·  view source on GitHub ↗

* The queue the call runs on. `'none'` tools run outside the runner. * `'page'` tools run on the queue of the page named by `rawArgs.pageId` * when page id routing applies and the page exists; every other call runs * on the context queue.

(
    context: McpContext,
    rawArgs: Record<string, unknown>,
  )

Source from the content-addressed store, hash-verified

489 * on the context queue.
490 */
491 #queueFor(
492 context: McpContext,
493 rawArgs: Record<string, unknown>,
494 ): TaskQueue | undefined {
495 const tool = this.#tool;
496 switch (tool.concurrency) {
497 case 'none':
498 return undefined;
499 case 'page': {
500 const pageId = routedPageId(tool, this.#config.resolved, rawArgs);
501 return pageId !== undefined
502 ? context.pageTaskQueue(pageId)
503 : context.taskQueue;
504 }
505 default:
506 return context.taskQueue;
507 }
508 }
509
510 /**
511 * Cancellation stops waiting for a result, but running work keeps its queue

Callers 1

handleMethod · 0.95

Calls 2

routedPageIdFunction · 0.85
pageTaskQueueMethod · 0.80

Tested by

no test coverage detected