Skip to content

MCP API Reference

Explore Maguyva's 11 MCP tools, their parameters, and when to use each. Check your connected client's tools/list response for the arguments available to you.

API Overview

#

The tools are organized into 4 categories:

  • Core Search Tools - Advanced search capabilities across your codebase
  • Structural & Graph Tools - AST queries, symbol lookup, and dependency analysis
  • Code Analysis Tools - Deep code analysis and relationship mapping
  • System & Utility Tools - Repository context, tool guidance, and feedback

For tools that accept a repository, use this repository identifier format: "owner/repo:branch". Branch defaults to main if not specified.

Omit repository when your MCP client supplies a request default or the key can access exactly one repository; otherwise pass it explicitly. Use repository_context(action="info", repository="owner/repo") to inspect how a repository resolves.

Repository Parameter Format

#

Use these formats when specifying a repository:

  • With branch: "owner/repo:branch" - e.g., "owner/repository:develop"
  • Default branch: "owner/repo" - uses main branch when no branch is specified "owner/repository"
  • Request or sole-repository default: Omit repository when the MCP client supplies a request default or the key can access exactly one repository; otherwise pass it explicitly

Example prompts:

Ask about a specific repo:  "Search owner/my-repo for authentication middleware"
List accessible repos:      "What repositories can this Maguyva key access?"
Override for one query:     "Search owner/other-repo:develop for auth patterns"

Language Filtering

#

Use language_filter on supported search modes. For text_pattern_search, choose search_scope="content"; for get_task_context, use scope="semantic" without seeds or related context.

  • language_filter="python" - Filter to Python files only
  • language_filter="typescript" - Filter to TypeScript files only
  • Case-sensitive: Use lowercase language names
  • Default: Empty string (no filtering) - returns results from all languages
  • Supported coverage: Language filters work across the full 285+ supported languages and text-based technologies. See compatibility for the full list.
"Find authentication middleware in Python files only"
"Search for database connections in TypeScript"

API reference generated from source on October 21, 2026.

Core Search Tools

#

Start here for any codebase question. Default auto/balanced routes confident definition queries to structural search, reference/impact queries to graph, and exact-match queries to text; other queries use semantic plus text. mode=hybrid or auto with quality=thorough runs all four modalities. An explicit mode takes precedence over quality. language_filter omits graph from auto/hybrid and rejects explicit mode=graph. Prefer this over Grep/Glob when you do not already know the path.

Parameters:

query Required
Type
str minLength=1
Description
Search query
repository Optional
Type
str
Description
Repository as owner/repo[:branch]. Optional — omit to use the request-scoped client default (when supplied) or the sole accessible repository; pass explicitly only to target a different indexed repo. Exact indexed branches are preferred; an unavailable branch may fall back to main or the sole accessible branch. Response metadata shows requested and resolved identity and warns on fallback.
mode Optional
Type
Literal[auto, hybrid, semantic, text, structural, ast, graph]
Default
auto
Description
Search mode
limit Optional
Type
int minimum=1, maximum=50
Default
10
Description
Maximum results in this ranked top-K window
language_filter Optional
Type
str
Description
Language filter
path_filter Optional
Type
str
Description
Filter retrieval candidates by file path prefix. Graph neighbors and attached community context may include files outside this prefix.
boost_by_importance Optional
Type
bool
Default
false
Description
Opt-in: re-rank by centrality using per-symbol graph metrics (is_articulation_point, bridge_count, k_core, centrality, etc.). Default off for agent-safe ranking (global hubs can drown implementation hits); enable for architecture tours. Applies across all 4 modalities when each result carries symbol linkage.
branch Optional
Type
str
Description
Branch override
quality Optional
Type
Literal[quick, balanced, thorough]
Default
balanced
Description
Search quality preset
include_content Optional
Type
bool
Default
true
Description
Include content in results
explain_routing Optional
Type
bool
Default
false
Description
Include routing decision explanation
importance_weight Optional
Type
float minimum=0, maximum=1
Default
0.3
Description
Weight for importance boosting (0=none, 1=full)
orphans Optional
Type
bool
Default
false
Description
Include orphan symbols (no incoming references)
include_community_context Optional
Type
bool
Default
false
Description
Include related symbols from same code community
community_depth Optional
Type
int minimum=1, maximum=3
Default
1
Description
Depth of community context expansion
graph_view Optional
Type
Literal[dependency, type, data_flow, control_flow]
Default
dependency
Description
Graph view for metrics
seed_symbol_ids Optional
Type
list[str] maxItems=20
Description
Tier-1 task seeds: symbol IDs central to the current task. When set, re-ranks fused hits by Approach A depth-decay proximity (exact seed match + graph-edge hops). Additive — omit for global ranking.
seed_file_paths Optional
Type
list[str] maxItems=10
Description
Tier-1 task seeds: indexed file paths the agent has open or just edited. When set, re-ranks fused hits by path proximity with 1/(1+d) depth-decay (same file → same dir → nearby packages). Additive — omit for global ranking.

Best For:

  • Index-wide or cold-start exploration when the right tool is unclear
  • Multi-modal fused ranking across semantic, text, structural, and graph

Not Recommended For:

  • A known symbol name — use find_symbol directly
  • A known path on disk — use local Read/Grep first

