Skip to main content
Glama
WhiteNightShadow

camoufox-reverse-mcp

list_trace_files

Retrieve a list of trace files stored on disk for post-hoc analysis of debugging sessions.

Instructions

List all trace files on disk (for post-hoc analysis).

Returns: dict with traces_dir, total file count, and file details.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNo

Implementation Reference

  • Handler function for the 'list_trace_files' MCP tool. Scans ~/.cache/camoufox-reverse/traces/ for *.jsonl files, extracts PID and session_id from filenames, collects metadata (size, mtime), sorts by modification time descending, and returns up to `limit` files.
    @mcp.tool()
    async def list_trace_files(limit: int = 20) -> dict:
        """List all trace files on disk (for post-hoc analysis).
    
        Returns:
            dict with traces_dir, total file count, and file details.
        """
        if not TRACES_DIR.exists():
            return {"files": [], "total": 0, "traces_dir": str(TRACES_DIR)}
    
        all_files = []
        for f in TRACES_DIR.glob("*.jsonl"):
            try:
                parts = f.stem.split("_")
                file_pid = int(parts[0]) if parts else -1
                session_id = int(parts[1]) if len(parts) > 1 else -1
            except (IndexError, ValueError):
                continue
    
            size_kb = f.stat().st_size / 1024
            all_files.append({
                "path": str(f),
                "pid": file_pid,
                "session_id": session_id,
                "size_kb": round(size_kb, 1),
                "mtime": f.stat().st_mtime,
            })
    
        all_files.sort(key=lambda x: x["mtime"], reverse=True)
        return {
            "traces_dir": str(TRACES_DIR),
            "total": len(all_files),
            "returned": min(len(all_files), limit),
            "files": all_files[:limit],
        }
  • Registration: the trace module (containing list_trace_files) is imported in server.py line 25, which triggers the @mcp.tool() decorator registration.
    from .tools import trace            # noqa: E402, F401  — trace_property_access + list/query
  • Helper: defines the TRACES_DIR path constant (~/.cache/camoufox-reverse/traces) which list_trace_files reads from.
    CACHE_DIR = Path.home() / ".cache" / "camoufox-reverse"
    CONTROL_DIR = CACHE_DIR / "control"
    TRACES_DIR = CACHE_DIR / "traces"
Behavior2/5

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

No annotations provided, so description carries full burden. Only mentions return format but no safety traits (e.g., read-only, requires permissions) or side effects. Lacks basic behavioral disclosure for a file operation.

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?

Extremely concise: two sentences, front-loaded with purpose in first sentence. No redundant words, every part adds value.

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?

Missing explanation of the 'limit' parameter and context about file location, ordering, or performance. Without output schema, the return format info is helpful but incomplete for a list operation.

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?

Schema description coverage is 0%, and the description does not mention the 'limit' parameter at all. Fails to explain its purpose or effect, leaving the agent to infer from the default value.

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?

Clearly states the verb 'list' and resource 'trace files on disk', with context 'for post-hoc analysis'. Distinguishes from sibling 'query_trace_file' by emphasizing listing all files.

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 on when to use this tool vs alternatives like query_trace_file. Implied usage from 'post-hoc analysis' but no explicit recommendations or exclusions.

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/WhiteNightShadow/camoufox-reverse-mcp'

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