Skip to main content
Glama
YohannHommet

Repo Lens MCP Server

by YohannHommet

Find Classes

repolens_find_classes
Read-onlyIdempotent

Find class definitions across repositories and directories using AST analysis. Filter by name pattern, language, or exported status to locate classes and PHP traits.

Instructions

Find class definitions across repositories using AST analysis.

Searches for class declarations. Also finds PHP traits. Uses ast-grep for accurate structural matching.

Args:

  • name (string, optional): Class name pattern. Supports wildcards: "*Service", "Controller", "Base"

  • paths (string, optional): Ad-hoc directory paths to search (comma-separated). No registration needed.

  • repoFilter (string, optional): Filter registered repositories by alias (comma-separated)

  • language (string, optional): Filter by language: "typescript", "javascript", "php"

  • exportedOnly (boolean, optional): Only return exported classes (default: false)

  • maxResults (number, optional): Maximum results to return (default: 100)

  • response_format (string, optional): Output format - "markdown" (default) or "json"

Examples:

  • Search a directory directly: paths="/home/user/projects/api"

  • Find all services: name="*Service"

  • Find controllers in backend: repoFilter="backend", name="*Controller"

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameNoClass name pattern
pathsNoAd-hoc directory paths to search (comma-separated). No registration needed.
languageNoFilter by language (typescript, javascript, php, ts, js)
maxResultsNoMaximum results (default: 100, max: 500)
repoFilterNoFilter registered repositories by alias (comma-separated)
exportedOnlyNoOnly return exported symbols (default: false)
response_formatNoOutput format: "markdown" (default) or "json"

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
countYesNumber of results returned
resultsYesArray of symbol results

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. First observedv0.3.0

TDQS

A4/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true, idempotentHint=true, and destructiveHint=false, so the safety profile is covered. The description adds that ast-grep is used and that matching is structural rather than regex-based, which is useful. But beyond that, it mostly restates what annotations and the schema already make clear.

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

Conciseness3/5

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

The description is front-loaded with a clear summary and uses well-organized sections. However, the Args list largely duplicates the input schema for all seven parameters, making the definition longer than necessary. The examples and wildcard notes earn their place, but roughly half of the content is redundant with structured data.

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

Completeness4/5

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

The tool has no required parameters, all parameters are documented in the schema, and an output schema exists. The description supplies enough context for normal usage: it explains ad-hoc paths, wildcards, defaults, and gives examples. It does not explain return format details, but that is covered by the output schema. The main missing piece is explicit alternative routing, already accounted for under usage guidelines.

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 schema carries the baseline documentation. The description adds genuine value by explaining wildcard support for the name parameter, providing default values inline, and giving concrete invocation examples. A minor omission is that the language parameter description omits the ts/js aliases present in the schema, but the schema itself remains authoritative.

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?

States a specific verb (Find), resource (class definitions across repositories), and method (AST analysis). It also mentions that it finds PHP traits, which distinguishes it from sibling tools like find_functions and find_types. The alignment between name, title, and description is strong.

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

Usage Guidelines4/5

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

Provides clear usage context: searches class declarations, supports ad-hoc paths without registration, and offers repo/language filtering. It gives three concrete examples. However, it never explicitly names alternative tools or states when not to use this tool, so it stops short of full guidance.

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

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/YohannHommet/repo-lens-mcp'

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