Find code by meaning, not exact text. Use for conceptual queries like "retry logic" or "user onboarding flow" when you don't know the keyword or symbol name. Returns relevant chunks with bounded file diversity; graph-importance re-ranking is opt-in via boost_by_importance. Prefer over Grep when the search is conceptual.

Parameters:

query Required
Type
str minLength=1
Description
Search query (conceptual, meaning-based)
repository Optional
Type
str
Description
Repository as owner/repo[:branch]. Optional — omit to use the request-scoped client default (when supplied) or the sole accessible repository; pass explicitly only to target a different indexed repo. Exact indexed branches are preferred; an unavailable branch may fall back to main or the sole accessible branch. Response metadata shows requested and resolved identity and warns on fallback.
limit Optional
Type
int minimum=1, maximum=50
Default
5
Description
Maximum results in this ranked top-K window
similarity_threshold Optional
Type
float minimum=0, maximum=1
Default
0.6
Description
Minimum similarity score
language_filter Optional
Type
str
Description
Language filter (python, typescript, etc.)
path_filter Optional
Type
str
Description
Filter by file path prefix
boost_by_importance Optional
Type
bool
Default
false
Description
Opt-in: re-rank by normalized per-symbol graph importance (default off; capped at 1.5x similarity)
branch Optional
Type
str
Description
Branch override (default: from repository param or main)
include_content Optional
Type
bool
Default
true
Description
Include chunk content in results
graph_view Optional
Type
Literal[dependency, type, data_flow, control_flow]
Default
dependency
Description
Graph view for metrics

Best For:

  • Conceptual queries ("how does auth work?", "caching strategy")
  • Cross-package similarity search

Not Recommended For:

  • A known symbol name — use find_symbol instead
  • Exact strings or error messages — use text_pattern_search

Search indexed content. Exact and regex modes grep the full file/blob corpus; fuzzy content mode searches the bounded semantic chunk corpus. File and symbol scopes are trigram-only — default mode=exact is coerced to fuzzy. Language/case/custom-threshold controls require content scope. File path filtering uses a bounded candidate window and reports incomplete coverage. Use local Grep for a tight directory already on disk.

Parameters:

query Required
Type
str minLength=1
Description
Text pattern to search for
repository Optional
Type
str
Description
Repository as owner/repo[:branch]. Optional — omit to use the request-scoped client default (when supplied) or the sole accessible repository; pass explicitly only to target a different indexed repo. Exact indexed branches are preferred; an unavailable branch may fall back to main or the sole accessible branch. Response metadata shows requested and resolved identity and warns on fallback.
mode Optional
Type
Literal[fuzzy, exact, regex]
Default
exact
Description
Search mode. Regex executes PostgreSQL advanced/POSIX syntax; use \y for word boundaries (\b means backspace). Patterns also pass a JavaScript safety validator, so PostgreSQL-only constructs such as inline (?i) flags are rejected; use case_sensitive instead.
search_scope Optional
Type
Literal[content, symbols, files]
Default
content
Description
What to search
limit Optional
Type
int minimum=1, maximum=50
Default
5
Description
Maximum results per page without cursor. Continuation uses the page size stored in cursor; omit cursor to start with a different limit.
offset Optional
Type
int minimum=0
Description
Deprecated compatibility offset. Prefer cursor from pagination.next_cursor.
cursor Optional
Type
str
Description
Opaque cursor from pagination.next_cursor. Pass it unchanged and keep the query and filters unchanged. Its position and page size override offset and limit.
language_filter Optional
Type
str
Description
Language filter
path_filter Optional
Type
str
Description
Filter by file path prefix
case_sensitive Optional
Type
bool
Default
false
Description
Case-sensitive matching
branch Optional
Type
str
Description
Branch override
fuzzy_algorithm Optional
Type
Literal[hybrid, trigram, levenshtein]
Default
hybrid
Description
Fuzzy matching algorithm
threshold Optional
Type
float minimum=0, maximum=1
Default
0.05
Description
Minimum similarity threshold for fuzzy
semantic_fallback Optional
Type
bool
Default
false
Description
Try semantic search after an empty first lexical page; metadata.fallback_status distinguishes used, empty, and unavailable fallback

Best For:

  • Exact strings, error messages, and regex
  • Trigram fuzzy matching for near-miss text

Not Recommended For:

  • A known path on disk — prefer local Grep
  • Conceptual queries — use semantic_search

Structural & Graph Tools

#

Prefer preset=functions|classes|methods|imports|variables (or free pattern=). Find code by AST shape (not text). Mid-tier filters: name_pattern, node_type, decorator, parent_child. Path/ltree/call filters are advanced — set advanced=true when using them deliberately. Without it, advanced filters are applied with a metadata warning. Supply at least one structural selector.

Parameters:

