Skip to main content
Glama

cli_list

List and filter archived snapshots from ArchiveBox with customizable sorting, status filters, and output formats including JSON, HTML, or CSV.

Instructions

Execute archivebox list command.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
filter_patternsNoList of filter patterns
filter_typeNoFilter typesubstring
statusNoFilter by statusindexed
afterNoFilter snapshots after timestamp
beforeNoFilter snapshots before timestamp
sortNoSort fieldbookmarked_at
as_jsonNoOutput as JSON
as_htmlNoOutput as HTML
as_csvNoOutput as CSV or fields to includetimestamp,url
with_headersNoInclude headers in output
extra_dataNoAdditional parameters as a dictionary

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Registers the MCP tool named 'cli_list' with excluded authentication arguments and 'cli' tag.
    @mcp.tool(
        exclude_args=[
            "archivebox_url",
            "username",
            "password",
            "token",
            "api_key",
            "verify",
        ],
        tags={"cli"},
    )
  • The primary handler for the 'cli_list' MCP tool. It constructs an ArchiveBox API client using provided or env-based credentials and invokes the client's cli_list method to execute the listing logic, returning the JSON response.
    def cli_list(
        filter_patterns: Optional[List[str]] = Field(
            None, description="List of filter patterns"
        ),
        filter_type: str = Field("substring", description="Filter type"),
        status: Optional[str] = Field("indexed", description="Filter by status"),
        after: Optional[float] = Field(0, description="Filter snapshots after timestamp"),
        before: Optional[float] = Field(
            999999999999999, description="Filter snapshots before timestamp"
        ),
        sort: str = Field("bookmarked_at", description="Sort field"),
        as_json: bool = Field(True, description="Output as JSON"),
        as_html: bool = Field(False, description="Output as HTML"),
        as_csv: Union[str, bool] = Field(
            "timestamp,url", description="Output as CSV or fields to include"
        ),
        with_headers: bool = Field(False, description="Include headers in output"),
        extra_data: Optional[Dict] = Field(
            None, description="Additional parameters as a dictionary"
        ),
        archivebox_url: str = Field(
            default=os.environ.get("ARCHIVEBOX_URL", None),
            description="The URL of the ArchiveBox instance",
        ),
        username: Optional[str] = Field(
            default=os.environ.get("ARCHIVEBOX_USERNAME", None),
            description="Username for authentication",
        ),
        password: Optional[str] = Field(
            default=os.environ.get("ARCHIVEBOX_PASSWORD", None),
            description="Password for authentication",
        ),
        token: Optional[str] = Field(
            default=os.environ.get("ARCHIVEBOX_TOKEN", None),
            description="Bearer token for authentication",
        ),
        api_key: Optional[str] = Field(
            default=os.environ.get("ARCHIVEBOX_API_KEY", None),
            description="API key for authentication",
        ),
        verify: Optional[bool] = Field(
            default=to_boolean(os.environ.get("ARCHIVEBOX_VERIFY", "True")),
            description="Whether to verify SSL certificates",
        ),
    ) -> dict:
        """
        Execute archivebox list command.
        """
        client = Api(
            url=archivebox_url,
            username=username,
            password=password,
            token=token,
            api_key=api_key,
            verify=verify,
        )
        response = client.cli_list(
            filter_patterns=filter_patterns,
            filter_type=filter_type,
            status=status,
            after=after,
            before=before,
            sort=sort,
            as_json=as_json,
            as_html=as_html,
            as_csv=as_csv,
            with_headers=with_headers,
            extra_data=extra_data,
        )
        return response.json()
  • Supporting helper method in the Api class that sends a POST request to the ArchiveBox server's /api/v1/cli/list endpoint with the provided parameters to list snapshots.
    def cli_list(
        self,
        filter_patterns: Optional[List[str]] = None,
        filter_type: str = "substring",
        status: Optional[str] = "indexed",
        after: Optional[float] = 0,
        before: Optional[float] = 999999999999999,
        sort: str = "bookmarked_at",
        as_json: bool = True,
        as_html: bool = False,
        as_csv: Union[str, bool] = "timestamp,url",
        with_headers: bool = False,
        extra_data: Optional[Dict] = None,
    ) -> requests.Response:
        """
        Execute archivebox list command
    
        Args:
            filter_patterns: List of filter patterns (default: ["https://example.com"]).
            filter_type: Filter type (default: "substring").
            status: Filter by status (default: "indexed").
            after: Filter snapshots after timestamp (default: 0).
            before: Filter snapshots before timestamp (default: 999999999999999).
            sort: Sort field (default: "bookmarked_at").
            as_json: Output as JSON (default: True).
            as_html: Output as HTML (default: False).
            as_csv: Output as CSV or fields to include (default: "timestamp,url").
            with_headers: Include headers in output (default: False).
            extra_data: Additional parameters as a dictionary (optional).
    
        Returns:
            Response: The response object from the POST request.
    
        Raises:
            ParameterError: If the provided parameters are invalid.
        """
        data = {
            k: v
            for k, v in locals().items()
            if k != "self" and v is not None and k != "extra_data"
        }
        if filter_patterns is None:
            data["filter_patterns"] = ["https://example.com"]
        if extra_data:
            data.update(extra_data)
        try:
            response = self._session.post(
                url=f"{self.url}/api/v1/cli/list",
                json=data,
                headers=self.headers,
                verify=self.verify,
            )
        except ValidationError as e:
            raise ParameterError(f"Invalid parameters: {e.errors()}")
        return response
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 but offers minimal information. It mentions 'execute' which implies this is a command execution tool, but doesn't describe what happens when run (does it modify data? is it read-only? what permissions are needed? what's the output format?). The description lacks critical behavioral context for a tool with 11 parameters.

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?

The description is maximally concise at just 4 words. While this represents under-specification rather than ideal conciseness, according to the scoring rules, it earns a 5 for having zero wasted words and being front-loaded with the core action.

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?

For a tool with 11 parameters, no annotations, and multiple sibling alternatives, the description is severely incomplete. While there is an output schema (which reduces the need to describe return values), the description fails to explain what this tool actually does, when to use it, or how it behaves. The combination of complexity and lack of contextual information makes this inadequate.

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?

The description provides no parameter information whatsoever, but the input schema has 100% description coverage with detailed parameter documentation. Since the schema does all the heavy lifting, the baseline score of 3 is appropriate - the description adds no value beyond what's already in the structured schema.

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

Purpose2/5

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

The description 'Execute archivebox list command' is essentially a tautology that restates the tool name 'cli_list' with slightly different wording. It doesn't specify what resource is being listed (snapshots/archives), what the command actually does, or how it differs from sibling tools like 'get_snapshots' or 'get_snapshot'. The purpose remains vague beyond invoking a CLI command.

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

Usage Guidelines1/5

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

The description provides no guidance on when to use this tool versus alternatives. There are multiple sibling tools that appear related to snapshots/archives (get_snapshots, get_snapshot, cli_add, cli_remove, etc.), but the description offers no comparison, prerequisites, or context for choosing this specific list command over other options.

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/Knuckles-Team/archivebox-api'

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