Skip to main content
Glama
maschmann

symfony-php-mcp

by maschmann

build_index

Scan PHP files to build a persistent symbol index, enabling instant symbol lookup without re-scanning. Supports incremental updates for changed files.

Instructions

Scan PHP files and build (or update) the symbol index.

The index stores all classes, interfaces, traits, enums, and their methods so that find_symbol can locate any symbol instantly without re-scanning.

The index is persisted to /.symfony-mcp-index.json and loaded automatically on next server start. Only changed files are re-scanned (incremental), so subsequent calls are fast.

Args: directories: Directories to scan, relative to the project root. Default: auto-detected (src/, app/, lib/). Example: ["src", "lib"] force: Re-scan every file even if it hasn't changed. Use this after a major refactor or rename.

Run this once after pointing the server at a new project, then again after significant code changes.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
directoriesNo
forceNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior5/5

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

No annotations provided; description carries full burden. Discloses persistence to a JSON file, automatic loading, incremental re-scanning, and force option. No mention of destructive side effects or auth needs; adequate transparency.

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

Conciseness5/5

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

Well-structured: headline, bullet points for index content, note on persistence/incremental, then Args section. Every sentence adds value; no fluff.

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?

With sibling tools present, description links to find_symbol. Output schema exists (not shown) so return value explanation unnecessary. Complete for a build/index tool with good annotations.

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

Parameters5/5

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

Despite 0% schema description coverage, description explains both parameters: directories (default and example) and force (use case for major refactor). Adds meaning beyond the bare schema.

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?

Clearly states the tool scans PHP files and builds/updates a symbol index. Lists what the index stores (classes, interfaces, traits, enums, methods) and relates to sibling tool find_symbol for lookup. Verb 'scan and build' with resource 'symbol index' is specific and distinct from siblings.

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?

Explicitly advises to run once after project setup and after significant code changes. Implicitly contrasts with find_symbol (no need to re-scan for lookups). Describes incremental behavior to guide efficient use.

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

Install Server

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/maschmann/symfony-php-mcp'

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