Home / Directory / Bun Docs / grep_bun

Grep bun

An MCP tool from the Bun Docs server, run by Oven.

Regex search over the markdown of every page (or the pages under given paths), returning matching lines with line numbers and optional context, grouped by page. Use for exact identifiers, flags and error messages ("perMessageDeflate", "--frozen-lockfile", "ECONNRESET"). Output is capped at 30 KB; narrow with `paths` when a term is common. Prefer search_bun for conceptual questions.

Name on the gateway: bun_docs__grep_bun.

Parameters

NameTypeDescription
pattern requiredstringJavaScript regular expression (no delimiters).
pathsarrayPages or prefixes to search, e.g. ["/docs/runtime/http"]. Omit for the whole site.
ignoreCasebooleanCase-insensitive match (default false).
contextintegerLines of context around each match (default 0).
maxMatchesintegerStop after this many matching lines (default 100).
filesOnlybooleanOnly list matching pages with a count, not the lines.

How to call it

Through the Smart Gateway, any client can run it by name with call_tool, or let the gateway find it with search_tools:

call_tool arguments
{
  "name": "bun_docs__grep_bun",
  "arguments": {
    "pattern": "…"
  }
}

The first call connects Bun Docs to your account automatically; nothing to set up. About this server.

Try asking

Use the grep bun tool with pattern set to ….

More from Bun Docs