PyEye Server
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| PYEYE_POOL_TTL | No | Connection time-to-live in seconds | 3600 |
| PYEYE_CACHE_TTL | No | Cache time-to-live in seconds | 300 |
| PYEYE_MAX_WORKERS | No | Maximum concurrent analysis workers | 4 |
| PYEYE_MAX_PROJECTS | No | Maximum number of projects in memory | 10 |
| PYEYE_MAX_FILE_SIZE | No | Maximum file size to analyze (bytes) | 1048576 |
| PYEYE_ANALYSIS_TIMEOUT | No | Analysis timeout in seconds | 30.0 |
| PYEYE_WATCHER_DEBOUNCE | No | File watcher debounce delay in seconds | 0.5 |
| PYEYE_POOL_MAX_CONNECTIONS | No | Maximum pooled project connections | 10 |
| PYEYE_ENABLE_MEMORY_PROFILING | No | Enable memory profiling | false |
| PYEYE_ENABLE_CONNECTION_POOLING | No | Enable connection pooling for multiple projects | true |
| PYEYE_ENABLE_PERFORMANCE_METRICS | No | Enable performance metrics | false |
Capabilities
Features and capabilities supported by this server
| Capability | Details |
|---|---|
| tools | {
"listChanged": false
} |
| prompts | {
"listChanged": false
} |
| resources | {
"subscribe": false,
"listChanged": false
} |
| experimental | {} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| configure_packagesA | Python: Configure additional packages, namespaces, and standalone scripts for analysis. Args: packages: List of package paths to include namespaces: Namespace packages with their repo paths standalone_dirs: Directories containing standalone Python scripts recursive: Scan standalone directories recursively file_pattern: Glob pattern for standalone files exclude_patterns: Patterns to exclude from standalone scanning save: Save configuration to .pyeye.json |
| resolveA | Python: Resolve any identifier form to a canonical Handle. Accepts bare names, FQN dotted paths, re-exported public paths, file:line coordinates, or file paths. Returns the definition-site canonical handle along with kind and scope ("project" or "external"). Args: identifier: The identifier to resolve. Forms supported: - Bare name: "Config" - FQN: "a.b.c.Config" - Re-exported: "package.Config" (collapses to definition site) - File:line: "src/foo.py:42" - File only: "src/foo.py" project_path: Project root path (default: current directory) Returns: ResolveResult dict — one of: - Success: {"found": True, "handle": str, "kind": str, "scope": "project"|"external"} - Ambiguous: {"found": True, "ambiguous": True, "candidates": [...]} - Not found: {"found": False, "reason": str} |
| resolve_atA | Python: Resolve a (file, line, column) position to a canonical Handle. Used when you have coordinates (from a stack trace, error report, or pasted excerpt) rather than a name. Returns the same shape as resolve(). Args: file: Absolute or project-relative path to the source file. line: 1-indexed line number. column: 0-indexed column number. Pass 0 for the start of the line — this is valid; do not coerce to a default. project_path: Project root path (default: current directory) Returns: ResolveResult dict (see resolve() for shape). |
| inspectA | Python: Inspect a canonical handle and return a structural Node. The "what is this?" operation. Returns the symbol's kind, location, signature, docstring, and kind-dependent fields. Cheap by default — no source content, no exhaustive enumerations. Edge counts and highlights come in later phases. Args: handle: Canonical Python dotted-name string (from resolve/resolve_at). project_path: Project root path (default: current directory) Returns: Node dict with universal fields (handle, kind, scope, location, docstring, edge_counts={}) plus kind-dependent fields: - class: signature (constructor), superclasses (list of Handle strings) - function/method: signature, parameters, return_type?, is_async, is_classmethod, is_staticmethod - module: is_package, package? - attribute/property/variable: type?, default? (simple literals only) |
| expandA | Python: Expand one outbound edge from a canonical handle (single hop). The traversal primitive that walks ONE edge from a source handle and returns adjacent symbols as lightweight Stubs. Use resolve()/inspect() first to obtain a canonical handle, then call expand() to traverse. Supported edges (the complete static/outbound set):
Unsupported edges return the unsupported branch (never raise):
Response shape — discriminated union: Supported branch ( Unsupported branch ( Each Stub carries: Relationship to deprecated tools: Args:
handle: Canonical Python dotted-name string (from resolve/inspect).
edge: The outbound edge to expand (e.g. Returns: ExpandResult dict — supported branch or unsupported branch (see above). Never raises; unresolvable source handles yield graceful supported-empty results consistent with inspect()'s minimal-node contract. |
| traceA | Python: Bounded multi-hop BFS traversal — returns a typed Subgraph. The composition primitive: it walks the Composes the same edge registry as Response shape — Edges are NOT deduped across kinds; edges to already-visited handles are
recorded (so cycles stay visible) but never re-expanded, guaranteeing
termination on cyclic graphs. Args:
start: One canonical handle, or a list of them, as BFS roots.
follow: Edge names to traverse at every hop (e.g. Returns:
A |
| outlineA | Python: Structural skeleton of a module or class — names, kinds, signatures, line spans. Returns a nested Use Static-surface ceiling. The tree walks the Absence contracts — an agent MUST read these before consuming the tree. Contract 1 —
Contract 2 —
Truncation reasons (one string per node — not a list):
When both Args:
handle: Canonical Python dotted-name string (from resolve/inspect).
project_path: Project root path (default: current directory).
max_depth: Maximum depth from the root (root is depth 0). Returns:
|
| find_referencesA | Python: Find ALL usages of a symbol. Understands inheritance - grep misses subclass refs. For general use, prefer lookup() which accepts any identifier form. This tool provides fields filtering, include_subclasses, and symbol_name for full reference lists. Two calling conventions (coordinates take precedence if both provided):
If symbol_name matches multiple symbols, returns error with a "matches" list so you can pick the right one and retry with coordinates. Args: file: Path to the file (required with line and column) line: Line number (1-indexed, required with file and column) column: Column number (0-indexed, required with file and line) symbol_name: Symbol name (alternative to file+line+column) project_path: Root path of the project include_definitions: Include definitions in results include_subclasses: Also find references to all subclasses (polymorphic search) fields: Fields to include per reference. Valid: name, type, line, column, description, full_name, file, is_definition. Default: all fields. |
| get_call_hierarchyA | Python: Trace function callers and callees through the codebase. Deprecated: Replaced by For general use, prefer lookup() which accepts any identifier form. This tool provides full call graph traversal beyond the default limit. Args: function_name: Name of the function file: Optional file to search in (searches whole project if not specified) project_path: Root path of the project |
| analyze_dependenciesA | Python: Map module dependencies and detect circular imports. Semantic analysis grep can't do. Deprecated: Replaced by future For general use, prefer lookup() which accepts any identifier form. This tool provides circular dependency detection and scope filtering for targeted queries. Args: module_path: Import path of the module (e.g., "pyeye.mcp") project_path: Root path of the project scope: Search scope - "main", "all", "namespace:name", or list |
| find_modelsA | Find all Pydantic models in the project. Args: scope: Search scope (default "main"): - "main": Only the main project (default for plugins) - "all": Include configured namespaces - "namespace:name": Specific namespace |
| get_model_schemaA | Get the schema for a specific Pydantic model. Args: model_name: Name of the model to get schema for scope: Search scope (default "main"): - "main": Only the main project (default for plugins) - "all": Include configured namespaces - "namespace:name": Specific namespace |
| find_validatorsA | Find all Pydantic validators in the project. Args: scope: Search scope (default "main"): - "main": Only the main project (default for plugins) - "all": Include configured namespaces - "namespace:name": Specific namespace |
| find_field_validatorsA | Find all field-specific validators. Args: scope: Search scope (default "main"): - "main": Only the main project (default for plugins) - "all": Include configured namespaces - "namespace:name": Specific namespace |
| find_model_configA | Find all model configurations. Args: scope: Search scope (default "main"): - "main": Only the main project (default for plugins) - "all": Include configured namespaces - "namespace:name": Specific namespace |
| trace_model_inheritanceB | Trace the inheritance hierarchy of a Pydantic model. Args: model_name: Name of the model to trace scope: Search scope (default "main"): - "main": Only the main project (default for plugins) - "all": Include configured namespaces - "namespace:name": Specific namespace |
| find_computed_fieldsA | Find all computed fields (properties, computed_field decorator). Args: scope: Search scope (default "main"): - "main": Only the main project (default for plugins) - "all": Include configured namespaces - "namespace:name": Specific namespace |
| find_routesA | Find all Flask routes in the project. Args: scope: Search scope (default "main"): - "main": Only the main project (default for plugins) - "all": Include configured namespaces - "namespace:name": Specific namespace |
| find_blueprintsA | Find all Flask blueprints in the project. Args: scope: Search scope (default "main"): - "main": Only the main project (default for plugins) - "all": Include configured namespaces - "namespace:name": Specific namespace |
| find_viewsA | Find all Flask view functions and classes. Args: scope: Search scope (default "main"): - "main": Only the main project (default for plugins) - "all": Include configured namespaces - "namespace:name": Specific namespace |
| find_templatesA | Find all Flask templates and render_template calls. Args: scope: Search scope (default "main"): - "main": Only the main project (default for plugins) - "all": Include configured namespaces - "namespace:name": Specific namespace |
| find_extensionsA | Find Flask extensions in use. Args: scope: Search scope (default "main"): - "main": Only the main project (default for plugins) - "all": Include configured namespaces - "namespace:name": Specific namespace |
| find_configA | Find Flask configuration files and app.config usage. Args: scope: Search scope (default "main"): - "main": Only the main project (default for plugins) - "all": Include configured namespaces - "namespace:name": Specific namespace |
| find_error_handlersA | Find error handler functions. Args: scope: Search scope (default "main"): - "main": Only the main project (default for plugins) - "all": Include configured namespaces - "namespace:name": Specific namespace |
| find_cli_commandsB | Find Flask CLI commands. Args: scope: Search scope (default "main"): - "main": Only the main project (default for plugins) - "all": Include configured namespaces - "namespace:name": Specific namespace |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
| get_find_references_workflow | Get the Find All References workflow. This workflow shows how to find ALL usages of a class/function, including both package code and standalone scripts/notebooks. Returns: Markdown workflow documentation |
| get_refactoring_workflow | Get the Safe Refactoring workflow. This workflow guides through safe refactoring by analyzing subclasses, references, and dependencies before making changes. Returns: Markdown workflow documentation |
| get_code_understanding_workflow | Get the Code Understanding workflow. This workflow helps understand unfamiliar code by systematically exploring structure, relationships, and usage patterns. Returns: Markdown workflow documentation |
| get_dependency_analysis_workflow | Get the Dependency Analysis workflow. This workflow helps analyze module dependencies, import relationships, and architectural patterns in Python projects. Returns: Markdown workflow documentation |
| get_code_review_standards_workflow | Get the Python Code Review Standards workflow. This workflow provides industry best practices for Python code review including PEP standards, modern Python features, type safety, testing, and anti-pattern detection with MCP-enhanced semantic analysis. Returns: Markdown workflow documentation |
| get_code_review_security_workflow | Get the Python Security Code Review workflow. This workflow provides OWASP security guidelines for Python code review including input validation, injection prevention, authentication patterns, and data flow analysis using MCP tools. Returns: Markdown workflow documentation |
| get_code_review_pr_workflow | Get the Complete Pull Request Review workflow. This workflow provides a comprehensive PR review process combining automated checks, semantic analysis, code standards, security review, and manual review best practices. Returns: Markdown workflow documentation |
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/okeefeco/pyeye-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server