Skip to main content
Glama

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
PHPGRAPH_WORKERSNoSets the number of worker processes used to parse files. PHPGRAPH_WORKERS=4 sets four workers, and PHPGRAPH_WORKERS=1 parses in one process.
PHPGRAPH_MEMORY_LIMITNoSets a memory limit for phpgraph. Memory is unlimited by default; for example, PHPGRAPH_MEMORY_LIMIT=2G.

Instructions

Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.

Knowledge graph of this PHP codebase, built by static analysis: deterministic facts, no guesses beyond what each confidence level says. Use it before grep, glob or reading files to explore or change the code, then read only the files it points to. To explain a feature or how something works, call outline first. Call impact_of before changing a class or a method, instead of searching for its usages with grep. Use get_node or get_neighbors to read one class or method. Relations are EXTRACTED (read in the code), INFERRED (resolved from declared types) or AMBIGUOUS (guessed from a unique method name). Routes (route:GET /orders), message channels and API schema operations are nodes too; in a multi-service repository ids read service@Class. The graph rebuilds itself when the code changes.

Capabilities

Features and capabilities supported by this server

Protocol revision2025-11-25

CapabilityDetails
tools
{}

Tools

Functions exposed to the LLM to take actions

NameDescription
get_nodeA

One class, interface, trait, enum, method or function: kind, file, line and every relation in and out, with its confidence. Lists the other nodes matching the name.

get_neighborsA

Like get_node in one direction: "in" what uses it (callers, implementations, subclasses, instantiations), "out" what it depends on.

impact_ofA

Call this before changing a class or a method, instead of searching for its usages with grep. What may break when it changes: every class that depends on it, directly or through others (callers, subclasses, implementations, code that instantiates or references it, senders and handlers of a message), nearest first, each with the relation that reaches it and the weakest confidence on the way, then its methods reaching the change with the source lines of their calls. Follows methods, not whole classes: a class is reached only through the methods that use the change. Also reaches the callers of the interface or parent method a method implements (INFERRED), and, in a separate list, the code possibly affected through the state the method writes. Lists the tests to run apart, found through test helpers (fakers). Stops at a service receiving the change among others (a tagged collection) and at inherited code shared with other subclasses, which are listed but not followed. Lists the routes reaching the change, each with its chain down to the change. A large impact comes compact (routes cut, farther classes by name, indirect tests counted) and still names every direct dependent: the default answer is the one to use, other options are several times larger.

outlineA

Call this first, before grep or reading files, to explain or document a feature or how something works ("how does stock reservation work"). From the classes the topic names: the cluster by namespace and layer (kind, docblock summary, public signatures, constants), the interfaces and base classes around it, the flow from the routes, behaviour read in the bodies (guarded throws, branches), container wiring, users and untested classes. A topic naming a method (OrderService::place) outlines what it runs, 3 calls deep.

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

TDQS

A3.7/5.0

Scored across 4 tools

Disambiguation4/5

get_node and get_neighbors overlap in purpose (full node vs. one-directional relations), but the descriptions clearly delimit them: get_node is bidirectional and includes node identity, while get_neighbors is explicitly one direction. impact_of and outline are clearly distinct higher-level analyses (change risk vs. topic explanation).

Naming Consistency3/5

get_node and get_neighbors follow a clean verb_noun snake_case pattern, but impact_of is a noun/prepositional phrase and outline is a bare verb with no object. The conventions are mixed though still readable and unlikely to be misread.

Tool Count4/5

Four tools is a tight, purposeful set for a PHP code-graph server: two low-level graph queries plus two high-level analyses. It is slightly thin (no discovery/search tool), but each tool clearly earns its place.

Completeness4/5

The surface covers node inspection, directional traversal, impact analysis, and topic outlining, which handles the core workflows of a code graph. A gap remains around discovery: there is no way to list or search nodes by pattern beyond name matching inside get_node, which could force agents to guess names.

Maintenance

ActivityActive
ResponsivenessNo recent community issues