repository Optional
Type
str
Description
Repository as owner/repo[:branch]. Optional — omit to use the request-scoped client default (when supplied) or the sole accessible repository; pass explicitly only to target a different indexed repo. Exact indexed branches are preferred; an unavailable branch may fall back to main or the sole accessible branch. Response metadata shows requested and resolved identity and warns on fallback.
preset Optional
Type
Literal[functions, classes, methods, imports, variables]
Description
Preferred structural selector. Expands to cross-language AST node types — functions (function/arrow/method definitions across languages); classes (class/struct/interface declarations, type bodies, and implementations); methods (method definitions (and function_definition for languages without a method node)); imports (import/use/include statements); variables (variable/let/const/static declarations). Prefer over free-form pattern/node_type for browse-style queries.
pattern Optional
Type
str
Description
Free-form pattern fills missing selectors (auto-detected: 'def foo(' → node_type + name_pattern). May combine with preset; explicit selectors take precedence. Prefer preset= for browse queries.
name_pattern Optional
Type
str maxLength=256
Description
Symbol name pattern (shell wildcard, bounded POSIX regex, or fuzzy text; max 256 characters)
node_type Optional
Type
str
Description
AST node type (function_definition, class_definition, etc.) — prefer preset= for common shapes
decorator Optional
Type
str
Description
Decorator name filter
base_class Optional
Type
str
Description
Base class filter
language_filter Optional
Type
str
Description
Language filter (python, typescript, etc.)
limit Optional
Type
int minimum=1, maximum=50
Default
20
Description
Maximum results per page without cursor. Continuation uses the page size stored in cursor; omit cursor to start with a different limit.
offset Optional
Type
int minimum=0
Description
Deprecated compatibility offset. Prefer cursor from pagination.next_cursor.
cursor Optional
Type
str
Description
Opaque cursor from pagination.next_cursor. Pass it unchanged and keep the query and filters unchanged. Its position and page size override offset and limit.
path_filter Optional
Type
str
Description
Filter by file path prefix
branch Optional
Type
str
Description
Branch override
query_type Optional
Type
Literal[node_type, name_pattern, parent_child]
Description
Explicit query type
parent_type Optional
Type
str
Description
Parent AST node type filter
relationship Optional
Type
Literal[parent, ancestor]
Default
parent
Description
For parent_child queries: direct parent only, or any ancestor (use ancestor for class methods nested under a class body/block)
has_modifier Optional
Type
str
Description
Filter by modifier (export, async, static, etc.)
advanced Optional
Type
bool
Default
false
Description
Set true when intentionally using advanced path/ltree/call filters (ltree_ancestor, ltree_descendant, min_depth, max_depth, field_role, definition_name, callee_text, callee_name). When false, supplied advanced filters are applied with a metadata warning. Prefer preset= for common structural queries.
callee_text Optional
Type
str
Description
Advanced — prefer preset=functions|classes|methods|imports|variables. Call expression callee text filter. Set advanced=true when intentionally using path/ltree/call filters.
callee_name Optional
Type
str
Description
Advanced — prefer preset=functions|classes|methods|imports|variables. Call expression callee name filter. Set advanced=true when intentionally using path/ltree/call filters.
field_role Optional
Type
str
Description
Advanced — prefer preset=functions|classes|methods|imports|variables. AST field role filter. Set advanced=true when intentionally using path/ltree/call filters.
ltree_ancestor Optional
Type
str
Description
Advanced — prefer preset=functions|classes|methods|imports|variables. AST ltree ancestor path filter. Set advanced=true when intentionally using path/ltree/call filters.
ltree_descendant Optional
Type
str
Description
Advanced — prefer preset=functions|classes|methods|imports|variables. AST ltree descendant path filter. Set advanced=true when intentionally using path/ltree/call filters.
definition_name Optional
Type
str
Description
Advanced — prefer preset=functions|classes|methods|imports|variables. Definition name filter. Set advanced=true when intentionally using path/ltree/call filters.
min_depth Optional
Type
int
Description
Advanced — prefer preset=functions|classes|methods|imports|variables. Minimum AST depth. Set advanced=true when intentionally using path/ltree/call filters.
max_depth Optional
Type
int
Description
Advanced — prefer preset=functions|classes|methods|imports|variables. Maximum AST depth. Set advanced=true when intentionally using path/ltree/call filters.

Best For:

  • AST-level structure: classes, decorators, function/method presets
  • Finding code by shape rather than by text

Not Recommended For:

  • Plain-text or conceptual queries — use semantic_search or intelligent_search

Primary blast-radius / graph surface. Answer "what calls this?" / "what does this use?" via the real call/import graph. For impact before edit: analysis_type="dependents" or analysis_type="impact" (incoming, shallow default for impact), include_metrics=false by default (opt in for centrality + refactor_risk). Dependents/impact include production_callers by default: unique production usage sites by kind (call, instantiate, value_reference for functions passed as values) plus IMPORT sites, tests excluded, EXTRACTED/INFERRED confidence — not a metrics dump. PR/diff impact: pass changed_paths and/or patch (unified diff) — resolves symbols per path and returns a compact shallow-incoming dependents payload without requiring a symbol name. After an edit, set verify_after_edit=true with targets and/or changed_paths for a compact multi-root re-query of impacted symbols. Also supports dependencies, centrality, and orphans. analyze_dependencies uses the same traversal for multi-hop impact analysis.

Parameters:

