Skip to main content
Glama
heizaheiza

Charles MCP Server

list_recordings

Retrieve saved network traffic recordings from Charles Proxy for historical analysis and debugging.

Instructions

List saved recording files using an explicit history-oriented tool name.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
itemsYes
warningsNo
total_itemsYes

Implementation Reference

  • The MCP tool definition for 'list_recordings', which calls the service layer.
    @mcp.tool()
    async def list_recordings(ctx: ToolContext) -> RecordingListResult:
        """List saved recording files using an explicit history-oriented tool name."""
        deps = get_tool_dependencies(ctx)
        return deps.history_service.list_recordings_result()
  • The core logic to list recording files in the history service.
    def list_recordings(self) -> list[dict]:
        files = list_files_with_extension(self.config.package_dir, ".chlsj")
        result: list[dict] = []
        for filename in sorted(files):
            filepath = os.path.join(self.config.package_dir, filename)
            try:
                stat = os.stat(filepath)
                result.append(
                    {
                        "filename": filename,
                        "size": format_bytes(stat.st_size),
                        "size_bytes": stat.st_size,
                        "path": filepath,
                    }
                )
            except OSError:
                result.append({"filename": filename, "error": "unable_to_read_file_metadata"})
        return result
  • A wrapper method in the history service that prepares the result object for the MCP tool.
    def list_recordings_result(self) -> RecordingListResult:
        items: list[RecordingFileInfo] = []
        warnings: list[str] = []
        for record in self.list_recordings():
            if "error" in record:
                continue
            items.append(RecordingFileInfo(**record))
    
        if not items:
            warnings.append("no_saved_recordings")
    
        return RecordingListResult(
            items=items,
            total_items=len(items),
            warnings=warnings,
        )
Behavior2/5

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

No annotations are provided, so the description carries the full disclosure burden. It fails to mention whether this is read-only, idempotent, performant, or what scope of recordings are returned (all vs. filtered). The agent gets no behavioral hints beyond the basic action.

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

Conciseness3/5

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

While brief, the second clause ('using an explicit history-oriented tool name') is meta-commentary about the tool's naming convention that provides zero value to an AI agent trying to select or invoke the tool. This constitutes wasted space in a short description.

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

Completeness3/5

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

Given zero input parameters and the existence of an output schema, the description adequately covers the minimal input requirements. However, it lacks domain context about what constitutes a 'recording' in this system (e.g., Charles Proxy recordings vs. sessions) and omits any mention of the output structure despite the presence of an output schema reducing the burden.

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 zero parameters with 100% schema description coverage. Per the scoring rules, zero-parameter tools receive a baseline score of 4 since there are no parameter semantics to describe beyond what the empty schema already conveys.

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 core action ('List saved recording files') with a specific verb and resource. However, it does not differentiate from siblings like 'list_sessions' or 'query_recorded_traffic', leaving ambiguity about when to choose this over similar tools.

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?

No explicit guidance on when to use this tool versus alternatives like 'list_sessions' or 'query_recorded_traffic'. The phrase 'history-oriented' weakly implies use for historical data but lacks concrete when-to-use or when-not-to-use criteria.

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/heizaheiza/Charles-mcp'

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