Skip to main content
Glama

answer_branch

Answer a pending branch request from an open Rabbithole by writing a focused markdown response, using selected text and document context for precise answers.

Instructions

Answer one pending branch request from an open Rabbithole. Called after open_rabbithole or answer_branch returns status='branch_request'. Write a focused, well-formatted markdown answer to the human's question about their selection - use selected_text, parent_node_title, and lineage for context (you already hold the documents you authored). If selected_text is empty, answer conversationally about the parent document as a whole. If the request has a 'lens', match that style.

Authoring vocabulary:

  • Base notation: GFM markdown, $...$/$$...$$ and (...)/[...] math, and highlighted language-tagged code fences.

  • If the answer is content fetched from a URL or repo, pass its document URL as base_url so relative images and links resolve.

  • If the answer uses a local image, pass assets: [{ name, file_path }] and reference it as alt; use this for screenshots, generated diagrams, and other non-web images.

  • Use ```show when a concept is spatial or structural: architecture, memory layout, relationships.

  • show dialect: HTML/CSS/inline-SVG only; no scripts. Scripts and unsafe attributes are stripped.

  • show craft: prefer HTML/CSS layout with flexbox/grid over absolute SVG coordinates.

  • Design visuals for about 380px card width; make them fluid and keep labels short.

  • Use theme tokens, never hardcoded colors, so visuals match light and dark themes: --fg, --fg-bold, --fg-dim, --fg-faint, --node-bg, --bar-bg, --border, --border-focus, --accent, --accent-contrast, --code-bg, --hl, --hl-strong, --warn, --font-ui, --font-doc, --font-mono.

  • Example show:

<style>.flow{display:grid;gap:8px}.box{border:1px solid var(--border);padding:8px;border-radius:6px}</style>
<div class='flow'><div class='box'>Parse</div><div class='box' style='background:var(--hl)'>Render</div></div>
  • Streaming choreography: send prose in 1-3 sentence chunks as usual.

  • Emit each visual fence contiguously, ideally in one chunk; readers see a placeholder until the fence closes.

  • Interleave prose -> visual -> prose when useful. Use a visual only when it genuinely carries the explanation.

Finish streaming by sending the remaining final chunk in a normal call with a short 'title'. Partial chunks concatenate verbatim: include your own spacing/newlines and never repeat text already sent. The final call blocks and returns the next event. If it returns status='keep_listening', immediately call open_rabbithole { hole_id }; if the host reports a tool timeout (e.g. timed out awaiting tools/call), do the same. Do not re-send content; asks are saved.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
titleNoShort label for the new node (a few words; required on the final call)
assetsNoLocal image files to attach to this hole; reference them in markdown as asset:name.png images
contentYesMarkdown chunk (partial) or the remaining markdown (final call)
partialNotrue = stream this chunk into the pending answer and return immediately; omit/false = finish the answer and block for the next event
base_urlNoDocument URL used to resolve relative markdown links/images; absolute http(s) only
request_idYesThe request_id of the branch_request being answered
session_idYesActive session ID from open_rabbithole
Behavior5/5

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

No annotations provided, so the description fully discloses behavior: streaming chunks, final blocking call, concatenation rules, authoring vocabulary, asset handling, and timeout recovery. It covers safety (don't re-send content) and formatting expectations comprehensively.

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?

The description is lengthy but well-structured with clear sections (authoring vocabulary, streaming choreography). It is front-loaded with purpose. Could be slightly more concise, but the detail is warranted given tool complexity.

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?

Despite no output schema, the description covers all aspects: usage triggers, parameter details, streaming protocol, error handling, formatting rules, and asset management. No gaps for agent execution.

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

Parameters5/5

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

Schema has 100% coverage but description adds deep semantics: explains streaming protocol, chunk vs final, asset referencing, title requirement on final call, and content formatting. Goes far beyond schema descriptions.

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 'Answer one pending branch request from an open Rabbithole' and specifies the trigger condition. It differentiates from sibling tools (ingest_pdf, list_rabbitholes, open_rabbithole) by focusing on answering branch requests.

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?

Explicitly states when to call this tool (after open_rabbithole or answer_branch returns status='branch_request') and provides handling for various scenarios (empty selected_text, lens, keep_listening status, timeout). No ambiguity about usage context.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/shlokkhemani/rabbithole'

If you have feedback or need assistance with the MCP directory API, please join our Discord server