repository Optional
Type
str
Description
Repository as owner/repo[:branch]. Optional — omit to use the request-scoped client default (when supplied) or the sole accessible repository; pass explicitly only to target a different indexed repo. Exact indexed branches are preferred; an unavailable branch may fall back to main or the sole accessible branch. Response metadata shows requested and resolved identity and warns on fallback.
query Optional
Type
str
Description
Symbol name or search term
target Optional
Type
str
Description
Symbol name (alias for query)
symbol_id Optional
Type
UUID
Description
Choose a specific UUID occurrence among the named query/target candidates after namespace, path and language filtering. Use an ID returned by find_symbol or graph alternates. Named traversal only; an ID outside the bounded candidate window errors.
changed_paths Optional
Type
list[str] maxItems=50
Description
Exact repo-relative file paths for PR/diff impact (default) or, with verify_after_edit=true, post-edit verify roots. Unresolved paths may return labelled suggestions; suggested files never become impact roots. PR/diff: without line info, walks each path's top-level definitions (exported first, file order) and reports changed_lines_unknown; pass patch= for line-level changed symbols. Verify: up to 5 top-level definitions per path as verify roots (capped lower inside verify mode). Does not require query/target for PR/diff impact.
patch Optional
Type
str maxLength=500000
Description
PR/diff impact: unified diff / git patch text. Paths come from diff --git / --- / +++ headers; hunk lines (old side = the indexed commit) map to the enclosing functions/methods/classes, which are walked for exact dependents, public_api_changed and the callers the diff does not touch.
head_commit Optional
Type
str pattern=^[0-9a-fA-F]{7,64}$
Description
Commit SHA of the code you are asking about (git rev-parse HEAD, or the base commit of the patch). complete:true requires the index to be at this commit and built by the current resolver; otherwise complete stays false with index_stale / index_freshness_unverified / index_built_by_older_resolver and index_basis.statement says what the answer is complete within. A patch's 'base-commit:' line (git format-patch --base) also supplies it.
analysis_type Optional
Type
Literal[centrality, dependencies, dependents, impact, orphans]
Default
dependencies
Description
Analysis mode. impact = blast radius (incoming dependents; shallow depth when depth omitted). dependents also answers impact. When changed_paths or patch is set, analysis is forced to PR/diff impact. centrality/orphans do not require a target. Orphans are unused-code candidates, not proof of safe removal; verify source references.
depth Optional
Type
Literal[shallow, balanced, deep]
Description
Traversal depth. Defaults to balanced; impact and PR/diff impact default to shallow. Explicit depth overrides these defaults. Verify mode always uses shallow.
limit Optional
Type
int minimum=1, maximum=50
Default
20
Description
Maximum results per page without cursor. Continuation uses the page size stored in cursor; omit cursor to start with a different limit.
offset Optional
Type
int minimum=0
Description
Deprecated compatibility offset. Prefer cursor from pagination.next_cursor.
cursor Optional
Type
str
Description
Opaque cursor from pagination.next_cursor. Pass it unchanged and keep the query and filters unchanged. Its position and page size override offset and limit.
path_filter Optional
Type
str
Description
Restrict target symbol resolution by file path prefix; returned graph relationships may cross outside that path
language_filter Optional
Type
str
Description
Filter target resolution and browse results by language
direction Optional
Type
Literal[outgoing, incoming, both]
Description
Traversal direction (overrides analysis_type inference)
relationship_types Optional
Type
list[str]
Description
Filter edge types (CALL, IMPORT, INHERITS_FROM, etc.). A non-empty list overrides graph_view defaults.
exclude_test_paths Optional
Type
bool
Default
true
Description
Default true: exclude test, fixture, vendor, and example paths from traversal and centrality results. Set false to include them. Orphan analysis honours this only where the deployed backend supports it; otherwise it keeps its own stricter noise exclusions and reports the adjustment.
exclude_generated_paths Optional
Type
bool
Default
false
Description
Exclude generated declarations plus build, coverage, cache, source-map, and minified artifact paths from traversal results
include_module_symbols Optional
Type
bool
Default
false
Description
Default false: drop edges whose from_name or to_name is the synthetic __module__ symbol (module-level noise). Set true to include module-level edges in dependents/dependencies results.
include_isolated Optional
Type
bool
Description
Orphans only. Default false. Set true to also return symbols with no graph-metrics row (zero graph edges anywhere). While exclude_test_paths is true, stylesheet/markup/data symbols (CSS, HTML, ...), .d.ts declarations and test/fixture/vendor/example paths stay excluded where the backend supports it, unless language_filter names that language; TypeScript object-literal properties can still appear as isolated functions
exclude_exported Optional
Type
bool
Default
false
Description
Orphans only. Default false: exported symbols (public API) that nothing in the repository uses are returned with is_exported=true. Set true for internal-only candidates.
branch Optional
Type
str
Description
Branch override
per_hop_limit Optional
Type
int minimum=1, maximum=300
Description
Maximum relationships per hop (1-300)
include_metrics Optional
Type
bool
Default
false
Description
Opt-in graph metrics on result rows (compacted with refactor_risk). Metrics are also fetched internally when min_centrality>0 but not returned unless this is true.
metrics_detail Optional
Type
Literal[summary, full]
Default
summary
Description
When include_metrics=true: summary (default) returns decision signals + refactor_risk; full returns the larger curated metric set
include_edge_metadata Optional
Type
bool
Default
false
Description
Include raw edge metadata and weights (large). Compact impact payloads leave this off.
symbol_types Optional
Type
list[str]
Description
Filter returned symbols by kind (function, class, method, etc.). Not supported in orphan analysis; use path_filter or language_filter there. An empty list applies no kind filter.
exact_match Optional
Type
bool
Default
false
Description
Require exact symbol name match
find_similar_patterns Optional
Type
bool
Default
false
Description
Find similar usage patterns
min_centrality Optional
Type
float minimum=0
Default
0
Description
Minimum PageRank score for named-symbol traversal and PR/diff impact. Positive thresholds are unsupported in centrality/orphans browse modes. Metrics are fetched internally for filtering; graph_metrics are returned only when include_metrics=true. Ignored by verify_after_edit, which uses fixed compact controls.
graph_view Optional
Type
Literal[dependency, type, data_flow, control_flow]
Default
dependency
Description
Graph view used for traversal relationship defaults, metrics, and centrality ranking; orphan analysis is calculated across all views
verify_after_edit Optional
Type
bool
Default
false
Description
Re-query the indexed impact graph for edited symbols in one compact multi-root response. Requires targets and/or changed_paths (or target/query). Uses fixed shallow traversal and compact budgets; depth/limit/cursor/metrics controls do not apply. Defaults to incoming dependents; results reflect the indexed graph (may lag live edits). When true, takes precedence over PR/diff impact on the same changed_paths.
targets Optional
Type
list[str] maxItems=15
Description
When verify_after_edit=true: symbol names to re-verify (callers/dependents). Merged with target/query if both are supplied.

