Skip to main content
Glama
heizaheiza

Charles MCP Server

read_live_capture

Read incremental network traffic from Charles Proxy captures to monitor real-time HTTP/HTTPS requests with compact summaries (host/method/path/status). Advances cursor automatically for new entries only.

Instructions

Read incremental traffic and advance the cursor. Returns compact entry summaries (host/method/path/status only). Use query_live_capture_entries for structured filtering instead of this tool. This tool advances the internal cursor — repeated calls only return new items.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
capture_idYes
cursorNo
limitNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
itemsYes
statusYes
warningsNo
truncatedNo
capture_idYes
next_cursorYes
total_new_itemsYes

Implementation Reference

  • The handler function 'read_live_capture' is defined in 'charles_mcp/tools/live.py' using the @mcp.tool() decorator. It uses 'live_service' to read capture data and '_compact_read_result' to format the output.
    @mcp.tool()
    async def read_live_capture(
        ctx: ToolContext,
        capture_id: str,
        cursor: Optional[int] = None,
        limit: int = 50,
    ) -> LiveCaptureReadResult:
        """Read incremental traffic and advance the cursor.
        Returns compact entry summaries (host/method/path/status only).
        Use query_live_capture_entries for structured filtering instead of this tool.
        This tool advances the internal cursor — repeated calls only return new items."""
        deps = get_tool_dependencies(ctx)
        try:
            result = await deps.live_service.read(
                capture_id,
                cursor=cursor,
                limit=limit,
            )
            return _compact_read_result(result)
        except Exception as exc:
            raise ValueError(str(exc)) from exc
Behavior4/5

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

With no annotations provided, description carries full burden and succeeds well: discloses cursor advancement (state mutation), return format ('compact entry summaries: host/method/path/status only'), and incremental nature. Minor gap: doesn't explain initial cursor state (null) behavior or error conditions.

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?

Four sentences, zero waste: (1) purpose, (2) return format, (3) sibling alternative, (4) cursor behavior. Front-loaded with action and resource. Every sentence provides unique value not found in structured fields.

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?

Given the tool has an output schema, the description appropriately summarizes return values without redundancy. Covers the critical 'live capture' cursor mechanics thoroughly. Slight deduction for not clarifying the initial cursor=null state, but overall comprehensive for a streaming/polling tool.

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

Parameters3/5

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

Schema has 0% description coverage. Description mentions 'cursor' explicitly and its advancement behavior, but doesn't explain 'capture_id' (what it identifies) or 'limit' beyond implied pagination. Mentions cursor semantics but doesn't fully compensate for the schema's lack of parameter descriptions.

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

Purpose5/5

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

Description opens with specific verb 'Read' + resource 'incremental traffic' and immediately clarifies the core mechanism 'advance the cursor'. It distinguishes from sibling 'query_live_capture_entries' by directing users to that tool for 'structured filtering instead of this tool', and implies distinction from 'peek_live_capture' via the cursor advancement warning.

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

Usage Guidelines5/5

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

Provides explicit alternative: 'Use query_live_capture_entries for structured filtering instead of this tool'. Explains critical usage pattern: 'repeated calls only return new items' due to cursor advancement, which tells the agent when to poll vs when to seek historical data.

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