SynapsesOS
Reference — Tools

Context Retrieval Tools

get_context

Unified context retrieval with three modes: BFS graph traversal, intent-based assembly, and call chain path finding.

Absorbs: prepare_context (via mode=“intent”), get_call_chain (via mode=“path”).

Parameters

ParameterTypeRequiredDescription
modestringNocontext (default): BFS graph traversal. intent: intent-based context assembly. path: call chain between two entities.
entitystringmode=contextEntity name (e.g. AuthService). Required for mode=context.
depthnumberNoBFS hop limit. mode=context only. Defaults to project config value.
token_budgetnumberNoMax tokens in response. Default 4000.
task_idstringNoTask ID for relevance boosting.
filestringNoFile path suffix to disambiguate entity names.
formatstringNoOutput format: compact (default) or json. mode=context only.
detail_levelstringNoVerbosity: summary, neighbors, full (default). mode=context only.
helpfulbooleanNoFeedback signal (true=useful, false=missed). mode=context only.
include_inferredbooleanNoWhen false, strips inferred route nodes. Default true. mode=context only.
known_hashstringNoEntity hash for conditional fetch. mode=context only.
agent_idstringNoAgent ID for peer tracking.
intentstringNoFor mode=context: shapes traversal weights. For mode=intent: required — modify, understand, review, debug, add, plan.
projectsstringNoComma-separated federation aliases for cross-project context.
cross_domain_decaynumberNoCross-domain relevance multiplier (0,1]. Default 0.5. mode=context only.
targetstringmode=intentEntity name, file path, or query. Required for mode=intent.
fromstringmode=pathStarting entity for call chain. Required for mode=path.
tostringmode=pathTarget entity for call chain. Required for mode=path.

Mode: context (default)

BFS/PPR ego-subgraph traversal around a named entity.

{
"tool": "get_context",
"arguments": {
"entity": "AuthService",
"depth": 2,
"token_budget": 4000
}
}

Mode: intent

Intent-based context assembly. Declare what you want to do and the target, get back relevant context in one round-trip.

{
"tool": "get_context",
"arguments": {
"mode": "intent",
"intent": "modify",
"target": "handleLogin"
}
}

Mode: path

Find the shortest call chain between two entities.

{
"tool": "get_context",
"arguments": {
"mode": "path",
"from": "handleRequest",
"to": "DatabaseQuery"
}
}

get_file_context

Returns all entities (functions, methods, structs, interfaces) defined in a file, ordered by line number. Use when working on a specific file for an instant overview.

Parameters

ParameterTypeRequiredDescription
filestringYesFile path or suffix (e.g. internal/store/tasks.go or tasks.go).
token_budgetnumberNoMax response size in tokens (default 4000). When exceeded, entities are dropped from the bottom of the file. Response includes truncated=true and total_entities=N when trimmed.

Example

{
"tool": "get_file_context",
"arguments": {
"file": "internal/mcp/server.go",
"token_budget": 3000
}
}