Best For:

  • Blast-radius / impact analysis before editing a shared symbol
  • PR/diff impact via changed_paths or patch
  • Post-edit verification via verify_after_edit

Not Recommended For:

  • Simple text or symbol lookups — use text_pattern_search or find_symbol

Code Analysis Tools

#

find_symbol Stable

Jump to where a function, class, or variable is defined and used. Use when you know the name (e.g. "getCurrentUser") — faster and more precise than Grep, and it spans the whole indexed repo. Optionally returns references and importance metrics.

Parameters:

symbol_name Optional
Type
str
Description
Symbol name to search for (optional — omit to browse by metrics)
repository Optional
Type
str
Description
Repository as owner/repo[:branch]. Optional — omit to use the request-scoped client default (when supplied) or the sole accessible repository; pass explicitly only to target a different indexed repo. Exact indexed branches are preferred; an unavailable branch may fall back to main or the sole accessible branch. Response metadata shows requested and resolved identity and warns on fallback.
scope Optional
Type
Literal[definitions, references, both]
Default
both
Description
Search scope; references requires a nonempty symbol_name
limit Optional
Type
int minimum=1, maximum=50
Default
15
Description
Maximum results per page without cursor. Continuation uses the page size stored in cursor; omit cursor to start with a different limit.
offset Optional
Type
int minimum=0
Description
Deprecated compatibility offset. Prefer cursor from pagination.next_cursor.
cursor Optional
Type
str
Description
Opaque cursor from pagination.next_cursor. Pass it unchanged and keep the query and filters unchanged. Its position and page size override offset and limit.
find_similar Optional
Type
bool
Default
false
Description
Include similar symbol names
include_metrics Optional
Type
bool
Default
false
Description
Include centrality metrics
metrics_detail Optional
Type
Literal[summary, full]
Default
summary
Description
When include_metrics=true: summary (default) returns decision signals + refactor_risk; full returns the larger curated metric set
path_filter Optional
Type
str
Description
Filter by file path prefix
branch Optional
Type
str
Description
Branch override
symbol_type Optional
Type
str minLength=1
Description
Filter by indexed symbol kind, e.g. function, class, struct, enum, or trait. Use the kind returned by a symbol result; kinds vary by language.
high_impact Optional
Type
bool
Default
false
Description
Browse architecturally important symbols (omit symbol_name). Default mode is popularity (top PageRank decile minus utility mega-hubs). Set high_impact_mode=risk for articulation/bridge cut-vertices.
high_impact_mode Optional
Type
Literal[popularity, risk]
Default
popularity
Description
When high_impact=true: popularity = top PageRank decile minus utility mega-hubs/modules; risk = articulation points ranked by SMV bridge_count then k_core (structural refactor risk, not hub popularity)
in_cycle Optional
Type
bool
Default
false
Description
Filter to symbols with recorded dependency-cycle membership
exclude_test_paths Optional
Type
bool
Default
true
Description
When browsing by graph metrics, exclude tests, fixtures, vendor code, and examples before ranking; named symbol lookup is unchanged
reference_views Optional
Type
list[Literal[dependency, type, data_flow, control_flow, all]] minItems=1, maxItems=5
Description
Graph views whose incoming edges fill references/reference_count (scope references/both). Default ["dependency", "type"]: calls, imports, exports, references, instantiations, inheritance, overrides, decorators, type use. Unless data_flow is selected, exact-resolved data_flow uses (callbacks, handlers, sort keys) come back separately as value_references/value_reference_count, without bare-name inferred matches. Add data_flow or control_flow, or pass ["all"] for every edge type and tier. Same view families as dependency_search graph_view.
relationship_types Optional
Type
list[str]
Description
Explicit reference edge types (CALL, IMPORT, READS, etc.). A non-empty list overrides reference_views.

