Skip to content

documentSymbols

Every top-level symbol defined in path within repo, each with its range.

documentSymbols(repo: str, path: str)
ParameterTypeRequiredDescription
repostringyesThe repo slug (from jarvis index)
pathstringyesFile path relative to the repo root
{
"path": "toy/greeter.ts",
"symbols": [
{
"symbol": "...",
"displayName": "...",
"kind": "...",
"range": { "start": { "line": 0, "character": 0 }, "end": { "line": 0, "character": 0 } }
}
],
"commit": "abc1234",
"generated_at": "2026-07-08T12:00:00+00:00",
"stale": false,
"freshness": "fresh",
"checked_at": "2026-07-08T12:00:05+00:00"
}

symbol is the full SCIP symbol string; displayName/kind are the human-readable name and kind for the same symbol — nulled to None when the index carries neither (the upstream scip converter does not populate them on real output; see the Upstream Issues entry). Symbols are ordered by position in the file, not declaration order in the index.

Call:

{ "repo": "toy-repo", "path": "toy/greeter.ts" }

Response:

{
"path": "toy/greeter.ts",
"symbols": [
{
"symbol": "scip-typescript npm @toy/pkg 0.0.1 src/`greeter.ts`/Greeter#",
"displayName": "Greeter",
"kind": "TYPE",
"range": { "start": { "line": 0, "character": 0 }, "end": { "line": 5, "character": 1 } }
},
{
"symbol": "scip-typescript npm @toy/pkg 0.0.1 src/`greeter.ts`/Greeter#greet().",
"displayName": "greet",
"kind": "METHOD",
"range": { "start": { "line": 1, "character": 2 }, "end": { "line": 3, "character": 3 } }
},
{
"symbol": "scip-typescript npm @toy/pkg 0.0.1 src/`greeter.ts`/DEFAULT_NAME.",
"displayName": "DEFAULT_NAME",
"kind": "TERM",
"range": { "start": { "line": 6, "character": 6 }, "end": { "line": 6, "character": 18 } }
},
{
"symbol": "scip-typescript npm @toy/pkg 0.0.1 src/`greeter.ts`/Greeter#sayHi().",
"displayName": "sayHi",
"kind": "METHOD",
"range": { "start": { "line": 8, "character": 2 }, "end": { "line": 9, "character": 3 } }
}
],
"commit": "abc1234",
"generated_at": "2026-07-08T12:00:00+00:00",
"stale": false,
"freshness": "fresh",
"checked_at": "2026-07-08T12:00:05+00:00"
}

Every tool returns a JSON object with an "error" string instead of raising:

{ "error": "no published index for toy-repo" }