1. Conduid
  2. Agents
  3. ozgurcd/gograph
MCP server · Agents

ozgurcd/gograph

Local-only Go static analysis engine with a built-in MCP server. Gives AI coding agents deterministic structural awareness: call graphs, impact analysis, symbol search, and more.

76Good

Scored 5 hours ago · breakdown

About ozgurcd/gograph

ozgurcd/gograph is an MCP server published by ozgurcd in the Agents category: local-only Go static analysis engine with a built-in MCP server. Gives AI coding agents deterministic structural awareness: call graphs, impact analysis, symbol search, and more. Conduid read 70 tools from its source: gograph_api, gograph_arity, gograph_boundaries, gograph_boundaries_create, gograph_callees, gograph_callers and 64 more. No package is published for it, so it installs from a source checkout.

The repository has 234 stars and 16 forks, is licensed MIT, and its last commit was on 1 Dec 2026. The latest release is v1.7.21 (17 Nov 2026): Windows binaries are no longer built or published; macOS and Linux targets are unchanged. It follows v1.7.20 (16 Nov 2026), and the 5 most recent releases go back to v1.7.17 (4 Nov 2026). It passes 4 of the 5 static checks Conduid ran on the repository; it does not pass No dynamic code execution. Its topics include agentic-coding, ai-coding-assistant, antigravity, ast, cli and code-analysis.

Install

From source
git clone https://github.com/ozgurcd/gograph

Tools (70)