Best For:

  • Pinning a known symbol's definition, references, and graph metrics
  • Browsing by centrality, high_impact, or in_cycle when symbol_name is omitted

Not Recommended For:

  • Conceptual or unknown-area queries — use intelligent_search or semantic_search

analyze_dependencies Stable

Analyze blast radius using the same traversal as dependency_search (dependents/incoming). Prefer dependency_search with analysis_type="dependents" or "impact" for impact analysis. Returns a multi-hop impact response with graph, connection_summary, and optional metrics with refactor_risk. connection_summary counts relationship-scoped edges for the chosen root before test/path filtering. Legacy incoming_production/outgoing_production fields mean non-module edges, including tests; they are not production caller counts. Use graph_view to scope relationship family: dependency (default), type, data_flow, control_flow.

Parameters:

repository Optional
Type
str
Description
Repository as owner/repo[:branch]. Optional — omit to use the request-scoped client default (when supplied) or the sole accessible repository; pass explicitly only to target a different indexed repo. Exact indexed branches are preferred; an unavailable branch may fall back to main or the sole accessible branch. Response metadata shows requested and resolved identity and warns on fallback.
target Required
Type
str minLength=1
Description
Symbol name to analyze
symbol_id Optional
Type
UUID
Description
Choose a specific UUID occurrence among target candidates after namespace, path and language filtering; outside-window IDs error.
depth Optional
Type
Literal[shallow, balanced, deep]
Default
balanced
Description
Analysis depth
limit Optional
Type
int minimum=1, maximum=50
Default
10
Description
Maximum results per page without cursor. Continuation uses the page size stored in cursor; omit cursor to start with a different limit.
offset Optional
Type
int minimum=0
Description
Deprecated compatibility offset. Prefer cursor from pagination.next_cursor.
cursor Optional
Type
str
Description
Opaque cursor from pagination.next_cursor. Pass it unchanged and keep the query and filters unchanged. Its position and page size override offset and limit.
direction Optional
Type
Literal[incoming, outgoing, both]
Default
incoming
Description
Traversal direction
relationship_types Optional
Type
list[str]
Description
Filter edge types (CALL, IMPORT, INHERITS_FROM, etc.). A non-empty list overrides graph_view defaults; an empty list uses those defaults.
graph_view Optional
Type
Literal[dependency, type, data_flow, control_flow]
Default
dependency
Description
Graph view: determines both the default traversal edge types and which view's metrics are used when include_metrics=true. dependency=[CALL,IMPORT,EXPORTS,REFERENCE,INSTANTIATES] (default), type=[INHERITS_FROM,IMPLEMENTS,OVERRIDE,DECORATES,OF_TYPE], data_flow=[READS,WRITES,ASSIGNS_TO], control_flow=[CONTROL_FLOW,THROWS,CATCHES]. Applied as the relationship_types default when relationship_types is omitted or empty. Matches dependency_search's existing graph_view parameter name for consistency across tools.
path_filter Optional
Type
str
Description
Restrict target symbol resolution by file path prefix; returned graph relationships may cross outside that path
language_filter Optional
Type
str
Description
Language filter
branch Optional
Type
str
Description
Branch override
per_hop_limit Optional
Type
int minimum=1, maximum=300
Description
Maximum relationships per hop (1-300)
include_metrics Optional
Type
bool
Default
false
Description
Include graph metrics in results, each enriched with a derived refactor_risk block ({risk: "low"|"medium"|"high", is_articulation_point, bridge_count, k_core, graph_view, reasons}). risk is "low" when not an articulation point (in the selected view), "medium" when an articulation point bridging few edges, "high" when bridging many (heuristic threshold, not empirically validated). Omitted per-symbol when no metrics row exists for that symbol/view.
metrics_detail Optional
Type
Literal[summary, full]
Default
summary
Description
When include_metrics=true: summary (default) returns decision signals + refactor_risk; full returns the larger curated metric set
include_edge_metadata Optional
Type
bool
Default
false
Description
Include raw edge metadata and weights. Disabled by default because extractor metadata can be large; enrichment coverage is reported when enabled.
exclude_test_paths Optional
Type
bool
Default
true
Description
Default true: exclude test, fixture, vendor, and example paths from returned graph edges. Set false to include them.
include_module_symbols Optional
Type
bool
Default
false
Description
Default false: drop edges whose from_name or to_name is the synthetic __module__ symbol. Set true to include module-level edges.
head_commit Optional
Type
str pattern=^[0-9a-fA-F]{7,64}$
Description
Commit SHA of the code you are asking about (git rev-parse HEAD, or the base commit of the patch). complete:true requires the index to be at this commit and built by the current resolver; otherwise complete stays false with index_stale / index_freshness_unverified / index_built_by_older_resolver and index_basis.statement says what the answer is complete within. A patch's 'base-commit:' line (git format-patch --base) also supplies it.

Best For:

  • Multi-hop impact analysis when you need graph and connection_summary response fields

Not Recommended For:

  • General impact analysis — prefer dependency_search for flexible traversal and multi-root checks

get_task_context Stable

Starting work in an unfamiliar area? Describe the task (e.g. "add SSO support", "fix the billing webhook") and get a bounded one-call bundle of relevant files, code, symbols, and dependencies. Seeded files contribute direct indexed content even when they define no symbols. Failed layers are labelled; total retrieval failure returns a tool error. For more results, continue with the specialized search tool for that layer.

