IncidentFlowIncidentFlowDocs
Developer Reference

Docs Search

How IncidentFlow indexes and semantically searches public documentation, separate from workspace memory.

Docs Search is semantic search over published IncidentFlow documentation. It lets AI clients and the product find setup steps, integration guides, MCP usage, API references, and runbooks by meaning — not just keyword match — while staying strictly separate from private workspace memory.

How it works

Docs Search has two stages: an offline indexing pipeline and an online query path.

Indexing (build time)
  content/docs → chunk (+ content_hash) → POST /internal/docs/index
    → embed → Qdrant (incidentflow_public_knowledge)

Query (runtime)
  MCP client → public_knowledge_search → incidentflow-mcp
    → POST /internal/docs/search → embed query → vector search
    → ranked results → MCP client

Indexing

Published docs under content/docs are the only source. The indexer (npm run docs:index-public, scripts/index-public-docs.mjs):

  1. reads each docs page and splits it into chunks (title, URL, source path, section, heading, text);
  2. computes a content_hash per chunk so re-indexing is idempotent — unchanged chunks are not re-embedded;
  3. POSTs the chunks to platform-api /internal/docs/index (internal key), which embeds them and upserts into the incidentflow_public_knowledge Qdrant collection with an index timestamp.

Re-run the indexer whenever documentation changes to keep search fresh.

Query

A client calls the public_knowledge_search MCP tool. IncidentFlow MCP forwards the query to platform-api /internal/docs/search, which embeds the query and runs a vector search against the public collection, returning ranked matches.

MCP tool

Use public_knowledge_search to search public documentation from any MCP client. It is read‑only.

InputDescription
queryNatural‑language search text (required).
limitMaximum results to return.
document_typeOptional filter (e.g. api_reference, runbook, guide).

The response follows the standard envelope; data contains the normalized search result:

{
  "query": "how to connect grafana",
  "scope": "public",
  "total": 3,
  "results": [
    {
      "title": "Grafana",
      "url": "/docs/integrations/grafana",
      "section": "Integrations",
      "snippet": "The Grafana integration exposes approved dashboards…",
      "score": 0.87
    }
  ]
}

Boundaries

  • Public only. Source content comes exclusively from content/docs, indexed into the public knowledge collection.
  • Never touches workspace memory. Docs Search does not query private incidents, RCAs, runbooks, or workspace knowledge — that is private_knowledge_search, a separate, workspace‑scoped tool.
  • No secrets. Public knowledge must not include customer data, tokens, private URLs, internal incidents, or workspace‑specific notes. See Public Knowledge.

On this page