Skip to main content
Glama

ask_cluster

Answers natural-language questions about a research cluster using cached data or live NotebookLM queries. Also retrieves or regenerates briefings.

Instructions

Answer a question about one cluster, dispatching to the source named by source / mode.

Single entrypoint for all cluster-question workflows. Replaces the deprecated aliases ask_cluster_notebooklm / read_briefing / brief_cluster (gated behind RESEARCH_HUB_MCP_INCLUDE_DEPRECATED=1, removed in v2.0.0). Routes the question through three internal paths: source='local' answers from cached crystals + memory only; source='notebooklm', mode='ask' opens NotebookLM via Playwright and asks live; source='notebooklm', mode='briefing' returns the last downloaded NotebookLM briefing markdown; source='notebooklm', mode='brief' runs the full bundle-upload-generate-download round-trip to refresh the briefing artifact.

When to use:

  • User asks a natural-language question about one cluster and you want the cheapest, fastest answer first (source='local').

  • User asks an ad-hoc question that requires fresh paper content retrieval (source='notebooklm', mode='ask').

  • User wants to read the existing brief text (mode='briefing').

  • User asks to regenerate the brief (mode='brief' with force_regenerate=True).

When NOT to use:

  • You want one specific crystal answer by slug; use read_crystal instead — it skips dispatch overhead.

  • You want to search across multiple clusters; use web_search or search_papers instead.

  • You want to inspect cluster memory directly (entities / claims / methods); use read_cluster_memory.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
clusterNoCluster slug to ask. One of ``cluster`` or ``cluster_slug`` must be set; ``cluster_slug`` is a backwards-compat alias accepted for legacy clients.
questionNoNatural-language question. May be ``None`` only when ``mode='briefing'`` or ``mode='brief'`` (where the action is read/regenerate, not Q&A).
sourceNo``'local'`` (default) for cached crystals + memory, or ``'notebooklm'`` for the Playwright-driven NotebookLM backend. NotebookLM paths require a logged-in browser session — run ``research-hub notebooklm login`` once.local
detailNoResponse verbosity. One of ``'gist'`` (default, ~100 words) / ``'standard'`` / ``'detailed'``. Only honoured by local + briefing modes.gist
headlessNoFor ``source='notebooklm'``, whether to run the browser headless. Default ``True``; set ``False`` if you need to debug a Google auth challenge.
timeout_secNoMax seconds to wait for NotebookLM. Default 120. Increase to 240+ for large clusters.
max_charsNoFor ``mode='briefing'``, truncate the briefing text after this many chars. Default value comes from the module-level ``_BRIEFING_MAX_CHARS``.
force_regenerateNoFor ``mode='brief'``, force the full round trip even if a recent briefing exists. Default ``False`` (use cached briefing when available).
modeNoNotebookLM sub-action. One of ``'ask'`` (default; live Q&A), ``'briefing'`` (return existing brief markdown), or ``'brief'`` (full bundle → upload → generate → download). Ignored when ``source='local'``.ask
cluster_slugNoBackwards-compat alias for ``cluster``. Prefer ``cluster``; ``cluster_slug`` exists for parity with the deprecated ``ask_cluster_notebooklm`` signature.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed10 schema fields changedv1.0.2
    • addedInput schema / properties / cluster / description
      Added value: +"Cluster slug to ask. One of ``cluster`` or\n``cluster_slug`` must be set; ``cluster_slug`` is a\nbackwards-compat alias accepted for legacy clients."
    • addedInput schema / properties / cluster_slug / description
      Added value: +"Backwards-compat alias for ``cluster``. Prefer\n``cluster``; ``cluster_slug`` exists for parity with the\ndeprecated ``ask_cluster_notebooklm`` signature."
    • addedInput schema / properties / detail / description
      Added value: +"Response verbosity. One of ``'gist'`` (default, ~100\nwords) / ``'standard'`` / ``'detailed'``. Only honoured by\nlocal + briefing modes."
    • addedInput schema / properties / force_regenerate / description
      Added value: +"For ``mode='brief'``, force the full round\ntrip even if a recent briefing exists. Default ``False``\n(use cached briefing when available)."
    • addedInput schema / properties / headless / description
      Added value: +"For ``source='notebooklm'``, whether to run the\nbrowser headless. Default ``True``; set ``False`` if you\nneed to debug a Google auth challenge."
    • addedInput schema / properties / max_chars / description
      Added value: +"For ``mode='briefing'``, truncate the briefing text\nafter this many chars. Default value comes from the\nmodule-level ``_BRIEFING_MAX_CHARS``."
    • addedInput schema / properties / mode / description
      Added value: +"NotebookLM sub-action. One of ``'ask'`` (default; live\nQ&A), ``'briefing'`` (return existing brief markdown), or\n``'brief'`` (full bundle → upload → generate → download).\nIgnored when ``source='local'``."
    • addedInput schema / properties / question / description
      Added value: +"Natural-language question. May be ``None`` only when\n``mode='briefing'`` or ``mode='brief'`` (where the action\nis read/regenerate, not Q&A)."
    • addedInput schema / properties / source / description
      Added value: +"``'local'`` (default) for cached crystals + memory, or\n``'notebooklm'`` for the Playwright-driven NotebookLM\nbackend. NotebookLM paths require a logged-in browser\nsession — run ``research-hub notebooklm login`` once."
    • addedInput schema / properties / timeout_sec / description
      Added value: +"Max seconds to wait for NotebookLM. Default 120.\nIncrease to 240+ for large clusters."
  2. First observedv1.0.0

TDQS

A4.4/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations provided, so description carries full burden. It details three internal routing paths, prerequisites (NotebookLM login), and parameter-specific behaviors (e.g., question=None for briefing modes, force_regenerate). Could mention error scenarios or rate limits, but overall strong.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Well-structured with sections and bullet points, though somewhat lengthy. Every sentence adds value; however, the deprecated aliases list could be more concise. Still, it is organized and front-loaded with the core purpose.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given 10 parameters, no annotations, and presence of output schema, the description is highly complete. It covers all four modes, routing logic, and when to use alternatives, leaving little ambiguity for an agent.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so baseline 3. The description adds value by explaining parameter interdependencies (e.g., mode interaction with source, question None for certain modes) and prerequisites, but the schema already describes each parameter well.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states it answers a question about one cluster, dispatching to internal sources. It specifies the resource (one cluster) and action (question answering), and distinguishes from siblings like read_crystal (by slug) and search_papers (multi-cluster).

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Provides explicit 'When to use' and 'When NOT to use' sections, referencing specific sibling tools (read_crystal, web_search, search_papers, read_cluster_memory) and giving clear guidance on source/mode selection.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.