cos_graph_context
Retrieve callers, callees, siblings, and referenced docs around a symbol. Configure direction, depth, and options for source content, evidence, and ancestry.
Instructions
Return callers + callees + siblings + referenced docs around a symbol.
Args:
uid_or_name: Node uid or fuzzy label. Uid scheme:
code:file:<path> | code:function:<path>::<name> |
code:class:<path>::<name> | code:module:<dotted> |
doc:file:<path> | doc:heading:<path>#<slug>:<level> |
folder:<path>. Raw repo paths (core/foo.py) are
auto-resolved to code:file: / doc:file: / folder:;
if all variants miss, a fuzzy label match is tried. Run
cos_graph_query first to discover candidates.
direction: "in" | "out" | "both".
depth: BFS depth (default 1).
include_content: When True, each returned node gains a content
field with source text read from file_path:start_line..end_line
(capped at 2000 chars, with truncated: bool). Silently skipped
when the file is missing or the node has no file_path. (B21)
include_evidence: JOIN evidence rows (costs ~2× tokens).
include_spine: S3 — pulls the CONTAINS-ancestor chain (file → folder → …)
so the UI can render breadcrumbs.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| depth | No | ||
| direction | No | both | |
| uid_or_name | Yes | ||
| include_spine | No | ||
| include_content | No | ||
| include_evidence | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |