Skip to main content
Glama

read_symbol

Get symbol body and version directly by symbol_id or name+file. Automatically re-indexes changed files for current results.

Instructions

MUST READ BEFORE WRITE. Symbol body + version (base_version for writes). Resolves by symbol_id or name+file. Full file? read_outline. AUTO-FRESH: files modified after last index are re-indexed automatically on read — explicit reindex only needed for brand-new workspaces/files.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
modeNocore (default): body+version. rich: +outline+navigation.
sourceNolive (default): current file+staleness. indexed: read-only snapshot, never for write.
locatorNo
locatorsNoY002-S5 batch entry: array of locators, parallel read-only, per-entry failure non-blocking. Use instead of locator for multi-symbol reads.
budget_hintNoMax body chars to return; must truncate, not hint (default 1200)
on_ambiguousNofail (default): return candidates, never silently pick.
context_linesNoContext lines around symbol (default 0 — context_lines does not affect slicing; symbol body is returned as indexed)
outline_depthNoOutline depth (default 1)
workspace_dirYesREQUIRED: project root (abs). reindex first if new.
include_outlineNoForce include file outline (off in core by default)

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/wulun811/LiuHe'

If you have feedback or need assistance with the MCP directory API, please join our Discord server