Skip to main content
Glama
heizaheiza

Charles MCP Server

group_capture_analysis

Analyze network traffic by grouping data to identify patterns and hotspots, enabling efficient inspection with reduced token usage for debugging and monitoring.

Instructions

Group analyzed traffic so the agent can inspect hot spots with lower token cost.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sourceYes
group_byYes
capture_idNo
recording_pathNo
presetNoapi_focus
host_containsNo
path_containsNo
method_inNo
status_inNo
resource_class_inNo
min_priority_scoreNo
request_header_nameNo
request_header_value_containsNo
response_header_nameNo
response_header_value_containsNo
request_content_typeNo
response_content_typeNo
request_body_containsNo
response_body_containsNo
request_json_queryNo
response_json_queryNo
max_groupsNo
max_preview_charsNo
max_headers_per_sideNo
scan_limitNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
groupsNo
sourceYes
group_byYes
warningsNo
truncatedNo
total_itemsNo
matched_countNo
scanned_countNo
filtered_out_countNo
filtered_out_by_classNo

Implementation Reference

  • The handler for the 'group_capture_analysis' tool. It constructs a traffic query and uses the traffic_query_service to group the capture results.
    async def group_capture_analysis(
        ctx: ToolContext,
        source: str,
        group_by: TrafficGroupBy,
        capture_id: Optional[str] = None,
        recording_path: Optional[str] = None,
        preset: TrafficPreset = "api_focus",
        host_contains: Optional[str] = None,
        path_contains: Optional[str] = None,
        method_in: Optional[list[str]] = None,
        status_in: Optional[list[int]] = None,
        resource_class_in: Optional[list[str]] = None,
        min_priority_score: Optional[int] = None,
        request_header_name: Optional[str] = None,
        request_header_value_contains: Optional[str] = None,
        response_header_name: Optional[str] = None,
        response_header_value_contains: Optional[str] = None,
        request_content_type: Optional[str] = None,
        response_content_type: Optional[str] = None,
        request_body_contains: Optional[str] = None,
        response_body_contains: Optional[str] = None,
        request_json_query: Optional[str] = None,
        response_json_query: Optional[str] = None,
        max_groups: int = 10,
        max_preview_chars: int = 128,
        max_headers_per_side: int = 6,
        scan_limit: int = 500,
    ) -> CaptureAnalysisGroupsResult:
        """Group analyzed traffic so the agent can inspect hot spots with lower token cost."""
        deps = get_tool_dependencies(ctx)
        query = build_traffic_query(
            preset=preset,
            host_contains=host_contains,
            path_contains=path_contains,
            method_in=method_in,
            status_in=status_in,
            resource_class_in=resource_class_in,
            min_priority_score=min_priority_score,
            request_header_name=request_header_name,
            request_header_value_contains=request_header_value_contains,
            response_header_name=response_header_name,
            response_header_value_contains=response_header_value_contains,
            request_content_type=request_content_type,
            response_content_type=response_content_type,
            request_body_contains=request_body_contains,
            response_body_contains=response_body_contains,
            request_json_query=request_json_query,
            response_json_query=response_json_query,
            include_body_preview=False,
            max_items=max_groups,
            max_preview_chars=max_preview_chars,
            max_headers_per_side=max_headers_per_side,
            scan_limit=scan_limit,
        )
        return await deps.traffic_query_service.group_capture(
            source=source,
            group_by=group_by,
            capture_id=capture_id,
            recording_path=recording_path,
            query=query,
            max_groups=max_groups,
        )
Behavior3/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 and successfully communicates the token efficiency trait ('lower token cost'). However, it fails to disclose safety characteristics (e.g., whether read-only), performance limits, or what constitutes a 'hot spot' in this context.

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

Conciseness2/5

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

The description consists of a single 12-word sentence that is efficiently worded without redundancy. However, for a tool with 25 parameters and complex filtering capabilities, this length is inappropriately brief and fails to front-load critical parameter guidance.

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?

Given the high complexity (25 parameters, 0% schema coverage) and presence of an output schema, the description remains inadequate as it omits all parameter semantics and operational constraints. The mention of 'hot spots' and token cost provides minimal context for the extensive filtering capabilities available.

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

Parameters1/5

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

The input schema contains 25 parameters with 0% description coverage, yet the description mentions none of them, not even the required `source` or `group_by` fields. The single sentence provides no syntax guidance, filtering examples, or explanations for complex parameters like `request_json_query` or `resource_class_in`.

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 'Group[s] analyzed traffic' and specifies the benefit of 'lower token cost' for inspecting 'hot spots.' While it effectively conveys the aggregation purpose, it does not explicitly differentiate from sibling tools like `analyze_recorded_traffic` or `get_traffic_entry_detail` beyond the efficiency hint.

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

Usage Guidelines3/5

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

The description implies usage context by mentioning 'inspect hot spots' and emphasizes the 'lower token cost' benefit, suggesting when to choose this over detailed analysis tools. However, it lacks explicit when-not-to-use guidance or named alternatives among the 17 sibling tools.

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