kg_search
Unified Knowledge Graph KNOWLEDGE retrieval — facts, themes and relationships from INSIDE document CONTENT. This is NOT an artefact finder: do NOT use it to locate a document / whiteboard / diagram / plan / task / improvement by its TITLE or friendly id (e.g. "DOC-123", "find the GTM plan"). For ...
This record as markdown: /tools/io-stablebaseline-sb/kg-search.md
What kg_search does on Stable Baseline
AI agents call kg_search to retrieve information from Stable Baseline without modifying anything. It is typically the context-gathering step in research, monitoring, and reporting workflows, before the agent takes action elsewhere.
| Parameter | Type | Required | Description |
|---|---|---|---|
mode | string | — | Retrieval strategy. See tool description for when to use each — strongly prefer 'global' for thematic/overview questions. |
depth | number | — | Hop depth for graph/path modes. |
limit | number | — | |
query | string | — | Natural-language query. Required for local/global/ppr; optional for graph (use srcEntityId instead). |
projectId | string | — | |
dstEntityId | string | — | Required for mode='path'. Target entity to find a path TO. |
srcEntityId | string | — | Required for mode='path'. Optional source entity for mode='graph'. |
workspaceId | string | — |
Parameters from the server's own tool schema.
Why kg_search is rated Low
kg_search retrieves and queries knowledge graph data without creating, modifying, executing commands, or deleting information. It has no side effects beyond returning information. The emphasis on it being for "answering questions" from existing content confirms read-only semantics.
From the tool's definition Tool description explicitly states it performs "KNOWLEDGE retrieval — facts, themes and relationships from INSIDE document CONTENT" and emphasizes "Use kg_search only to ANSWER A QUESTION from the knowledge contained in the artefacts." The description…
Attacks that exploit this kind of access
The rule that runs kg_search safely
PolicyLayer is an MCP gateway: it sits between your AI agents and Stable Baseline, and checks every tool call against a rule you set before the call runs. Nothing changes on the server itself. For kg_search, this is the rule to start with:
kg_search is read-only, so it stays allowed. Everything else on the server is denied unless you say otherwise.
The button opens the PolicyLayer dashboard: create your workspace, connect Stable Baseline, apply this rule, and every kg_search call is checked against it from then on.
Questions about kg_search
Unified Knowledge Graph KNOWLEDGE retrieval — facts, themes and relationships from INSIDE document CONTENT. This is NOT an artefact finder: do NOT use it to locate a document / whiteboard / diagram / plan / task / improvement by its TITLE or friendly id (e.g. "DOC-123", "find the GTM plan"). For locating an artefact by name or id use listDocuments / listWhiteboards / listPlans / listTasks / searchImprovements (they match title + friendly id). Use kg_search only to ANSWER A QUESTION from the knowledge contained in the artefacts. PICK THE MODE THAT FITS THE QUERY: • mode='local' (default) — for SPECIFIC factual questions ("what does §15 say about deposits?", "who is the Chief Counsel?"). FTS+vector RRF over individual document chunks. Returns precise excerpts with citations. • mode='global' — for THEMATIC / OVERVIEW / SUMMARY questions ("what are the main themes", "give me an overview of the project", "what topics does this cover"). Returns Louvain community summaries + curated wiki pages — far better than 'local' for big-picture queries because community summaries already aggregate across many chunks. ALWAYS PREFER over 'local' when the user asks for themes / summary / overview / topic landscape. • mode='graph' — for RELATIONSHIP questions ("what's connected to entity X?", "who cites Section 5?"). 1-hop entity-neighbourhood walk. Pass query OR srcEntityId. • mode='path' — for CONNECTION questions ("how does X relate to Y?"). Shortest path between two entities. Pass srcEntityId AND dstEntityId. • mode='ppr' — for MULTI-HOP discovery ("what's relevant to X, even indirectly?"). Personalised PageRank over AUTHORED-vs-EXTRACTED weighted edges, seeded by query-similar entities. Best when 'local' returns too few results and the answer requires walking through several entity hops. Quick decision tree: - User asks for an overview/summary/themes → 'global' - User asks a specific question with a clear answer → 'local' - User asks 'how is X connected to Y' → 'path' (with both entity IDs) - User asks 'what's near entity X' → 'graph' (with srcEntityId) - 'local' returned nothing useful and the question is broad → retry with 'ppr'. It is categorised as a Read tool in the Stable Baseline MCP Server, which means it retrieves data without modifying state.
kg_search accepts 8 parameters: mode, depth, limit, query, projectId, dstEntityId, srcEntityId, workspaceId. The full parameter table on this page comes from the server's own tool schema.
Register the Stable Baseline MCP server in PolicyLayer and add a rule for kg_search: allow, deny, rate-limit, or require approval. Point your MCP client at the PolicyLayer proxy URL and the rule is enforced on every call, before it reaches Stable Baseline. Nothing to install.
kg_search is a Read tool with low risk. Read-only tools are generally safe to allow by default.
Yes. Add a rate_limit block to the kg_search rule in your PolicyLayer policy. For example, setting max: 10 and window: 60 limits the tool to 10 calls per minute. Rate limits are tracked per agent session and reset automatically.
Set action: deny in the PolicyLayer policy for kg_search. The AI agent will receive a policy violation error and cannot call the tool. You can also include a reason field to explain why the tool is blocked.
kg_search is provided by the Stable Baseline MCP server (https://api.stablebaseline.io/functions/v1/cloud-serve/mcp). PolicyLayer sits as a proxy in front of this server to enforce policies before tool calls reach the server.
More on Stable Baseline, and thousands of servers like it.
This server
Across the catalogue