Skip to main content
Glama

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
SCALENE_TIMEOUTNoTimeout in seconds for profiling sessions.
SCALENE_MALLOC_THRESHOLDNoOverride default malloc threshold in bytes for reporting.
SCALENE_PYTHON_EXECUTABLENoThe Python executable to use for profiling (e.g., python3.11).
SCALENE_CPU_PERCENT_THRESHOLDNoOverride default CPU percentage threshold for reporting high-activity lines.

Instructions

Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.

This server publishes no instructions, or was last inspected before Glama recorded them.

Capabilities

Features and capabilities supported by this server

Protocol revision2025-11-25

CapabilityDetails
tools
{
  "listChanged": true
}
prompts
{
  "listChanged": false
}
resources
{
  "subscribe": false,
  "listChanged": false
}
experimental
{
  "tasks": {
    "list": {},
    "cancel": {},
    "requests": {
      "tools": {
        "call": {}
      },
      "prompts": {
        "get": {}
      },
      "resources": {
        "read": {}
      }
    }
  }
}

Tools

Functions exposed to the LLM to take actions

NameDescription
get_project_rootA

Get the detected project root and structure type.

Returns: {root, type, markers_found}

list_project_filesA

List project files matching pattern, relative to project root.

Args: pattern: Glob pattern (*.py, src/**, etc.) max_depth: Maximum directory depth to search exclude_patterns: Comma-separated patterns to exclude

Returns: [relative_path, ...] sorted alphabetically

set_project_contextA

Explicitly set the project root (overrides auto-detection).

Use this if auto-detection fails or gives wrong path.

Args: project_root: Absolute path to project root

Returns: {project_root, status}

profileA

Profile Python code using Scalene.

Args: type: "script" (profile a file) or "code" (profile code snippet) script_path: Required if type="script". Path to Python script code: Required if type="code". Python code to execute cpu_only: Skip memory/GPU profiling include_memory: Profile memory allocations include_gpu: Profile GPU usage (requires NVIDIA GPU) reduced_profile: Show only lines >1% CPU or >100 allocations profile_only: Comma-separated paths to include (e.g., "myapp") profile_exclude: Comma-separated paths to exclude (e.g., "test,vendor") use_virtual_time: Measure CPU time excluding I/O wait cpu_percent_threshold: Minimum CPU % to report malloc_threshold: Minimum allocation bytes to report script_args: Command-line arguments for the script

Returns: {profile_id, summary, text_summary}

analyzeA

Analyze profiling data with flexible analysis types.

Args: profile_id: Profile ID from profile() metric_type: "all", "cpu", "memory", "gpu", "bottlenecks", "leaks", "file", "functions", "recommendations" top_n: Number of items to return (for rankings) cpu_threshold: Minimum CPU % to flag bottleneck memory_threshold_mb: Minimum MB to flag bottleneck filename: Required if metric_type="file", file to analyze

Returns: {metric_type, data, summary} structure varies by metric_type

compare_profilesA

Compare two profiles to measure optimization impact.

Args: before_id: Profile ID from original code after_id: Profile ID from optimized code

Returns: {runtime_change_pct, memory_change_pct, improvements, regressions, summary_text}

list_profilesA

List all captured profiles in this session.

Returns: [profile_id, ...]

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

TDQS

A4.1/5.0

Scored across 7 tools

Disambiguation5/5

Each tool targets a distinct action: creating profiles, listing them, analyzing, comparing, and managing project context. No two tools have overlapping responsibilities, and descriptions clearly differentiate their purposes.

Naming Consistency4/5

All tool names use snake_case and follow a verb or verb_noun pattern. However, 'analyze' and 'profile' are single-word verbs while others are multi-word, which is a minor inconsistency but still clear.

Tool Count5/5

With 7 tools, the server covers the essential profiling workflow: creation, listing, analysis, comparison, and project management. This count is well-scoped without being excessive or insufficient.

Completeness5/5

The tool surface covers the full lifecycle of profiling: profile creation, listing, detailed analysis, comparison, project file selection, and root configuration. No critical gaps are apparent for typical usage.

Maintenance

ActivityInactive
ResponsivenessNo issues