gograph_apiDetect public API surface drift by comparing exported Go symbols between the current working tree and a baseline. A `since` value ending in `.json` loads a regular saved graph inside the project root with no linked path component and the exact current repository source-policy marker; its serialized root is ignored. Otherwise gograph validates the value as a Git ref and uses `git archive` to build a temporary baseline. Read-only apart from reading the selected graph or extracting a temporary archive that is removed after the call. WHEN TO USE: Before releasing or merging a PR to catch breaking-change regressions — exported symbols added, removed, or renamed since the baseline. NOT TO USE: For listing current exports without a diff baseline (use gograph_public or gograph_skeleton instead). RETURNS: JSON with baseline and breaking flags; nested exported_symbols, interfaces, structs, and routes groups containing added/removed arrays plus changed detail objects; affected_tests, affected_mocks, and findings arrays. Empty groups indicate no drift.
ParameterTypeDescription
since *stringA baseline Git ref (for example 'main' or 'HEAD~1') or regular in-project saved graph path ending in .json, with no linked component and the exact current source-policy marker
gograph_arityFind functions and methods with at least a threshold number of parameters — the long-parameter-list smell. `min` sets the inclusive minimum (default: 5; 0 includes zero-arity functions), matching CLI --min. WHEN TO USE: During code smell audits. NOT TO USE: For struct field counts (use gograph_fields or gograph_godobj). RETURNS: Functions meeting the threshold with parameter count, signature, and file location.
ParameterTypeDescription
minintegerInclusive minimum argument count to report (default: 5; 0 includes zero-arity functions)
gograph_boundariesRefresh source analysis and check package imports against a boundaries.json configuration. The required config defaults to the committable gograph/boundaries.json, then .gograph/boundaries.json; explicit paths must remain inside the analyzed project, and every path component plus the final regular file is read through the rooted repository boundary. Create it with gograph_boundaries_create. WHEN TO USE: In CI gates or post-edit reviews to enforce layer separation. NOT TO USE: For unconstrained dependency exploration (use gograph_deps or gograph_coupling). RETURNS: Structured pass state and boundary violations.
ParameterTypeDescription
configstringOptional in-project path to a regular, non-linked boundary config (default gograph/boundaries.json, then .gograph/boundaries.json)
gograph_boundaries_createCreate a baseline architecture boundary configuration from the repository's current package imports. Defaults to the committable gograph/boundaries.json under the graph root, uses repository-rooted regular-file creation, and refuses linked paths or overwrite. Mutating and non-idempotent; no network access. WHEN TO USE: Once when adopting boundary checks in an existing repository, then review and tighten the generated rules. NOT TO USE: To verify an existing configuration (use gograph_boundaries). RETURNS: The written config path or an error when the path is unsafe or already exists.
ParameterTypeDescription
configstringOptional in-project output path, absolute or repository-relative; linked components and existing entries are refused (default gograph/boundaries.json)
gograph_calleesFind functions and methods called by the specified function. Defaults to one-hop fan-out; depth 2-10 expands the downstream call graph. WHEN TO USE: To understand a function's downstream dependencies. NOT TO USE: For upstream callers (use gograph_callers); for package dependency trees (use gograph_deps). RETURNS: Callee symbols with package paths, file locations, and call-site line numbers; with mermaid=true, Mermaid flowchart text.
ParameterTypeDescription
depthintegerTraversal depth from 1 to 10 (default 1)
function *stringThe name of the calling function to inspect callees for (supports short name 'Serve', dot-notation 'graph.Graph.Build', or fully-qualified ID)
mermaidbooleanReturn Mermaid flowchart text instead of the normal response
no_testsbooleanExclude call edges originating in *_test.go files
gograph_callersFind functions and methods that call the specified function or interface method. Defaults to one-hop fan-in; depth 2-10 expands callers-of-callers. In a precise graph, Interface.Method expands through all recorded implementations and reports a shared source call site once. In an AST graph, a method call whose receiver type is spelled in the calling function (receiver, typed parameter or var, composite literal, then struct fields), or that is called directly on T{}, new(T) or x.(T), is not matched to a same-name method of another type, and a receiver of a package outside the graph (bytes.Buffer) matches no repository method; unknown receivers stay candidates. WHEN TO USE: Before renaming, removing, or changing a function or interface method signature. NOT TO USE: For unbounded upstream blast radius (use gograph_impact); for downstream callees (use gograph_callees). RETURNS: Caller symbols with package paths, file locations, and call-site line numbers; with mermaid=true, Mermaid flowchart text.
ParameterTypeDescription
depthintegerTraversal depth from 1 to 10 (default 1)
exactbooleanRequire an exact symbol-name or fully-qualified-ID match
function *stringThe target function or method (supports short name 'BuildGraph', interface notation 'Repository.Delete', concrete dot-notation 'Store.Delete', or a fully-qualified ID)
mermaidbooleanReturn Mermaid flowchart text instead of the normal response
no_testsbooleanExclude call edges originating in *_test.go files
gograph_capabilitiesList the running gograph server version, all available MCP tool names, and recommended agent workflows. Once the project-scoped MCP server has started, this tool has no additional graph-state prerequisite. WHEN TO USE: Call once per session to record the analysis instrument and orient before issuing analytical queries. NOT TO USE: Do not repeat after capabilities are cached in context. RETURNS: JSON with version, every registered tool name, recommended workflow sequences, and known static-analysis limitations; tool descriptions are in tools/list.
gograph_changesCompare Go declaration fingerprints, including bodies, without marking every symbol in an edited file modified. Without git_ref, inspects trusted persisted graph.json without refreshing, or the startup fallback if no usable artifact exists. With git_ref, refreshes and extracts a confined declaration baseline without compiling application code. Existing but deselected files are excluded, not deleted; unsafe inputs and parse failures produce diagnostics, never deletion proof. Missing legacy declaration fingerprints produce unknown. Read-only analysis. WHEN TO USE: After editing to identify changed declarations before impact/review. NOT TO USE: For line-level diffs or a complete census when evaluation is partial/cannot_evaluate. RETURNS: Native gograph.changes.v1 with complete/partial/cannot_evaluate, diagnostics, changed_files, and new/modified/deleted/excluded/unknown symbol rows; CLI uses the same value and exits 2 for incomplete evaluation.
ParameterTypeDescription
git_refstringOptional git reference to compare against (e.g., 'main', 'HEAD~5', 'v1.4.50')
gograph_checkRefresh source analysis and run static policy checks: boundaries, API drift, changed-route/export tests, test coverage, orphans, globals, arity, and complexity. The default or a relative checks config is confined to a regular non-linked file beneath the project; an absolute config is an explicit operator-selected regular file. Baselines use the same validated builder as CLI: a value ending in `.json` loads a regular saved graph inside the project root with no linked component and the exact current source-policy marker, ignoring its serialized root; otherwise it is treated as a Git ref and extracted temporarily. WHEN TO USE: During PR review or pre-commit analysis. NOT TO USE: For CI process exit enforcement (use CLI gograph gate). RETURNS: Structured pass/warn/fail status, findings, and summary counts.
ParameterTypeDescription
configstringOptional checks.json path; relative/default paths are project-confined, while an absolute path explicitly selects a regular local file
sincestringGit ref or regular in-project saved graph path ending in .json, with no linked component and the exact current source-policy marker, for api_drift
uncommittedbooleanIf true, include uncommitted changes in the analysis scope
gograph_complexityReport estimated cyclomatic complexity for Go functions, sorted highest-to-lowest with severity labels (LOW/MEDIUM/HIGH/VERY HIGH). A function whose repository source cannot be read or parsed safely is retained as UNKNOWN with score -1. Optional `symbol` substring filters to a specific function or set of functions; `top` limits the report (default: 20; 0 = all). WHEN TO USE: During code quality audits, identifying functions that need decomposition, or setting complexity budgets in CI. NOT TO USE: For import dependency metrics (use gograph_coupling or gograph_deps); for God Object detection (use gograph_godobj). RETURNS: Structured list of functions with complexity score and severity label; empty when no functions match the filter.
ParameterTypeDescription
no_testsbooleanDrop functions declared in _test.go files
pathstringKeep functions in this repository-relative directory subtree
symbolstringOptional Go function or method symbol name substring to filter the complexity report (e.g., 'Build')
topintegerNumber of results to return, highest first (default: 20, 0 = all)
gograph_concurrencyFind indexed concurrency sites in the codebase: goroutine spawns (`go` statements), channel sends, and calls on sync.Mutex/RWMutex, sync.WaitGroup, and sync.Once. Optional `term` filter (e.g., "mutex", "goroutine", "channel"). WHEN TO USE: When auditing race safety, understanding async flow, or locating synchronization points before a concurrency refactor. NOT TO USE: For standard sequential call flow analysis (use gograph_callers/gograph_callees). RETURNS: File locations, line numbers, and primitive kind for each indexed concurrency site; empty when no sites are found. Channel receives and select statements are not indexed. LOCK SCOPE: pass `function` (a function or method selector) instead of `term` to parse that body now and list each Lock/RLock with its release (unlock lines, deferred until return, or not released) and the calls between lock and release; spans are lexical, and a call after an unlock in the same block (an early-return branch) is not listed.
ParameterTypeDescription
functionstringFunction or method selector (e.g., 'Manager.startPass'); returns its lock scopes instead of the site list
termstringOptional filter term (e.g., 'goroutine', 'mutex', 'channel')
gograph_constructorsFind all factory and constructor functions that instantiate and return a named Go struct (functions whose return type includes the struct name). WHEN TO USE: When looking for the canonical way to create a struct, or before modifying struct initialization to ensure all construction paths are updated. NOT TO USE: For direct composite-literal sites (use gograph_literals); for struct fields (use gograph_fields). RETURNS: List of constructor function names with signatures, package paths, and file locations; empty when no factory functions are found.
ParameterTypeDescription
struct *stringThe exact name of the target Go struct to find constructors for (e.g., 'User', 'Config')
gograph_contextFetch a pre-flight context bundle for a single Go symbol: AST node metadata, source code, direct callers, direct callees, linked test functions, and architectural role classification — all in one call. Read-only analysis; an active audit session may append local command telemetry. Set uncommitted=true to bundle context for all currently modified symbols at once. WHEN TO USE: As the first call before editing a symbol — eliminates 4–5 separate tool roundtrips. NOT TO USE: For package-level orientation (use gograph_focus); for transitive blast radius (use gograph_impact). RETURNS: JSON with node (first match), nodes[] (all matches), source, callers[], callees[], tests[], test_results[], and top-level role; a missing symbol is a named error. source_error reports a partial context when indexed metadata exists but source cannot be served, also named in _meta.gograph_graph_state.read_diagnostic. With uncommitted=true, returns a contexts[] array; count:0 when no uncommitted symbols exist.
ParameterTypeDescription
exactbooleanRequire an exact symbol-name or fully-qualified-ID match in single-symbol mode.
symbolstringThe exact name, dot-notation 'graph.Graph', or ID of the symbol to retrieve context for.
uncommittedbooleanIf true, return context for all uncommitted modified symbols bundled in one response.
gograph_couplingReport fan-in (Ca), fan-out (Ce), and instability I=Ce/(Ca+Ce) per package. package filters by substring; include_stdlib and internal_only control scope. WHEN TO USE: To evaluate package isolation. RETURNS: Package coupling records; with mermaid=true, Mermaid flowchart text.
ParameterTypeDescription
include_stdlibbooleanInclude standard-library packages in the report. Default false — users asking 'how coupled is my code?' rarely care about stdlib coupling.
internal_onlybooleanRestrict the report to the project's own packages (anything starting with the module path from go.mod). Strictly stronger than excluding stdlib — also excludes third-party deps.
mermaidbooleanReturn Mermaid flowchart text instead of structured JSON
packagestringOptional package name substring to filter results
gograph_coverageReturn the transitive set of production functions and methods statically reachable from one test function. Exact results have an all-static path; any parser-only or CHA dispatch edge degrades that symbol and its descendants to possible. Same-named tests in multiple packages return status=ambiguous and are never merged; retry with the stable test ID from matched_tests or gograph_identity. The optional package qualifier resolves the uncommon in-package versus external foo_test ID collision. Set exact_only=true to omit possible results. This is static attribution, not runtime or branch coverage proof. WHEN TO USE: To map one test to the product symbols it structurally exercises. NOT TO USE: To claim execution or branch coverage. RETURNS: gograph.coverage.v1 JSON with analysis precision, test-call resolution, matched tests, symbols, resolution, depth, representative stable-ID paths, and limitations.
ParameterTypeDescription
exact_onlybooleanReturn only symbols reached entirely through exact/static edges
packagestringOptional exact Go package name used only to disambiguate matching test symbols
test *stringExact test name or canonical stable test symbol ID
gograph_dependentsFind all packages that import the named package (inverse of gograph_deps). WHEN TO USE: Before a package-level interface change or removal. NOT TO USE: For a single function's callers (use gograph_callers). RETURNS: Dependent packages; with mermaid=true, Mermaid flowchart text.
ParameterTypeDescription
mermaidbooleanReturn Mermaid flowchart text instead of the normal response
package *stringThe package to find dependents for (e.g., 'internal/auth', 'auth', or a full import path)
gograph_depsList the import dependencies of a named package. With transitive=false (default), returns direct imports; true returns the BFS closure. WHEN TO USE: When auditing package layering. NOT TO USE: For reverse lookup (use gograph_dependents). RETURNS: direct[] and transitive[] arrays; with mermaid=true, Mermaid flowchart text; found:false when absent.
ParameterTypeDescription
mermaidbooleanReturn Mermaid flowchart text instead of structured JSON
package *stringThe target package path or name to inspect (e.g., 'internal/search', 'internal/cli')
transitivebooleanIf true, return the full transitive import closure via Breadth-First Search (BFS)
gograph_diagramRefresh source analysis and generate a Mermaid architecture diagram of the package dependency graph. WHEN TO USE: Onboarding, architecture review, or communicating package structure. Use group_by=module for monorepos and group_by=file for drill-downs. NOT TO USE: For call-graph traversal or single-package focus. RETURNS: Mermaid text; use max_depth or coarser grouping for large graphs.
ParameterTypeDescription
group_bystringGrouping level: 'package' (default), 'module', 'service', or 'file'
include_stdlibbooleanIf true, include Go standard library packages in the diagram
max_depthintegerMaximum BFS depth from graph roots (0 = unlimited)
gograph_docFetch Go documentation for a package, stdlib symbol, or third-party symbol by running `go doc <query>`. The handler does not query the graph, though the project-scoped MCP server must already have started with a usable artifact or buildable Go source. Filesystem-shaped queries are rejected, and the command is refused for source-tree links the Go toolchain may inspect across the selected root plus its effective module root, or the workspace root and member trees; .git and .gograph are excluded from that preflight. It also refuses a special recognized Go build input, linked/non-regular Go tool metadata (go.mod, go.sum, go.work, go.work.sum, or vendor/modules.txt), or a workspace member outside the workspace directory. Each applicable member directory, go.mod, and optional go.sum is validated first. Dependency and toolchain resolution remain open-world under the user's Go environment. WHEN TO USE: When a call chain reaches code outside the project. NOT TO USE: For project-internal symbols (use gograph_source or gograph_context). RETURNS: A one-element JSON array containing {query, output}, where output is the raw go doc text; an error when the query or repository input is unsafe, the symbol is not found, or go is unavailable.
ParameterTypeDescription
query *stringThe go doc query string. Examples: 'fmt.Errorf', 'net/http.HandleFunc', 'io.Reader', 'github.com/jackc/pgx/v5.Conn.QueryRow'
gograph_embedsFind all Go structs that embed the named struct via anonymous field composition. WHEN TO USE: When understanding how a base type is extended throughout the codebase, or before modifying a shared embedded struct to estimate blast radius. NOT TO USE: For interface implementations (use gograph_implementers); for named field type references in other structs (use gograph_usages). RETURNS: List of embedding parent struct names with package paths and file locations; empty when the struct is embedded nowhere.
ParameterTypeDescription
struct *stringThe exact name of the target struct to inspect embedding relationships for (e.g., 'Symbol', 'PackageNode')
gograph_endpointBuild a full vertical slice for one HTTP route: the matched handler symbol, a BFS call chain downstream (default depth 5), all SQL queries emitted in that chain, and all env vars read. Constant nested Gin/Echo/Fiber Group prefixes and Chi Route closure prefixes are composed into final paths; dynamically computed prefixes remain unresolved and can still be queried by suffix or handler. WHEN TO USE: When auditing what an API endpoint does end-to-end — its downstream dependencies, database queries, and configuration reads. NOT TO USE: For listing all routes (use gograph_routes first to find the pattern); for raw handler source code only (use gograph_source). RETURNS: Array of endpoint slices with route, handler, call chain, SQL, and env fields; found:false with a suggestion when the query does not match any route. `query` accepts route pattern ("POST /api/users"), path fragment ("/users"), or handler name. `depth` controls call-chain BFS depth (default: 5).
ParameterTypeDescription
depthintegerBFS depth for call chain traversal, clamped to 1-20 (default: 5)
include_testsbooleanInclude routes registered in *_test.go files
mermaidbooleanReturn Mermaid flowchart text instead of structured JSON
query *stringRoute pattern ("POST /api/users"), path suffix ("POST /users"), or handler symbol name ("CreateUser"). Constant grouped prefixes are resolved; dynamic prefixes remain best-effort.
gograph_envsFind all environment variable reads in the codebase via os.Getenv, os.LookupEnv, and common config frameworks, with their enclosing function context. Optional `term` filters by key name substring (e.g., "DATABASE" matches DATABASE_URL and DATABASE_HOST). WHEN TO USE: When compiling a deployment configuration manifest, documenting required env vars, or auditing what secrets a service reads at startup. NOT TO USE: For reading actual runtime env values (this is static analysis); for database queries (use gograph_sql). RETURNS: List of env key names, calling function, and file/line; empty when no env reads match the filter.
ParameterTypeDescription
termstringOptional filter term (e.g., 'DATABASE' matches DATABASE_URL, DATABASE_HOST, etc.)
gograph_errorflowTrace how a named error sentinel or error message string is defined, returned, and propagates up the call graph toward HTTP handlers or CLI entry points. Accepts either `query` (preferred) or `term` as the error name or message substring. WHEN TO USE: When auditing how a specific error is produced and handled end-to-end — find definition sites, all return sites, and upstream propagation paths (e.g., ErrNotFound). NOT TO USE: For general upstream traversal of any function (use gograph_callers or gograph_impact); for listing all error definitions (use gograph_errors). RETURNS: Definition sites, return sites, propagation path chains, and related test names; paths is empty when no propagation chain is found. Note: heuristic analysis — does not perform SSA or full data-flow tracking.
ParameterTypeDescription
no_testsbooleanIf true, exclude test files from related-test collection (matches CLI --no-tests)
querystringThe error string or sentinel error name (preferred over term)
termstringThe error string or sentinel error name (e.g., 'ErrInvalidToken' or 'invalid token')
gograph_errorsFind all error and panic sites in the codebase: errors.New, fmt.Errorf, sentinel var declarations, and panic calls. Optional `term` filters by message substring (e.g., "ErrInvalid", "unauthorized"). WHEN TO USE: When cataloging error codes and panic paths, standardizing error messages, or checking whether a specific error string is already defined before adding a new one. NOT TO USE: For tracing how an error propagates up the call stack (use gograph_errorflow instead). RETURNS: List of error or panic sites with message text, file path, and line number; empty when no matches found.
ParameterTypeDescription
no_testsbooleanExclude error sites in *_test.go files
termstringOptional keyword to filter the returned error structures (e.g., 'ErrInvalid', 'unauthorized')
gograph_explainGenerate a synthesized, LLM-ready narrative for a Go symbol: role classification, callers, callees, complexity, SQL, env vars, HTTP routes, concurrency primitives, tests, and interface satisfaction — all in one structured document. WHEN TO USE: For onboarding to an unfamiliar symbol, generating PR documentation, or getting an opinionated architectural assessment without issuing multiple tool calls. NOT TO USE: For raw source code (use gograph_source); for targeted blast-radius analysis (use gograph_impact). RETURNS: Rich structured JSON with role, narrative summary, and all associated cross-references; {"found":false} when symbol is not in the graph.
ParameterTypeDescription
symbol *stringThe name or ID of the symbol to explain (supports short name 'CreateUser', dot-notation 'graph.Graph', or fully-qualified ID)
gograph_exploreExplore a lexical term or Go symbol in one bounded call. Standard mode combines ranked matches with selected-symbol source, direct callers/callees, tests, and exact impact. compact=true returns discovery, selected-node metadata, role, complete counts, and explicit omitted_sections while suppressing token-heavy bodies (default limit 5). deep=true retains standard evidence and adds bounded depth-3 exact identity callers/callees, package context, and explanation (default limit 25). compact and deep are mutually exclusive; an explicit limit overrides their defaults. Possible dispatch is excluded from bundled identity impact and deep traversals. Question-like text is lexical, not model-interpreted. Focused tools remain authoritative for complete output. RETURNS: shared gograph.explore.v1 with mode, selection_basis, ambiguity, totals, truncation, and omission metadata.
ParameterTypeDescription
compactbooleanLow-token response: matches, selected node/role, complete counts, and explicit omissions; mutually exclusive with deep
deepbooleanExpanded response: standard evidence plus bounded depth-3 exact callers/callees, package context, and explanation; mutually exclusive with compact
exactbooleanRequire exact resolution for selected-symbol context; broad lexical matches remain visible
limitintegerMaximum rows returned per section, clamped to 1-100; defaults to 5 compact, 10 standard, or 25 deep
query *stringA symbol, fully-qualified ID, lexical feature term, or short question-like phrase to explore
gograph_fieldsExtract all declared fields from a named Go struct: field names, Go types, and raw struct tag strings (json, db, yaml, gorm, etc.). WHEN TO USE: When mapping JSON/DB serialization tags, inspecting struct layouts, or enumerating fields before adding a new one. NOT TO USE: For methods on the struct (use gograph_node or gograph_source); for all struct initialization sites (use gograph_literals). RETURNS: Array of field entries with name, type, and tag string; empty when the struct is not found.
ParameterTypeDescription
struct *stringThe exact name of the target struct to inspect fields for (e.g., 'Config', 'User')
gograph_fixturesFind test helper structs and factory/builder functions declared in *_test.go files for a named package. WHEN TO USE: Before writing new tests — check what test infrastructure (helper builders, stub factories, shared setup structs) already exists in the package to avoid duplication. NOT TO USE: For test functions that exercise a symbol (use gograph_tests); for external test data files on disk (those are not tracked in the graph — use filesystem search). RETURNS: Symbols defined in test files for the package including helper structs and factory functions; empty when the package has no test helper infrastructure.
ParameterTypeDescription
package *stringThe package path or name (e.g., 'internal/auth')
gograph_flowFind potential untrusted-data paths from HTTP request objects, decoded JSON values, or environment variables to SQL query text, process execution arguments, filesystem paths, or outbound HTTP targets. Run `gograph build . --precise` first for stronger method/interface targets. WHEN TO USE: During a security review or before changing request parsing, command execution, file access, SQL construction, or URL handling. NOT TO USE: As proof of exploitability; the analysis is path-insensitive and call/return context for the 3 most recent call sites by default (context depth up to 16; deeper returns that lose their call site are kept at low confidence), bounded by a size-derived work budget that reports incomplete runs explicitly. RETURNS: Structured findings with source, sink, severity, confidence, parameter_only (constant non-shell program), and path steps; an exhausted budget lists top_functions by work. The policy (.gograph/flow.json or config) adds return-value or argument sanitizers and custom sources and sinks by function.
ParameterTypeDescription
configstringPolicy path inside the graph root (default gograph/flow.json, else .gograph/flow.json, when present)
context_depthnumberOptional call-site frames kept per value (default 3, max 16). Deeper settings are more precise and need more work.
max_worknumberOptional propagation work budget; defaults to a value derived from the number of flow facts. An exhausted budget returns completeness.complete=false with partial findings.
no_testsbooleanExclude functions in *_test.go files
packagesarrayLimit analysis to these import paths; prefix/... includes descendants
sinkstringOptional sink kind: sql_query, process_execution, filesystem, or outbound_http
sourcestringOptional source kind: http_request, decoded_json, or environment
termstringOptional substring filter matched against functions, files, endpoints, and path steps
gograph_focusExtract a comprehensive structural summary of one Go package: all files, defined symbols, internal call edges, and package-level imports. WHEN TO USE: When orienting to an unfamiliar package before editing it — provides a full map of what the package contains and how it connects to the rest of the codebase. NOT TO USE: For a single symbol's details (use gograph_context or gograph_source); for global keyword searches (use gograph_query). RETURNS: All files, symbol names, call edges, and import paths within the package; empty when the package is not found.
ParameterTypeDescription
package *stringThe package path or name to focus on (e.g., 'internal/auth')
gograph_globalsFind package-level variable declarations (var blocks) and the functions that mutate them in a specific package. WHEN TO USE: When auditing mutable global state, identifying thread-safety hazards, or locating shared singleton variables before a concurrency refactor. NOT TO USE: For local-scope variables; for environment variable reads (use gograph_envs). RETURNS: Package-level variable names, types, and the functions that write to them; empty when the package has no package-level variables.
ParameterTypeDescription
package *stringPackage to inspect: a path containing '/' (e.g., 'internal/config' or the full import path) selects that package exactly; a bare name matches package names by substring
gograph_godobjDetect God Object anti-pattern candidates by scoring structs on method count, field count, and outgoing call count. Thresholds: `methods` (default: 5), `fields` (default: 8), `calls` (default: 15); `top` limits results (default: 10). Exceeding any enabled threshold qualifies a struct, and the combined excess determines rank. WHEN TO USE: During architecture reviews to find monolithic structs that should be decomposed. NOT TO USE: For general struct layout inspection (use gograph_fields); for single-function complexity (use gograph_complexity). RETURNS: Ranked candidates with method, field, and call counts; empty when no threshold is exceeded.
ParameterTypeDescription
callsintegerMinimum outgoing call count (default: 15)
fieldsintegerMinimum field count (default: 8)
methodsintegerMinimum method count (default: 5)
topintegerMaximum results to return (default: 10)
gograph_hotspotRank functions by incoming call count (fan-in) to identify the most-depended-on symbols in the codebase. `top` controls result count (default: 10; 0 = all). Set include_tests=true to count test-file call edges — by default excluded so test helpers don't dominate rankings in test-heavy codebases. WHEN TO USE: When deciding where to invest refactoring effort or documentation — high fan-in functions are the highest-risk change targets. NOT TO USE: For single-package metrics (use gograph_focus or gograph_coupling); for complexity scores (use gograph_complexity). RETURNS: Ranked list of function names with fan-in count and package location.
ParameterTypeDescription
include_testsbooleanInclude call edges from *_test.go files. Default false — production fan-in only, otherwise test helpers (baseReq, newTestFoo, etc.) tend to dominate rankings in test-heavy codebases.
topintegerNumber of results to return (default: 10, 0 = all)
gograph_httpcallsList a bounded page of HTTP evidence from imported, unshadowed net/http Get/Post/PostForm/Head calls and possible NewRequest/NewRequestWithContext construction. Client receiver methods and arbitrary URL-building functions are not inferred. Static strings and bounded lexical base + static suffix expressions are recorded; runtime environment values are never read. Construction is not dispatch proof. Workspace http_clients may explicitly map bases or env:KEY to scoped logical authorities; unresolved destinations remain workspace diagnostics. Optional term matches method, URL/base, or function. RETURNS: gograph.results.v1 rows with file/line and dynamic base/suffix or request-only evidence in detail, plus total/returned/truncated/next_cursor. For server routes use gograph_routes.
ParameterTypeDescription
termstringOptional filter term (matches method, URL, or function name — e.g., 'POST' or 'api.example.com')
gograph_identityResolve an exact Go symbol spelling or canonical stable ID to location-independent symbol identity plus current source location. Canonical IDs are module import path + receiver/name and survive line shifts and file moves within the same package; package/module moves, receiver changes, and renames change the ID. Ambiguous short names return every candidate and never select one silently. An optional exact package qualifier disambiguates the uncommon in-package versus external foo_test ID collision. WHEN TO USE: Before persisting cross-document references or to re-resolve an existing stable ID. RETURNS: gograph.identity.v1 JSON with status exact, ambiguous, or not_found and deterministic matches.
ParameterTypeDescription
packagestringOptional exact Go package name used to disambiguate matching symbols
symbol *stringExact symbol name, package/receiver-qualified spelling, or canonical stable ID
gograph_impactTraverse the call graph backwards to find every symbol that transitively calls the target — the full upstream blast radius of a change. Three modes: (1) single symbol via `symbol`; (2) uncommitted changes via `uncommitted=true`; (3) git-ref changes via `since`. WHEN TO USE: Before refactoring a core function to see what breaks. NOT TO USE: For direct one-hop callers only (use gograph_callers). RETURNS: Transitive upstream affected symbols; with mermaid=true, Mermaid flowchart text; a bounded native page (including empty pages). Exact and possible paths remain distinct; Mermaid uses dotted edges for possible evidence.
ParameterTypeDescription
exact_onlybooleanExclude any path that depends on possible call evidence; default false retains explicitly labeled possible results
mermaidbooleanReturn Mermaid flowchart text instead of the normal response
sincestringGit ref (e.g. 'main', 'HEAD~5'): blast radius of all symbols changed since this ref
symbolstringSymbol name for single-symbol blast radius (supports short name 'ValidateToken', dot-notation 'graph.Graph', or fully-qualified ID)
uncommittedbooleanIf true, compute blast radius of all uncommitted modified symbols
gograph_implementersFind all concrete structs that implement a named Go interface. Type-checked production results are merged with AST-discovered implementations from test files because production package loading excludes test variants. Type-checked production results merge AST-discovered test-file fakes; set test_only=true to restrict to structs in *_test.go files (mocks/stubs). WHEN TO USE: When tracing polymorphism, locating dependency injection points, or finding all mock implementations of an interface. NOT TO USE: For interfaces a struct satisfies — inverse direction (use gograph_interfaces instead); for struct fields (use gograph_fields). RETURNS: List of implementing struct names with package paths and file locations; empty when no struct implements the interface.
ParameterTypeDescription
interface *stringThe name of the interface (e.g., 'AuthService')
test_onlybooleanIf true, return only structs defined in test or mock files (replaces gograph_mocks)
gograph_importsFind all files and packages in the codebase that import a specific package by its exact import path. WHEN TO USE: When isolating usage of a third-party library before removing or replacing it, or tracing where an internal package is consumed from outside. NOT TO USE: For a package's own outgoing imports (use gograph_deps); for reverse package-level dependency lookup by short name (use gograph_dependents). RETURNS: File paths and package names of all importers; empty when the package is imported nowhere.
ParameterTypeDescription
package *stringThe exact import path of the target package to trace imports for (e.g., 'github.com/redis/go-redis')
gograph_interfacesFind all Go interfaces satisfied by a named concrete struct (duck-typing resolution — inverse of gograph_implementers). Given a struct name, returns every interface whose complete method set is a subset of that struct's methods. WHEN TO USE: When you need to know which contracts a struct implicitly fulfills — useful before refactoring a method to understand which interface contracts will break. NOT TO USE: For finding structs that implement an interface (use gograph_implementers); for listing interface declarations in a package (use gograph_node or gograph_public). RETURNS: Interface names, method signatures, and file locations; empty when the struct satisfies no known interfaces.
ParameterTypeDescription
struct *stringThe name of the struct (e.g., 'AuthService')
gograph_literalsFind every composite-literal initialization site for a named Go struct — all locations where Foo{...} syntax is used to construct the struct. WHEN TO USE: Before adding a required field to a struct — every site returned will fail to compile if the new field has no default; run this first to scope the migration blast radius. NOT TO USE: For finding string or integer magic values (use gograph_envs or grep for those); for factory functions that return the struct (use gograph_constructors). RETURNS: All file paths and line numbers where the named struct is composite-initialized; empty when the struct has no direct initialization sites.
ParameterTypeDescription
struct *stringThe name of the struct (e.g., 'User')
gograph_mocksFind structs in *_test.go files that implement a named interface — test doubles, mocks, and stubs. Equivalent to gograph_implementers with test_only=true; kept for compatibility. WHEN TO USE: When writing tests and wanting to find existing mock implementations before creating a new one. NOT TO USE: For production interface implementers (use gograph_implementers without test_only); prefer gograph_implementers(test_only=true) for new code. RETURNS: Test-file struct names implementing the interface with file locations; empty when no test mocks exist for the interface.
ParameterTypeDescription
interface *stringThe name of the interface (e.g., 'AuthService')
gograph_mutateFind struct-field and package-global mutation sites. Use Type.Field to exclude same-named fields on unrelated types; ordinary local-variable assignments are excluded. A precise graph adds ++/+=, pointer-alias, atomic/sync/wrapper, and channel mutations and re-runs that analysis after source edits. WHEN TO USE: Diagnosing state changes or auditing mutability. NOT TO USE: For field declarations (gograph_fields) or whole-struct initialization (gograph_literals). RETURNS: Mutation locations and indirect mutator method names when applicable.
ParameterTypeDescription
field *stringThe field name to search for mutations (e.g., 'Status')
gograph_nodeFetch AST metadata for a named symbol, package, or file: kind, file path, line number, full signature (a constant's declared value), doc comment, and struct fields if applicable. An exact case-sensitive name or selector selects only that declaration; substring matching applies only when nothing matches exactly. WHEN TO USE: When you need structural metadata (kind, signature, line number) without the full source body — lighter than gograph_source for metadata-only lookups. NOT TO USE: For full source code (use gograph_source); for call relationships (use gograph_callers/gograph_callees). RETURNS: Node properties array with kind, file, line, and signature; empty when the name is not found.
ParameterTypeDescription
name *stringThe exact symbol, package path, or Go file name to inspect (e.g., 'Graph', 'internal/search', 'server.go')
gograph_orphansFind functions and methods unreachable from runtime roots (main/init), test/benchmark/fuzz roots, HTTP route handlers, and eligible externally callable exports; exports confined under internal/ are not roots. Uses full BFS reachability. WHEN TO USE: During code cleanup or dead-code audits. NOT TO USE: For checking one symbol's usages (use gograph_usages or gograph_callers). RETURNS: Orphan symbols with package paths and file locations; empty means no unreachable code was detected.
gograph_pathFind the best call chain from one symbol to another. Competing paths rank exact before possible, then shorter, production before tests, typed resolution before heuristics, with a deterministic canonical tie-breaker. WHEN TO USE: To confirm reachability between non-adjacent symbols. NOT TO USE: For all transitive upstream callers (use gograph_impact). RETURNS: from, to, found, and steps[]; with mermaid=true, Mermaid flowchart text.
ParameterTypeDescription
from *stringThe starting symbol name
mermaidbooleanReturn Mermaid flowchart text instead of structured JSON
to *stringThe target symbol name
gograph_planGenerate a structured pre-edit plan for a target symbol: which symbols to read first, which tests cover them, which routes and env vars they touch, and whether the change is public-API or SQL-touching. Set with_context=true to inline full source+callers+callees for each symbol to inspect — eliminates follow-up gograph_context calls. WHEN TO USE: Before multi-file refactoring or architectural changes to understand scope upfront. NOT TO USE: For trivial single-line fixes; for post-edit verification (use gograph_review instead). RETURNS: JSON with inspect_first[], tests[], routes[], env[], and a risk object (public_api, touches_sql, etc.); with with_context=true, also includes inspect_contexts[] with full per-symbol bundles.
ParameterTypeDescription
symbolstringThe name of the symbol you intend to modify (supports short name 'ValidateToken', dot-notation 'graph.Graph', or fully-qualified ID)
uncommittedbooleanSet to true to generate a global plan for all currently uncommitted changes across the repository
with_contextbooleanIf set to true, bundles full context, source code, callers, callees, and architectural roles for each symbol to be inspected
gograph_publicList all exported (public) symbols of a specific package, including functions, methods, types/interfaces, variables, and constants. WHEN TO USE: When reviewing a package's public contract before changing it, building integration documentation, or checking what a package exposes to callers. NOT TO USE: For unexported/private symbols (use gograph_node or gograph_focus); for API drift detection against a baseline (use gograph_api). RETURNS: List of exported symbol names with kinds and file locations; empty when the package has no exports or is not found.
ParameterTypeDescription
package *stringThe package name or path to inspect (e.g., 'internal/auth')
gograph_querySearch the graph index for symbols, packages, files, and import edges that match one or more keyword substrings. Multiple terms use OR semantics, matching CLI `query term...`. WHEN TO USE: During initial exploration when you have a keyword or feature name but do not know its package. NOT TO USE: When you already know the exact symbol (use gograph_source or gograph_node); for package dependency trees (use gograph_deps). RETURNS: Matching symbols, files, and imports; empty when no terms match.
ParameterTypeDescription
no_testsbooleanExclude rows located in *_test.go files, matching CLI --no-tests
querystringAlias of term
termstringOne keyword search term (e.g. 'AuthService' or a route path such as '/api/v1/users/{id}')
termsarrayOptional list of keyword terms combined with OR semantics
gograph_returnusageShow how each caller uses the return value(s) of a named function: discarded, assigned, partially ignored, returned upstream, or passed directly to another call. WHEN TO USE: Before changing a function's return signature — see which callers ignore the error or only use some return values. NOT TO USE: For error propagation tracing (use gograph_errorflow); for finding all callers without usage detail (use gograph_callers). RETURNS: List of call sites with usage classification (discarded/assigned/partially_ignored/returned/passed); empty when the function has no callers.
ParameterTypeDescription
function *stringThe function name to analyse (e.g., 'ValidateToken')
gograph_reviewSummarize the scope and risk profile of a change: which symbols changed, which tests cover them, which routes and env vars they touch, and whether SQL is involved. Requires symbol, uncommitted=true, or since=<git ref>. WHEN TO USE: After editing — as a post-edit verification step before committing; confirms the blast radius matches expectations. Use uncommitted=true to review all current unstaged changes at once, or since=<ref> to review everything changed after that ref (commits plus uncommitted edits). NOT TO USE: For boundary constraint enforcement (use gograph_boundaries); for pre-edit planning (use gograph_plan). RETURNS: JSON with changed_symbols[], tests[], routes[], env[], errors[], and a risk object (public_api, touches_sql, touches_routes, touches_env).
ParameterTypeDescription
sincestringGit ref (e.g. 'HEAD~3', 'main'); review every declaration changed between it and the working tree
symbolstringThe name of the target symbol to run the design review for (e.g. 'AuthService')
uncommittedbooleanSet to true to review all uncommitted/modified changes in the repository
gograph_riskEvaluate the change risk profile of target symbol(s) or uncommitted changes. Combines blast radius, cyclomatic complexity, test coverage, and downstream environment/SQL dependencies into a normalized 0–100 risk score and verdict. Requires either symbol or uncommitted=true. WHEN TO USE: Before committing edits or when planning changes to understand the technical risk. NOT TO USE: For post-edit review checklist generation (use gograph_review); for pre-edit plan generation (use gograph_plan). RETURNS: JSON with title, results[] containing risk scores, verdicts, and breakdown metrics, and optional message.
ParameterTypeDescription
symbolstringThe name of the target symbol to run the risk evaluation for (e.g. 'AuthService')
uncommittedbooleanSet to true to evaluate risk for all uncommitted/modified changes in the repository
gograph_routesList a deterministic bounded page of HTTP routes with methods, URL patterns, handler names, and source locations. Production routes are returned by default; include_tests=true adds *_test.go registrations. Optional term matches method/path, handler, or file. module selects an exact module path/directory, a unique nested-module directory basename, or the repository directory name for a root module. limit defaults to 100 and is restricted to 1-200; next_cursor continues the same filtered census. Each page is also bounded to 64 KiB so the result stays directly consumable instead of spilling to an out-of-band file. Constant nested Gin/Echo/Fiber Group prefixes and Chi Route closure prefixes are composed; Gin/Fiber use the final variadic argument as the terminal handler, while Echo uses the handler immediately after the path. Dynamically computed prefixes remain unresolved. WHEN TO USE: To inventory one service/module or find a route before gograph_endpoint. NOT TO USE: For a handler's downstream call chain (use gograph_endpoint). RETURNS: gograph.routes.v1 JSON with total, returned, truncated, routes[], and next_cursor when more matches exist.
ParameterTypeDescription
cursorstringOpaque next_cursor from the previous gograph_routes result; reuse the same filters
include_testsbooleanInclude routes registered in *_test.go files; false by default
limitintegerMaximum rows in this page, 1-200 (default: 100); the 64 KiB byte budget may return fewer
modulestringOptional exact module path/directory, unique nested-module directory basename, or repository directory name for a root module (for example identuum-idp)
querystringAlias of term
termstringOptional case-insensitive substring matched against method/path, handler, or file. Path parameters match in any spelling: :id, {id}, and *id are equivalent
gograph_schemaFind Go structs that declare a mapping to a specific database table via struct tags (e.g., `db:"table_name"`, `gorm:"table:table_name"`). WHEN TO USE: When tracing which Go types represent a database table, or before writing a migration to understand the current ORM model. NOT TO USE: For non-tagged Go structs used as query results (use gograph_fields or gograph_query instead). RETURNS: Matching struct names with package paths and file locations; empty when no structs map to the named table.
ParameterTypeDescription
table *stringThe table or schema name to search for in struct tags (e.g., 'users', 'roles')
gograph_session_auditReview and grade agent compliance (Plan rule, Review rule, Composability/Efficiency) and tool success rates. Session IDs are strictly validated and only regular repository-confined logs are read. No additional prerequisite once the MCP server is running. WHEN TO USE: After ending a session to obtain compliance metrics and recommendations. RETURNS: Audited session details and grade.
ParameterTypeDescription
jsonbooleanSet to true to return structured JSON format instead of human-readable ASCII layout.
session_idstringOptional session ID to audit. If not supplied, audits the most recent session in the repository.
gograph_session_cleanupArchive stale and inactive session telemetry without following linked repository paths; never deletes. Each pass moves files into .gograph/_to_delete/<UTC time>_<suffix>/. First ends other callers' CLI-owned sessions idle past the idle limit (GOGRAPH_SESSION_IDLE_LIMIT, default 2h) or MCP-owned sessions whose server process exited on this host (owners without metadata or on another host are kept), listing each, and archives an unselected legacy active_session.json; then archives logs with end records; preserves the selected active log and refuses while any other caller is still live. MCP annotations mark this operation mutating and destructive. No prerequisites. WHEN TO USE: Call after auditing to keep the repository clean. RETURNS: Each ended session, any archived legacy pointer, and the number of session logs moved with the archive folder, or Nothing to archive.
gograph_session_createStart a telemetry audit session for tracking agent compliance and tool success metrics. Writes only regular, repository-confined session state under .gograph/sessions and refuses linked storage; MCP annotations mark it mutating and non-idempotent. No prerequisites once the MCP server is running. WHEN TO USE: Call once at the start of a multi-step coding task to track your work. Pass the returned ID as session_id on this caller's later requests. An intention given here becomes the session's default: later calls that omit intention use it. Independent callers may create alongside other active sessions. RETURNS: Message with the caller session ID.
ParameterTypeDescription
custom_wordstringOptional word prefix for the session ID; only letters, digits and underscores are kept ('fix-parser' becomes 'fixparser')
gograph_session_endEnd only the explicitly selected caller session, append its end record, and remove its active marker through repository-confined regular-file operations. MCP annotations mark it mutating and non-idempotent. No additional prerequisite once the MCP server is running. WHEN TO USE: Call once after you have completed all edits and post-edit reviews. NOT TO USE: When no session is active. RETURNS: Message confirming ending of the session.
gograph_skeletonEmit API signatures with function bodies stripped — struct definitions, interface declarations, and function/method signatures only. Supply file for one exact repository-relative indexed file (its output also starts with the file's import block); omit it for the full repository. Unknown files return an error. WARNING: whole-repository output can be very large. WHEN TO USE: For a file's declarations or a compact map of the entire codebase's shape. NOT TO USE: For full implementations (use gograph_source); for a single package (use gograph_public). RETURNS: Multi-line text of stripped declarations and package names.
ParameterTypeDescription
filestringOptional repository-relative indexed file; selects only that file's package, import block and declarations. Unknown files are errors, never a repository fallback.
gograph_sourceRetrieve verbatim Go source for a named function, method, struct, interface, type, variable, or constant, including complete bodies or declarations. Source reads are confined to regular .go files beneath the analyzed repository and reject symlink path components. WHEN TO USE: When you need a specific implementation or declaration in full without loading a large file. NOT TO USE: For call hierarchy information (use gograph_callers/gograph_callees); for AST metadata without the full source (use gograph_node). RETURNS: Raw Go source blocks with file paths and line numbers. The text carries the source or a named refusal: absent symbol, ambiguity with candidates, unsafe/unreadable source, invalid indexed range, or source exceeding 65536 bytes (with its size). With `lines` (START-END, file line numbers) it returns only that part of the declaration, so a region of a body over the budget can be read; `symbol` may then also be an indexed .go file path (e.g. 'internal/app/manager.go') to read any region of that file, including its import block.
ParameterTypeDescription
linesstringOptional file line range START-END (1-based, inclusive). Limits the answer to those lines of the declaration, or of the file when symbol is a .go path
symbol *stringThe name of the symbol to retrieve source for (supports short name 'ValidateToken', dot-notation 'graph.Graph', full ID, or Type.Field); a .go path or unique file name: its outline, with lines a region
gograph_sqlReturn one bounded gograph.sql.v1 page of static PostgreSQL query literals with operation, read/write/DDL access, referenced tables, enclosing function, module ownership, and source location. Extraction covers direct literals plus statically resolvable local or same-file package const/var declarations, straight-line assignments, and bounded string concatenations. Filters in different categories AND-compose; repeated values within tables, verbs, and accesses OR-compose. Tests remain included by default for backward compatibility; set no_tests=true for production-only results. CTEs resolve to their actual operation, data-modifying CTEs retain write access/table evidence, PostgreSQL UPSERT remains INSERT, and unsupported classification is explicit rather than guessed. WHEN TO USE: Audit database interactions, write paths, or queries touching a table. NOT TO USE: For ORM struct mappings (use gograph_schema) or runtime-generated SQL that is not a static literal. RETURNS: A deterministic page with total/returned/truncated/next_cursor and queries[].
ParameterTypeDescription
accessesarrayOptional statement access classes; values OR-compose
cursorstringOpaque next_cursor from the previous gograph_sql page; reuse the same filters
functionstringOptional case-insensitive enclosing-function substring
limitintegerPage size from 1 to 200; defaults to 100
modulestringOptional exact module path/directory, unique nested basename, or repository basename for a root module
no_testsbooleanExclude SQL facts from *_test.go files; tests are included by default
tablesarrayOptional PostgreSQL table selectors; values OR-compose and may be table or schema.table
termstringOptional case-insensitive raw SQL substring filter
verbsarrayOptional PostgreSQL operation filters; values OR-compose
gograph_staleCheck whether the trusted persisted graph index loaded from a regular, repository-confined .gograph/graph.json differs from the current selected-file inventory, effective Go build context, or selected source content digests. Modification times are returned only as diagnostics; legacy indexes without digests temporarily use the former mtime fallback until rebuilt. This tool intentionally does not refresh first; when the artifact is missing, unreadable, unsafe, or uses an unsupported source policy it compares against the startup auto-build fallback. WHEN TO USE: To decide whether CLI snapshot analysis or precise enrichment needs rebuilding. NOT TO USE: For module dependency freshness; for changed symbols (use gograph_changes). RETURNS: is_stale, graph_age, newest source metadata, changed_files, and build_context_changed.
gograph_statsReport trusted persisted-index health and counts without refreshing source analysis, or startup-fallback health when graph.json is missing, unreadable, unsafe, or uses an unsupported source policy: schema/build timestamps, complete/partial status, ast/precise/precise_fallback analysis status, scanned/parsed/reused/rebuilt-package/failure counts, and graph entity totals. WHEN TO USE: To validate the snapshot/fallback before relying on its data. NOT TO USE: For a live symbol profile (use gograph_node or gograph_complexity). RETURNS: Structured build health and repository counts.
gograph_stringsSearch Go string literals in the indexed source files for one or more case-insensitive substrings (OR semantics), returning file, line, the literal, and its enclosing function. Route-shaped terms match any path-parameter spelling (:id, {id}, *id). Source is read through the confined repository reader; unreadable files are named in a warning. WHEN TO USE: To find raw route strings, URLs, SQL fragments, header names, or messages that are not symbols, instead of grep. NOT TO USE: For symbols (use gograph_query) or registered routes with handlers (use gograph_routes). RETURNS: gograph.results.v1 rows of kind string with total/returned/truncated/next_cursor.
ParameterTypeDescription
cursorstringOpaque next_cursor from the previous gograph_strings result
limitintegerMaximum rows in this page
no_testsbooleanExclude *_test.go files
querystringAlias of term
termstringSubstring to find inside string literals (e.g. '/api/setup/license')
termsarrayOptional list of substrings combined with OR semantics
gograph_summarySingle-call codebase briefing: top 3 hotspots (most-called symbols), worst instability package, highest cyclomatic complexity function, total orphan count, and god-object count. WHEN TO USE: At the very start of any session — replaces running gograph_hotspot + gograph_coupling + gograph_orphans + gograph_complexity + gograph_godobj separately (5 calls → 1). NOT TO USE: For detailed drill-down into a specific metric (use the dedicated tool after reviewing summary). RETURNS: JSON with symbols, packages, hotspots[], worst_instability, top_complexity, orphan_count, and god_object_count.
gograph_testsFind test functions in *_test.go files that statically exercise a named symbol, or list all attributed test edges when no symbol is given. Direct mode accepts Receiver.Method (including pointer receivers) or a full stable symbol ID. By default this preserves the direct-edge result contract. Set transitive=true with a required symbol to return gograph.tests.v1 reverse attribution: a summary of every reaching test by depth and resolution, then one page (default 50, nearest first, with total, truncated and next_cursor) of tests with exact/possible resolution, depth, and a representative stable-ID path; max_depth keeps only nearby tests; exact_only omits uncertain paths and package disambiguates the selected product symbol. WHEN TO USE: To choose which tests to run after an edit (uncommitted=true); before editing a function — use transitive=true for router/callback-mediated coverage and direct mode for concrete test call sites. NOT TO USE: For test helper infrastructure (use gograph_fixtures); for running tests or proving runtime coverage. Set uncommitted=true, since=<ref>, or select=true with a symbol to get gograph.test_selection.v1: the tests to run for a change, grouped per package, each with an anchored go test -run pattern and ready go test commands (with the graph's build tags). RETURNS: Direct result rows by default, or a versioned reverse-transitive report or test selection when requested.
ParameterTypeDescription
cursorstringWith transitive=true: next_cursor from the previous page
exact_onlybooleanWith transitive=true, omit paths containing possible edges
limitintegerWith transitive=true: tests per page, nearest first (default 50; 0 returns all)
max_depthintegerWith transitive, select, uncommitted or since: keep tests whose shortest call path is at most this long; 0 or omitted is unlimited
packagestringPackage name or import path: picks the symbol (transitive/select) or keeps its tests (uncommitted/since)
selectbooleanWith symbol: return gograph.test_selection.v1, the tests to run grouped per package with an anchored go test -run pattern and ready commands
sincestringGit ref (e.g. 'main', 'HEAD~1'): select the tests to run for all changes since this ref (gograph.test_selection.v1)
symbolstringThe symbol name to find tests for (optional)
transitivebooleanReturn reverse-transitive test attribution; requires symbol
uncommittedbooleanSelect the tests to run for all uncommitted changes (gograph.test_selection.v1)
gograph_traceAlias for gograph_errorflow. Refreshes in-memory source analysis, then traces an error string heuristically from its definition up through the call chain to HTTP handlers. WHEN TO USE: Prefer gograph_errorflow; this alias exists for compatibility. RETURNS: The same structured output as gograph_errorflow.
ParameterTypeDescription
no_testsbooleanIf true, skip collecting related test functions
term *stringError string or symbol name to trace (e.g. 'ErrNotFound', 'permission denied')
gograph_uncoveredChanged lines of non-test Go files that a go test -coverprofile run never executed, as exact line ranges per file (gograph.uncovered.v1). Lines outside coverage blocks are never reported; changed files without profile data are listed separately. WHEN TO USE: After running tests with -coverprofile, to see which lines of your change no test executed. RETURNS: files with uncovered ranges, changed and uncovered line counts.
ParameterTypeDescription
coverprofile *stringRepository-relative go test -coverprofile file
sincestringGit ref: compare the working tree with this ref
uncommittedbooleanCompare the working tree with HEAD, including untracked files
gograph_untestedSweep the full graph in one pass and return called production functions and methods without an exact transitive static path from any test. Precise direct calls and proof-backed concrete interface receivers are exact; open CHA or parser-only paths propagate possible to descendants, which remain visible with test_resolution=possible and possible_test_count. Repeatable CLI --exclude globs map to the MCP exclude string array and match repository-relative source paths lexically. This is static attribution, not runtime coverage proof. WHEN TO USE: During test census or pre-release hardening; it replaces N forward coverage or direct gograph_tests probes. NOT TO USE: For running tests or proving branch execution. RETURNS: JSON rows sorted by caller_count with stable_id, name, kind, file, line, caller_count, package, test_resolution, and optional possible_test_count.
ParameterTypeDescription
coverprofilestringRepository-relative go test -coverprofile file (merged profiles allowed): report production functions with no executed statement instead; the response then is {summary, results}
excludearrayRepository-relative path globs to exclude; use prefix/** for all descendants
exclude_interface_methodsbooleanSkip methods implementing an interface method (Error, String, MarshalJSON, or a repository interface); the response then is {summary, results} with the skipped count
pkgstringOptional package name substring to filter results (e.g. 'cli', 'search')
topintegerLimit results to top N by caller count (default: 20, 0 = all)
gograph_usagesFind every place a named Go type appears in function parameter lists, return type signatures, struct field or interface method declarations, and composite-literal construction. WHEN TO USE: Before changing an interface or type definition. NOT TO USE: For call sites of a function (use gograph_callers); use gograph_literals when only struct Foo{...} initialization sites are needed; for all transitive callers use gograph_impact. Also answers struct fields: 'Type.Field', 'pkg.Type.Field', or a bare field name returns the declaration plus every field_read, field_write, field_address, and field_literal site, attributed to the declaring struct so promoted fields resolve; typed rows come from precise builds of production packages, while AST graphs return labelled name-only possible_field_use rows. RETURNS: File and line of each place the type or field appears.
ParameterTypeDescription
no_testsbooleanDrop test-file rows (CLI --no-tests)
type *stringThe type name (e.g., 'AuthService') or struct field ('Config.Limit', or a bare field name) to search for
gograph_wikiGenerate the llm-wiki/ directory of machine-first markdown pages from the static graph. Pages produced: overview.md, architecture.md, hotspots.md, routes.md, env.md, errors.md, concurrency.md, api-surface.md, and one packages/<name>.md per internal package. A relative output is anchored beneath the graph root and rejects linked components; an absolute output explicitly selects a local destination whose final directory must be real. Generated page paths and regular-file writes remain confined beneath the selected output root. Writes may overwrite existing regular files; MCP annotations mark it mutating and destructive. WHEN TO USE: At the start of an agent session on an unfamiliar codebase — run once to get a token-efficient orientation without issuing dozens of individual tool calls. NOT TO USE: For targeted symbol lookups (use gograph_context or gograph_source). RETURNS: JSON manifest of written page filenames and a count; error when the graph cannot be loaded or the output directory is unsafe or cannot be created.
ParameterTypeDescription
outputstringWiki directory: relative paths are graph-rooted; an absolute path explicitly selects a real local output root (default 'llm-wiki')

Security checks

  • ✓README presentThe repository's README runs to about 6.4K words.
  • ✓License declaredThe repository declares the MIT license.
  • ✓Tests presentA test suite exists in the repository.
  • ✓Dependencies pinnedA lockfile pins dependency versions.
  • !No dynamic code executionScanned 202 source files and found 1 call to eval or shell execution, in internal/validation/policy_predicates.go. Review how tool inputs reach them before granting credentials.

1 check has not been run yet.

Releases

v1.7.21v1.7.21 · 17 Nov 2026Windows binaries are no longer built or published; macOS and Linux targets are unchanged. Changelog bccd03b4f47d8d34943385e4c746ae4de314d18c Add gograph whatsnew: release notes for the running binary…
v1.7.20v1.7.20 · 16 Nov 2026Windows binaries are no longer built or published; macOS and Linux targets are unchanged. Changelog fff52edfb406ce5c7b3fe3fda50945409961f740 CI: cache the Grype database, warm main's Go cache, pin ubuntu-26.04…
v1.7.19v1.7.19 · 13 Nov 2026Windows binaries are no longer built or published; macOS and Linux targets are unchanged. Changelog 451e8ee0f133112f9c6e28a8fca297c351726456 Bump version: 1.7.18 → 1.7.19 f2726e44a57447109e8255f900ac9858f4627880 CI: skip producer runs…
v1.7.18v1.7.18 · 4 Nov 2026Windows binaries are no longer built or published; macOS and Linux targets are unchanged. Changelog 04ea0ca65298c6eaed1039ec3de4f8f0d5bdf1b4 Bump version: 1.7.17 → 1.7.18 aa8e6382dd83072c8800a9f9406040b0c33d8c35 Credit unselected…
v1.7.17v1.7.17 · 4 Nov 2026Windows binaries are no longer built or published; macOS and Linux targets are unchanged. Changelog 5c4a471328781bee082091035f7bffb23d12482b Bump version: 1.7.16 → 1.7.17 15c90a2afc7cfa112d8f89c48fa25c80b78fa4a5 Date the 1.7.17 release…

README

The repository's README runs to about 6.4K words, fetched 13 days ago. The original in the repository is authoritative.

Read full README
Questions

About ozgurcd/gograph

How do I install ozgurcd/gograph?

No package has been published for this server, so install it from source: clone the repository and follow its README.

Is ozgurcd/gograph safe to use with an AI agent?

Its trust score is 76 out of 100 (good). It passes 4 of the 5 static checks Conduid ran on the repository; it does not pass No dynamic code execution. It has no ConduID identity yet, so agent calls to it are not receipted.

Is ozgurcd/gograph still maintained?

Yes — the latest release is v1.7.21 (17 Nov 2026), and the last commit was yesterday. The repository has 234 stars.

What tools does ozgurcd/gograph provide?

Conduid read 70 tools from the source: gograph_api, gograph_arity, gograph_boundaries, gograph_boundaries_create, gograph_callees, gograph_callers, gograph_capabilities, gograph_changes and 62 more. 63 of them publish their parameters, listed under Tools above.

What license is ozgurcd/gograph released under?

The repository declares the MIT license. That applies to the latest release, v1.7.21, as well.