find_api_usage_examples
Find real usage examples of APIs, functions, or classes in your codebase to learn correct usage patterns and common practices before making changes.
Instructions
Find real usage examples of APIs, functions, or classes in the codebase.
Use this tool when you need to:
Learn how to properly use an existing API by seeing real examples
Understand the different ways an API is used across the codebase
Find patterns and best practices for API usage
See what parameters are commonly used and how
Perfect for learning unfamiliar APIs, understanding usage patterns before making changes, or finding examples to follow when implementing similar functionality.
Args: repo_path: Repository path (absolute) working_directory: Working directory (absolute path) api_name: Name of the API/function/class to find examples for max_examples: Maximum number of examples to return group_by_pattern: Whether to group similar usage patterns together include_test_examples: Whether to include examples from test files show_context_lines: Number of context lines around each usage
Returns: Categorized real usage examples with context and patterns
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| api_name | Yes | ||
| repo_path | Yes | ||
| max_examples | No | ||
| group_by_pattern | No | ||
| working_directory | Yes | ||
| show_context_lines | No | ||
| include_test_examples | No |