graphlore
v0.7.0Navigate a codebase through a code graph it builds itself: semantic locate, impact, source spans.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
graphlore_project
Show which project this server reads, or switch it to another directory. Every tool works on ONE project, the directory holding graphify-out/graph.json; it starts as GRAPHLORE_PROJECT_DIR. Pass ``path`` to point the server at another repository (for example one just built with graphlore_build) until the next switch or a restart; no file is changed. The reply also names the server version: a schema that lacks a parameter this version documents means the client loaded it before an update. Refused while GRAPHLORE_RESTRICT_PATHS is on (always over HTTP). The opt-in watcher keeps syncing only the…
| Parameter | Type | Description |
|---|---|---|
as_json | boolean | True -> the reply is one JSON object (the same payload the result's structuredContent carries); False -> readable text. |
path | string | Directory to switch to, absolute or relative to the current project. Empty -> only report the active project. |
graphlore_build
Build or update the knowledge graph of a folder (writes graphify-out/). The graph is written INSIDE the folder read: building another folder than the active project leaves it where this server does not look, and the reply names the graphlore_project call that switches to it. The reply is the build's counts and warnings. GRAPHLORE_ENGINE picks the extractor: ``auto`` (default) uses graphlore's native engine when installed (14 languages, all local) and the deprecated graphify CLI otherwise. A graph.html view is written beside graph.json unless ``no_viz``.
| Parameter | Type | Description |
|---|---|---|
cluster_only | boolean | True -> detect communities again, without re-reading files. |
code_only | boolean | True -> code only, no document extraction (no LLM key needed; forced under GRAPHLORE_OFFLINE). |
mode | string | "deep" -> more INFERRED edges (graphify only, deprecated). |
no_viz | boolean | True -> do not write graph.html. |
path | string | Folder to read, relative to the project or absolute. |
update | boolean | True -> re-read only the files changed since the last build. |
verbose | boolean | True -> the full build log instead of counts and warnings. |
graphlore_overview
One-shot orientation: call this FIRST. Returns graph size, top god nodes, community count, surprise-edge count and suggested starting questions — enough to plan further exploration cheaply.
| Parameter | Type | Description |
|---|---|---|
as_json | boolean | True -> the reply is one JSON object (the same payload the result's structuredContent carries); False -> readable text. |
top_n | integer | How many god nodes and communities to list. |
graphlore_communities
Summarize Leiden communities: size, name and their most connected members. A community carries a ``name`` when it has one: set with graphlore_set_labels / graphlore_label_communities (``graphify-out/.graphify_labels.json``), else the one graphify wrote on the nodes.
| Parameter | Type | Description |
|---|---|---|
as_json | boolean | True -> the reply is one JSON object (the same payload the result's structuredContent carries); False -> readable text. |
limit | integer | Communities listed, largest first. ``total`` is how many there are. |
members | integer | Member labels shown per community, most connected first; ``size`` is the full count and ``members_left_out`` the rest. |
graphlore_search
Search nodes by text in their name/label (case-insensitive).
| Parameter | Type | Description |
|---|---|---|
pattern * | string | Text to find in node names and labels. |
as_json | boolean | True -> the reply is one JSON object (the same payload the result's structuredContent carries); False -> readable text. |
limit | integer | Cap on nodes listed; ``total`` counts them all. |
graphlore_neighbors
List the direct (1-hop) neighbors of a node, with relations. Production code is listed before tests, most connected first. Includes the calls and imports graphlore resolves from the source (a call through an imported module, ``mod.func()``), which graph.json alone does not carry. A hub has more neighbors than fit a reply: past ``limit`` the result says how many there are (``total``) and how they split by relation (``counts``).
| Parameter | Type | Description |
|---|---|---|
node * | string | The node (id, label or bare name). When several nodes match, the result says which one was used and lists the others with their ids. |
as_json | boolean | True -> the reply is one JSON object (the same payload the result's structuredContent carries); False -> readable text. |
limit | integer | Cap on listed neighbors. |
scope | string | Which neighbors to list — path prefixes / globs, ``!pattern``, ``-tests``, ``-external``, ``-vendored``. Empty leaves nothing out. |
graphlore_subgraph
Extract a BFS subgraph around a node, capped at a token budget. This is the token-cheap way to hand the model just the relevant slice of a large codebase instead of the whole graph. Each node's neighbors are walked production code first, most connected first, so a hub function's budget goes to its real callers before its tests; when the budget cuts the walk short the result says how many direct neighbors were left out and how many were tests.
| Parameter | Type | Description |
|---|---|---|
node * | string | Center node (id, label or bare name). When several nodes match, the result says which one was used and lists the others with their ids. |
as_json | boolean | True -> the reply is one JSON object (the same payload the result's structuredContent carries); False -> readable text. |
budget_tokens | integer | Approximate cap on returned size; expansion stops when hit. ``approx_tokens`` is a conservative estimate (~3.5 chars/token, ±~20%); set ``GRAPHLORE_TOKENIZER=tiktoken`` (with the ``[tiktoken]`` extra… |
hops | integer | BFS depth from the center. |
scope | string | Which part of the graph to walk — path prefixes / globs, ``!pattern``, ``-tests``, ``-external``, ``-vendored``. Empty leaves nothing out. |
graphlore_impact
Blast radius: what is affected if ``node`` changes (or what it depends on). direction="dependents" (default) walks what references the node, "dependencies" what it references, "both" either way by nearest hop. Rows are ordered by hop distance, production code before tests, under a token budget; each carries its edge's ``relation``, ``confidence`` (INFERRED edges are included; ``strict=True`` walks only extracted ones) and one recorded ``site``. ``truncated`` / ``dropped`` / ``beyond_hops`` say what was left out. Docstring nodes are not dependents; shared state (``reads`` / ``writes``) is foll…
| Parameter | Type | Description |
|---|---|---|
node * | string | The node: an id, a label or a bare name (fuzzy match, reported). |
as_json | boolean | True -> the reply is one JSON object (the same payload the result's structuredContent carries); False -> readable text. |
budget_tokens | integer | Approximate cap on the reply; rows past it are counted. |
direction | string | "dependents" | "dependencies" | "both". |
hops | integer | How many dependency hops to walk out. |
relations | string | Edges that may be walked: "all", presets "code" / "calls" / "imports" / "types" / "state" / "http", or relation names ("calls,inherits"); a class's members stay reachable. |
scope | string | Part of the graph to walk: path prefixes / globs, "!pattern", "-tests", "-external", "-vendored". Empty leaves nothing out. |
shared_state | boolean | True -> also walk writer -> what it writes -> its readers. |
strict | boolean | True -> walk only EXTRACTED edges (proof, not leads). |
graphlore_locate
Code search -> graph structure in one call: find code by what it does. Maps the best hit for ``query`` to its graph node and returns the token-budgeted subgraph around it, plus ``semantic_cousins``: similar code elsewhere, the ones with ``linked: false`` first (similar but not connected: duplication or hidden coupling). ``calls_into`` lists what the seed calls in other files, ``also_matched`` the other top hits by definition. ``backend`` says which search answered: semble, else the built-in index (BM25; the [embed] extra adds embeddings for questions in other words than the code's). The first…
| Parameter | Type | Description |
|---|---|---|
query * | string | A natural-language question or code phrase ("where are redirects followed"). |
as_json | boolean | True -> the reply is one JSON object (the same payload the result's structuredContent carries); False -> readable text. |
budget_tokens | integer | Approximate cap on the subgraph part of the reply. |
hops | integer | Graph hops of the subgraph around the top hit. |
related_k | integer | Semantic cousins to list. |
top_k | integer | Search hits to read. |
graphlore_node_details
Show a node's full metadata: type, source file/line, docstring, community. On a native graph, ``state`` says what the node reads and writes (variables, fields, constants, resources) and ``shared_with`` the other definitions that touch the same state, each with how: the code this one affects, or is affected by, without a call between them. For a variable or field it lists its readers and writers instead.
| Parameter | Type | Description |
|---|---|---|
node * | string | The node: an id, a label or a bare name. |
as_json | boolean | True -> the reply is one JSON object (the same payload the result's structuredContent carries); False -> readable text. |
graphlore_fetch
Hydrate graph nodes into their real source code, under one token budget. The code half of graphlore_locate / graphlore_subgraph: for each node, the lines of the definition that holds it (± ``context_lines``). One budget is shared: nodes past it are named in ``not_fetched`` with ``truncated`` set (the first is always returned); a definition longer than 8,000 tokens is cut at a line and says so (``cut``). Names resolve like everywhere else (``matched``; a miss goes to ``not_found`` with ``did_you_mean``). ``file_changed_since_build`` and ``span_mismatch`` warn when the file moved on since the…
| Parameter | Type | Description |
|---|---|---|
nodes * | array | Node names, labels or ids (e.g. ["Client._send_single_request"]). |
as_json | boolean | True -> the reply is one JSON object (the same payload the result's structuredContent carries); False -> readable text. |
budget_tokens | integer | Approximate shared cap on the code returned. |
context_lines | integer | Extra lines above and below each definition. |
graphlore_freshness
Check whether graph.json is stale relative to the current git HEAD. Prefers the commit graphify recorded the graph was built from (``built_at_commit``) over the file mtime — robust across checkouts where mtime is reset — and flags both modified and newly-added (untracked) files. Returns a ``recommended_action`` (fresh / update / rebuild) with a ``reason``: deletions, renames, or a large change set call for a full rebuild, since incremental update can't drop nodes for code that no longer exists. If ``built_at_commit`` is recorded but unreachable in this clone (shallow clone, gc, rebase or…
| Parameter | Type | Description |
|---|---|---|
as_json | boolean | True -> the reply is one JSON object (the same payload the result's structuredContent carries); False -> readable text. |