Stellarion
Tools

stellarion_find_by_signature

Search for functions by parameter count, return type, modifiers, and name patterns

A structural search tool that finds functions based on their shape rather than their name or behavior. Search by parameter count, return type, access modifiers, and name wildcards to find functions that match a structural pattern.

When to Use

  • You want to find all async functions in a module
  • You need to find functions with a specific return type (e.g., all functions returning Result<T>)
  • You want to find functions with a high parameter count (potential code smell)
  • You are looking for static methods or public API functions
  • You remember a function's shape but not its name

Parameters

ParameterTypeRequiredDefaultDescription
namePatternstringnoWildcard pattern for function name (e.g., handle*, *Controller, get_*_by_id)
paramCountnumbernoExact number of parameters
minParamsnumbernoMinimum number of parameters
maxParamsnumbernoMaximum number of parameters
returnTypestringnoReturn type to match (e.g., Promise, Result, void)
modifiersarraynoRequired modifiers: async, static, public, private, protected, abstract, export
limitnumberno50Maximum number of results

Examples

Find all async functions

Natural language:

Find all async functions in the project

MCP call:

{
  "tool": "stellarion_find_by_signature",
  "arguments": {
    "modifiers": ["async"]
  }
}

Find functions with many parameters

Natural language:

Find functions that take 5 or more parameters — they might need refactoring

MCP call:

{
  "tool": "stellarion_find_by_signature",
  "arguments": {
    "minParams": 5
  }
}

Find handler functions returning a specific type

Natural language:

Find all functions starting with "handle" that return a Result

MCP call:

{
  "tool": "stellarion_find_by_signature",
  "arguments": {
    "namePattern": "handle*",
    "returnType": "Result"
  }
}

Find public static methods

Natural language:

Find all public static methods in the codebase

MCP call:

{
  "tool": "stellarion_find_by_signature",
  "arguments": {
    "modifiers": ["public", "static"]
  }
}

Find functions with exactly 2 parameters

Natural language:

Find functions that take exactly 2 parameters and return void

MCP call:

{
  "tool": "stellarion_find_by_signature",
  "arguments": {
    "paramCount": 2,
    "returnType": "void"
  }
}

Output Format

Returns matching functions:

  • name — Function name
  • uri — File path
  • line — Line number
  • signature — Full function signature
  • paramCount — Number of parameters
  • returnType — Return type
  • modifiers — Applied modifiers

Tips

  • Use minParams and maxParams together to define a range (e.g., 3-5 parameters).
  • Wildcard patterns use * for any characters: get* matches getUser, getAll, getById.
  • Modifier matching is AND-based: ["async", "public"] finds functions that are both async and public.
  • This tool is great for code quality audits — find functions with too many parameters, missing access modifiers, or inconsistent naming.
  • Combine with stellarion_analyze_complexity to find complex functions with specific shapes.