Parameters:

task_description Required
Type
str minLength=1
Description
Description of the task you need context for
repository Optional
Type
str
Description
Repository as owner/repo[:branch]. Optional — omit to use the request-scoped client default (when supplied) or the sole accessible repository; pass explicitly only to target a different indexed repo. Exact indexed branches are preferred; an unavailable branch may fall back to main or the sole accessible branch. Response metadata shows requested and resolved identity and warns on fallback.
limit Optional
Type
int minimum=1, maximum=50
Default
15
Description
Maximum results per layer
scope Optional
Type
Literal[semantic, symbols, dependencies, all]
Default
all
Description
Which context layers to include
language_filter Optional
Type
str
Description
Language filter: requires scope=semantic without explicit seeds or related context; other layer indexes cannot enforce language
path_filter Optional
Type
str
Description
File path prefix for semantic and keyword retrieval roots. Explicit seeds may be outside this prefix; graph context may cross directory boundaries.
branch Optional
Type
str
Description
Branch override
include_related_context Optional
Type
bool
Default
false
Description
Include related context from adjacent symbols
seed_symbol_ids Optional
Type
list[str] maxItems=20
Description
Explicit task seeds: first in the symbols layer and retained within the bounded dependencies/related_context window. Graph layers rank explicit seeds and their nearest neighborhood before keyword fallback; importance breaks relevance ties. Graph expansion requires scope=all|dependencies (scope=symbols|semantic never runs the dependency traversal). Omit for keyword-only depth-decayed importance ranking.
seed_file_paths Optional
Type
list[str] maxItems=10
Description
Explicit seeds: exact indexed file paths the agent has open or just edited. Returns bounded direct file evidence and up to 5 graph seeds per file, prioritizing exact task-name matches from bounded symbol lookup before definitions and incidental symbols. Symbol-free files still supply evidence. Missing files may return labelled suggestions that are not seeds. Graph expansion requires scope=all|dependencies.

Best For:

  • Task-aware context blending seeded files with semantic, symbol, and dependency layers

Not Recommended For:

  • Single-tool lookups where a more specific tool already answers the question

get_file Stable

Read a file from the indexed repo by path. Prefer local file tools for files on disk; use this for remote indexed snapshots. Continue bounded responses with metadata.next_line_start and next_character_start. Remove the trailing newline plus [truncated] marker only when metadata.truncated=true; otherwise it may be literal source text.

Parameters:

file_path Required
Type
str
Description
File path relative to repository root
repository Optional
Type
str
Description
Repository as owner/repo[:branch]. Optional — omit to use the request-scoped client default (when supplied) or the sole accessible repository; pass explicitly only to target a different indexed repo. Exact indexed branches are preferred; an unavailable branch may fall back to main or the sole accessible branch. Response metadata shows requested and resolved identity and warns on fallback.
line_start Optional
Type
int minimum=1
Description
Start line (1-indexed)
line_end Optional
Type
int minimum=1
Description
End line (1-indexed, inclusive; must be at or after line_start)
character_start Optional
Type
int minimum=0
Default
0
Description
UTF-16 code-unit offset within the starting line only (0-indexed). Use metadata.next_character_start for partial-line continuation.
branch Optional
Type
str
Description
Branch override
max_tokens Optional
Type
int minimum=1, maximum=50000
Default
5000
Description
Approximate content budget (4 UTF-16 code units per token; not an exact tokenizer limit)
include_metadata Optional
Type
bool
Default
true
Description
Include descriptive file metadata. Truncation and continuation metadata are always returned.

Best For:

  • Remote or indexed file snapshots (line ranges, token limits)

Not Recommended For:

  • A path already on local disk — use the local Read tool

System & Utility Tools

#

repository_context Stable

List the repositories you can search, or get identity info on one (namespace/branch, indexed_commit_sha / index freshness). Use action:"list" when the repo slug is unknown; searches accept a known slug directly or default to your key's single repo. List uses pattern and pagination; info requires repository and supports branch and opt-in include_statistics=true.

Parameters:

action Required
Type
Literal[list, info]
Description
Action: list available repos or get repo info
repository Optional
Type
str
Description
Info only: repository in owner/repo or owner/repo:branch format (required for info)
branch Optional
Type
str
Description
Info only: branch override
pattern Optional
Type
str
Description
List only: case-insensitive repository-name substring
include_statistics Optional
Type
bool
Default
false
Description
Info only: include bounded indexed-data counts. File/blob counts are exact; larger index counts are estimates. Read count_accuracy and estimate_analyzed_at. Default false.
limit Optional
Type
int minimum=1, maximum=50
Default
20
Description
Maximum results per page without cursor. Continuation uses the page size stored in cursor; omit cursor to start with a different limit.
offset Optional
Type
int minimum=0
Description
Deprecated compatibility offset. Prefer cursor from pagination.next_cursor.
cursor Optional
Type
str
Description
Opaque cursor from pagination.next_cursor. Pass it unchanged and keep the query and filters unchanged. Its position and page size override offset and limit.

Best For:

  • Listing accessible repositories
  • Resolving repository identity, branch, and HEAD-vs-index freshness

