Skip to main content
Glama
YohannHommet

Repo Lens MCP Server

by YohannHommet

Find Functions

repolens_find_functions
Read-onlyIdempotent

Find function and method definitions across JavaScript, TypeScript, and PHP repositories using AST analysis. Supports wildcard patterns, exported-only filtering, and direct directory paths.

Instructions

Find function and method definitions across repositories using AST analysis.

Searches for function declarations, arrow functions, and class methods in JS/TS and PHP. Uses ast-grep for accurate structural matching.

Args:

  • name (string, optional): Function name pattern. Supports wildcards: "handle*", "*Controller", "user"

  • 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 functions (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 handlers: name="handle*"

  • Find exported functions in backend: repoFilter="backend", exportedOnly=true

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameNoFunction name pattern (supports wildcards like 'handle*')
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.2/5.0
Behavior4/5

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

Annotations already mark the tool as read-only, idempotent, and non-destructive, and the description adds useful behavioral detail: AST-based structural matching via ast-grep, support for ad-hoc paths without registration, wildcard/filter behavior, and default result limits. It does not dwell on return shape, but the output schema covers that.

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?

The description is front-loaded with the tool's core purpose and then organized into Args and Examples sections, making it easy to scan. It is slightly longer than necessary because the Args list duplicates schema descriptions, but the structure and examples justify the length.

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?

The description is complete for a search tool: it states what is searched, how matching works, all parameter roles with defaults, and multiple worked examples. With annotations covering safety and an output schema defining return values, nothing essential is missing.

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

Parameters3/5

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

Schema description coverage is 100%, and each parameter already has a description, enum, or default in the input schema. The description's Args section mostly restates that information, though it adds a few clarifying details and concrete usage examples.

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 specific verb and resource: 'Find function and method definitions across repositories using AST analysis.' It further narrows the scope to function declarations, arrow functions, and class methods in JS/TS and PHP, which clearly separates it from sibling tools like find_classes, find_types, and find_api_routes.

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?

The description provides clear context for when to use the tool — searching for functions and methods — and offers examples for ad-hoc directory searches, wildcard matching, and repository filtering. It does not explicitly state when to prefer sibling tools, but the scope is evident and the examples demonstrate common usage patterns.

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