Skip to main content
Glama

gs

Explore a file's shape and neighbors: symbols with callers, imports, reverse importers, co-changed files, and related files sharing tokens. Answers 'who uses this file' without reading code.

Instructions

Drill into a known file. Returns these sections as compact text:

  • Symbols — top-level + per-class methods (name, kind, line range, extends/implements). With cross-file callers attached per exported symbol (inline if 1 caller; newline-per-caller block if ≥2). For huge files (>20 symbols, no match), symbols are reordered by caller count (most-used first) and truncated to top 15.

  • Imports — 1-hop internal outbound dependencies (library imports stripped).

  • Importers — 1-hop reverse: files in this repo that import this one. With match, additionally lists EVERY indexed file (importer or not, any language) whose CONTENT references the matched term even when its filename does not (a registry, admin, or config file using the symbol — or a frontend file referencing a backend name). That subsection IS the complete "who uses " answer: it is exhaustive over indexed content, so a subsystem absent from it does NOT use the symbol — do not grep to enumerate or re-verify use-sites, and do not keep hunting in subsystems the section rules out.

  • Edited together — files that keep changing in the SAME COMMITS as this one, from git history, shown with the count as evidence ("changed together in 14 of this file's 17 commits"). This is a HABIT, not a dependency: no import or call edge connects them, so do not go looking for one. It is frequently what an edit here forgets — a sibling implementation with a shared interface, a test in another language, a doc or template that has to stay in sync. Files connected to this one by an import edge are omitted here, so everything shown is a file the graph did NOT give you. Rendered in EVERY view, including a narrowed one. Absent = no git history yet (a new file, a shallow clone) or nothing pairs strongly enough.

  • Related — files sharing rare identifier/string-literal tokens with this file (with match: with the matched symbols' code region), shown only when NO import edge connects them. These are name-reference relations the import graph cannot see — Django migrations↔models, config-by-name registration, cross-language (JS↔Python) pairs. Treat them as first-class neighbors: the shared token shown is the reason they are related. Rendered in EVERY view, including a narrowed one. Use this AFTER find surfaces a candidate file. This is the right tool for "who uses this file" / "who calls this symbol" — no separate call needed.

view controls which sections you get (default full = all of them). symbols, imports, importers, callers each return one section in isolation when you want a byte-light answer.

For god-files (large classes, large routers, large config modules), pass match to filter symbols/imports/importers/callers to one area — e.g. match: "auth" or match: "/^handle/". Substring is case-insensitive; wrap in slashes for regex.

Prefer this over Read when you need shape, neighbors, or usage. Reach for Read only for implementation details inside a method body. If you have called gs on 5+ files for one question, you are enumerating — go back to find with a sharper path glob or a different concept token instead.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
viewNoWhich sections to return. Default "full" = symbols (with inline callers) + imports + importers. Use one of the narrower views to halve or quarter the output when you know what you need: "symbols" (shape only, no callers), "imports" (outbound only), "importers" (inbound only), "callers" (per-symbol cross-file callers in expanded form, no symbol shape).
matchNoFilter all sections by name. Substring (case-insensitive) by default; use `|` to OR substrings (`match: "resource|tile"`); wrap in slashes for regex (`match: "/^handle/"`). Use this on large/god-files to avoid a wall of output — e.g. `match: "tile"` on a big models.py reduces output to just tile-related symbols, their callers, and matching imports/importers.
symbolNoDeliver the BODY of the named symbol(s) inline, sliced from their indexed line range — so you read a method WITHOUT a Read at a guessed offset. Comma/pipe-separate names (`serialize,restore_state`). A bare name matches the method (`serialize` → `Graph.serialize`). Each body is followed by `callers:`/`calls:` POINTERS (file + line range) so the next hop is one more `gs --symbol` call, not a windowed Read. Use this the moment a file’s symbol list shows the method you need — it replaces the read-at-offset hunt on god-files. If the name is NOT a declared symbol (a runtime/template-injected value, a string key, a config token), it falls back to an in-tool GREP: returns the body lines where the token appears, with context — so you never shell out to grep. Overrides `view`/`match`.
file_pathYesRelative path to the file (e.g. "src/auth/service.ts"). Suffix matches are accepted.
Install Server

TDQS

A4.8/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden — and it delivers: symbol reordering/truncation beyond 20 symbols, the exhaustive 'do not grep' semantics of importers under match, and the 'Edited together is a HABIT, not a dependency' caveat with an explicit 'do not go looking for one' instruction. It also discloses absence conditions (no git history, weak pairing), rendering scope ('Rendered in EVERY view'), and the in-tool grep fallback for non-declared symbols. No annotation contradiction is possible since no annotations exit.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Well front-loaded with a one-sentence purpose ('Drill into a known file. Returns these sections as compact text:') and a scannable bullet structure for the five sections. The length is largely justified by dense anti-error guidance, but it loses a point for redundancy: 'Rendered in EVERY view, including a narrowed one' appears twice, and parameter prose overlaps the schema.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a complex tool with no annotations and no output schema, this is complete: every section type is defined, non-obvious absence conditions are explained, all four parameters are documented, and explicit stop/continue heuristics are given. An agent could select, invoke, and interpret results correctly without any additional lookup.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the baseline is 3; the description adds value beyond the schema by explaining when each parameter matters — match for god-files with concrete exaples ('match: "auth"', '/^handle/'), and symbol as a replacement for the read-at-off-set hunt, including its override behavior and grep fallback. Some duplication with the schema's own parameter text remains, so it stops short of 5.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description opens with a concrete verb+resource ('Drill into a known file') and enumerates the exact output sections (Symbols, Imports, Importers, Edited together, Related), thoroughly scoping what the tool does. It also differentiates it from siblings and the Read alternative by positioning it as the follow-up to find and as 'the right tool for who uses this file / who calls this symbol'.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives explicit when-to-use ('Use this AFTER find surfaces a candidate file', 'Prefer this over Read when you need shape, neighbors, or usage') and when-not-to ('Reach for Read only for implementation details inside a method body'). It even names a stopping rule — after 5+ gs calls for one question, go back to find with a sharper glob — an unusually precise guard against enumeration.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Other Tools

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/AkashGoenka/coldstart'

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