Skip to main content
Glama

list_profiles

Retrieve a list of all profile IDs captured in the current Scalene profiling session for access and management.

Instructions

List all captured profiles in this session.

Returns: [profile_id, ...]

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • Main handler function for the 'list_profiles' MCP tool. Returns a list of profile IDs from the in-memory recent_profiles dictionary.
    async def list_profiles() -> list[str]:
        """List all captured profiles in this session.
        
        Returns: [profile_id, ...]
        """
        return list(recent_profiles.keys())
  • Registers list_profiles as an MCP tool on the FastMCP server.
    server.tool(list_profiles)
  • In-memory store for profile results, typed as dict[str, ProfileResult]. The list_profiles tool returns keys from this dict.
    recent_profiles: dict[str, ProfileResult] = {}
  • Alternative list_profiles implementation in ProfileStorage class for persistent file-based storage. Uses glob to list .json files.
    def list_profiles(self) -> list[str]:
        """
        List all stored profile IDs.
    
        Returns:
            List of profile IDs
        """
        return [
            p.stem for p in self.storage_dir.glob("*.json")
        ]
Behavior3/5

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

The description states it returns a list of profile IDs, which is adequate for a simple listing operation. However, it does not disclose potential side effects (likely none), authorization needs, or any limitations like pagination. With no annotations, the description carries the full burden, and it meets minimal expectations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is extremely concise, using two sentences to convey purpose and return format. No extraneous information, front-loaded with the core action.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple zero-parameter listing tool, the description covers the essential purpose and output format. With an output schema existing (though not provided), the return type is covered. It is complete enough for the tool's simplicity, though could mention if only available for current session scope.

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

Parameters4/5

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

The tool has no parameters (schema coverage 100% for empty params). The description adds value by explaining the return format, which goes beyond the schema. According to guidelines, 0 parameters warrant a baseline of 4, and the description compensates adequately.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool lists all captured profiles in the session and specifies the return format (list of profile IDs). It is specific with verb 'list' and resource 'profiles', but does not differentiate itself from sibling tools like 'profile' or 'compare_profiles'.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives (e.g., 'profile' for a single profile, 'compare_profiles' for comparisons). It does not mention any prerequisites or contexts where listing is appropriate.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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/ptmorris05/scalene-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server