Not Recommended For:

  • Namespace-wide statistics by default — pass include_statistics=true explicitly, since it can be slower than resolution

ask_maguyva Stable

Get Maguyva tool guidance, or submit a bug report / feature request stored for Maguyva's maintainers. Never include secrets or sensitive personal data in feedback. The evaluate operation supports deterministic expressions; prefer local compute or host tools for math/hash/string work.

Parameters:

operation Required
Type
Literal[guidance, report_bug, request_feature, evaluate]
Description
Use guidance for tool help, report_bug for bugs, or request_feature for suggestions. evaluate runs deterministic expressions; prefer local compute for calculations.
query Optional
Type
str maxLength=500
Description
Guidance topic (e.g. tool_selection, semantic_search), or an expression string for evaluate.
description Optional
Type
str minLength=1, maxLength=4000
Description
Required for report_bug and request_feature. Free-form feedback for Maguyva's maintainers. Never include secrets or sensitive personal data.
related_tool Optional
Type
Literal[ask_maguyva, get_file, repository_context, find_symbol, structural_search, dependency_search, analyze_dependencies, semantic_search, text_pattern_search, intelligent_search, get_task_context]
Description
Optional Maguyva tool most closely related to the feedback

Best For:

  • Tool guidance (operation="guidance")
  • Durable bug reports and feature requests for Maguyva's maintainers

Not Recommended For:

  • Math/hash/string computation — prefer local compute or host tools

Best Practices

#
  1. Use Explicit Overrides Deliberately: Omit the repository when your MCP client supplies a request default or the key can access exactly one repository; otherwise pass it explicitly.
  2. Choose the Right Search Mode: Use intelligent_search with mode="auto" for most cases. Specify a mode when you know exactly what you need.
  3. Leverage Language Filters: Use language_filter to narrow results and improve performance.
  4. GraphRAG Boosting: GraphRAG importance boosting is off by default for semantic search (boost_by_importance=false) to keep ranking agent-safe. Pass boost_by_importance=true to enable centrality-aware re-ranking for architecture tours.
  5. Repository Matching Is Case-Insensitive, Not Fuzzy: repository_context matches repository names case-insensitively — it does not correct typos. When the identity served differs from the one requested, metadata.resolution_reason reports "defaulted" (no branch was requested) or "fallback" (the requested branch or repository is unavailable). It is omitted when the request matched exactly.
  6. Combine Tools: Use multiple API methods together for comprehensive analysis.
  7. Handle Large Results: Use limit and tool-specific paging controls (for example line_start/line_end in get_file).
  8. Use ask_maguyva for Tool Guidance: Call ask_maguyva with operation="guidance" and query="tool_selection" for tool-selection advice and examples. Use your local tools for calculations and string transformations.
  9. Verify Impact Before and After Editing: Before editing a shared symbol, call dependency_search with analysis_type="impact" (or pass changed_paths for PR/diff impact) to see its blast radius. After editing, set verify_after_edit=true with targets and/or changed_paths for a compact re-check of the indexed graph. This does not read uncommitted local changes or replace local tests. Check indexed_commit_sha and index freshness before treating results as evidence for a new revision.

Performance Characteristics

#
Operation Performance notes
Semantic search Includes query embedding generation and vector retrieval. Latency depends on both operations.
Text search For fuzzy content search, deeper pages fetch more candidates. Narrow the query with path_filter and language_filter.
Structural search Queries indexed AST nodes. Use a specific preset or pattern and limit the result count.
Dependency search Cost scales with depth — prefer depth="shallow" unless you need multi-hop context; per_hop_limit bounds fan-out
File retrieval Read the range you need with line_start/line_end or max_tokens, and use the returned continuation metadata for truncated content.
Repository context Repository resolution runs for each tool call. Pass repository explicitly when you need a specific repository.
ask_maguyva (guidance / evaluate) Runs in the MCP server without querying the repository index.

Error Handling

#

Tool responses contain common status fields and tool-specific payload fields at the top level. Searches return results; get_file returns content. Common fields include:

  • status: String — "success" or "error". Degraded-match and freshness signals live in their own fields: metadata.resolution_reason under metadata, and top-level index_freshness.status on the repository_context info action.
  • timing_ms: Elapsed tool execution time in milliseconds
  • applied_filters: Effective request parameters recorded for the operation
  • error: Error message string when status is "error"; it may include recovery guidance.
  • metadata: Additional information about the operation (routing, caching, parameter adjustments)
  • pagination: Present on cursor-paged collection responses — includes has_more and next_cursor. Ranked search windows are bounded top-K results, not exhaustive paginated collections.

Check the status field before processing a tool payload — its values are "success" or "error". Also handle MCP/JSON-RPC transport and request-validation errors, which may occur before a tool payload is produced. For degraded-match or freshness signals, read the dedicated field instead: metadata.resolution_reason under metadata, or top-level index_freshness.status on the repository_context info action (known/partial/unknown/unavailable).

Getting Started

#
  1. Configure MCP Client: Point your MCP client to the Maguyva server endpoint
  2. Confirm Repository Access: Use repository_context with list or info to inspect repositories available to the API key
  3. Start Searching: Begin with intelligent_search and explore specialized tools as needed
  4. Combine Tools: Use multiple tools together for comprehensive code analysis

For detailed integration instructions, see the installation guide.