Skip to main content
Glama

cli_remove

Remove archived snapshots from ArchiveBox using timestamp filters and pattern matching to manage storage and clean up outdated content.

Instructions

Execute archivebox remove command.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
deleteNoDelete matching snapshots
afterNoFilter snapshots after timestamp
beforeNoFilter snapshots before timestamp
filter_typeNoFilter typeexact
filter_patternsNoList of filter patterns
extra_dataNoAdditional parameters as a dictionary

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Primary handler and registration for the MCP tool 'cli_remove'. Includes input schema definitions using Pydantic Fields and the execution logic that wraps the ArchiveBox API client call.
    @mcp.tool(
        exclude_args=[
            "archivebox_url",
            "username",
            "password",
            "token",
            "api_key",
            "verify",
        ],
        tags={"cli"},
    )
    def cli_remove(
        delete: bool = Field(True, description="Delete matching snapshots"),
        after: Optional[float] = Field(0, description="Filter snapshots after timestamp"),
        before: Optional[float] = Field(
            999999999999999, description="Filter snapshots before timestamp"
        ),
        filter_type: str = Field("exact", description="Filter type"),
        filter_patterns: Optional[List[str]] = Field(
            None, description="List of filter patterns"
        ),
        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 remove command.
        """
        client = Api(
            url=archivebox_url,
            username=username,
            password=password,
            token=token,
            api_key=api_key,
            verify=verify,
        )
        response = client.cli_remove(
            delete=delete,
            after=after,
            before=before,
            filter_type=filter_type,
            filter_patterns=filter_patterns,
            extra_data=extra_data,
        )
        return response.json()
  • Supporting helper method in the ArchiveBoxApi class that performs the actual HTTP POST request to the ArchiveBox server's /api/v1/cli/remove endpoint.
    @require_auth
    def cli_remove(
        self,
        delete: bool = True,
        after: Optional[float] = 0,
        before: Optional[float] = 999999999999999,
        filter_type: str = "exact",
        filter_patterns: Optional[List[str]] = None,
        extra_data: Optional[Dict] = None,
    ) -> requests.Response:
        """
        Execute archivebox remove command
    
        Args:
            delete: Delete matching snapshots (default: True).
            after: Filter snapshots after timestamp (default: 0).
            before: Filter snapshots before timestamp (default: 999999999999999).
            filter_type: Filter type (default: "exact").
            filter_patterns: List of filter patterns (default: ["https://example.com"]).
            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/remove",
                json=data,
                headers=self.headers,
                verify=self.verify,
            )
        except ValidationError as e:
            raise ParameterError(f"Invalid parameters: {e.errors()}")
        return response
Behavior1/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 provides almost none. 'Execute archivebox remove command' doesn't indicate whether this is a destructive operation (though 'remove' implies it might be), what permissions are required, whether changes are reversible, what happens to the removed data, or what the response looks like. For a tool with 'remove' in its name and no safety annotations, this is dangerously insufficient.

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 - a single sentence that gets straight to the point without any wasted words. While it's under-specified in terms of content, it's perfectly efficient in form. There's no unnecessary elaboration or redundant information.

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 that this is a 'remove' operation with no annotations and 6 parameters, the description is severely incomplete. While an output schema exists (which helps with understanding return values), the description doesn't address the critical behavioral aspects of a removal operation: what gets removed, under what conditions, with what consequences. For a potentially destructive tool in a system managing snapshots, this is 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 schema description coverage is 100%, with all 6 parameters well-documented in the schema itself. The description adds no additional parameter information beyond what's already in the schema. According to the scoring rules, when schema coverage is high (>80%), the baseline is 3 even with no parameter information in the description, which applies here.

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 remove command' is tautological - it essentially restates the tool name 'cli_remove' with slightly different wording. While it indicates this is a removal operation for ArchiveBox, it doesn't specify what exactly gets removed (snapshots, based on the parameters) or how this differs from other removal operations that might exist. It's more specific than just 'remove' but still quite vague about the actual resource being operated on.

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 absolutely no guidance about when to use this tool versus alternatives. There's no mention of prerequisites, when this removal operation is appropriate, what the consequences are, or how it relates to sibling tools like cli_add, cli_list, or cli_update. The agent receives no contextual information about appropriate usage scenarios.

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