Skip to main content
Glama
heizaheiza

Charles MCP Server

get_capture_analysis_stats

Analyze network traffic from live captures or saved recordings to provide coarse traffic class counts, helping identify patterns and issues in API calls, HTTP requests, or errors.

Instructions

Return coarse traffic class counts for a live capture or saved recording.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sourceYes
capture_idNo
recording_pathNo
presetNoapi_focus
scan_limitNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
presetYes
sourceYes
warningsNo
total_itemsNo
scanned_countNo
classified_countsNo

Implementation Reference

  • The handler for the `get_capture_analysis_stats` tool, which delegates to the `traffic_query_service`.
    async def get_capture_analysis_stats(
        ctx: ToolContext,
        source: str,
        capture_id: Optional[str] = None,
        recording_path: Optional[str] = None,
        preset: TrafficPreset = "api_focus",
        scan_limit: int = 500,
    ) -> CaptureAnalysisStatsResult:
        """Return coarse traffic class counts for a live capture or saved recording."""
        deps = get_tool_dependencies(ctx)
        return await deps.traffic_query_service.get_stats(
            source=source,
            capture_id=capture_id,
            recording_path=recording_path,
            preset=preset,
            scan_limit=scan_limit,
        )
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. While 'coarse' hints at granularity limitations, the description omits critical behavioral details: what the 'scan_limit' parameter controls, the computational cost of analysis, whether presets filter input or output, and any side effects on the capture state.

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

Conciseness4/5

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

Single sentence of 10 words that efficiently conveys the core function. Front-loaded with the action verb 'Return'. However, given the tool complexity (5 parameters with 0% schema coverage), this brevity constitutes under-documentation rather than effective conciseness.

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

Completeness2/5

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

Despite having an output schema (reducing the need to describe return values), the description is inadequate for a tool with 5 parameters and complex input logic. Missing: clarification of parameter relationships (capture_id vs recording_path), enumeration semantics for 'preset', and behavioral constraints. Requires significant inference from parameter names alone.

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

Parameters2/5

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

Schema coverage is 0%, requiring the description to compensate for 5 undocumented parameters. While 'live capture or saved recording' hints at the domain for 'capture_id' and 'recording_path', it fails to explain the required 'source' parameter, the enum values for 'preset' (api_focus, errors_only, etc.), or the purpose of 'scan_limit'. Insufficient compensation for zero schema documentation.

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 states a specific action ('Return') and resource ('traffic class counts') with clear scope ('live capture or saved recording'). The qualifier 'coarse' provides useful granularity context. However, it doesn't explicitly distinguish when to use this versus sibling tools like 'analyze_recorded_traffic' or 'group_capture_analysis'.

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 guidance provided on when to use this tool versus alternatives like 'query_recorded_traffic' or 'get_recording_snapshot'. Critically missing: explanation of the relationship between 'capture_id' and 'recording_path' parameters (mutually exclusive? complementary?) and when each should be used.

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