Skip to main content
Glama

cli_update

Update and manage archived web snapshots in ArchiveBox by executing update commands with options to filter, resume, or index content.

Instructions

Execute archivebox update command.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
resumeNoResume from timestamp
only_newNoUpdate only new snapshots
index_onlyNoIndex without archiving
overwriteNoOverwrite existing files
afterNoFilter snapshots after timestamp
beforeNoFilter snapshots before timestamp
statusNoFilter by statusunarchived
filter_typeNoFilter typesubstring
filter_patternsNoList of filter patterns
extractorsNoComma-separated list of extractors
extra_dataNoAdditional parameters as a dictionary

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler function for the MCP 'cli_update' tool. It defines the tool parameters (schema), registers it via @mcp.tool, and implements the logic by calling the ArchiveBox API client's cli_update method.
    @mcp.tool(
        exclude_args=[
            "archivebox_url",
            "username",
            "password",
            "token",
            "api_key",
            "verify",
        ],
        tags={"cli"},
    )
    def cli_update(
        resume: Optional[float] = Field(0, description="Resume from timestamp"),
        only_new: bool = Field(True, description="Update only new snapshots"),
        index_only: bool = Field(False, description="Index without archiving"),
        overwrite: bool = Field(False, description="Overwrite existing files"),
        after: Optional[float] = Field(0, description="Filter snapshots after timestamp"),
        before: Optional[float] = Field(
            999999999999999, description="Filter snapshots before timestamp"
        ),
        status: Optional[str] = Field("unarchived", description="Filter by status"),
        filter_type: Optional[str] = Field("substring", description="Filter type"),
        filter_patterns: Optional[List[str]] = Field(
            None, description="List of filter patterns"
        ),
        extractors: Optional[str] = Field(
            "", description="Comma-separated list of extractors"
        ),
        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 update command.
        """
        client = Api(
            url=archivebox_url,
            username=username,
            password=password,
            token=token,
            api_key=api_key,
            verify=verify,
        )
        response = client.cli_update(
            resume=resume,
            only_new=only_new,
            index_only=index_only,
            overwrite=overwrite,
            after=after,
            before=before,
            status=status,
            filter_type=filter_type,
            filter_patterns=filter_patterns,
            extractors=extractors,
            extra_data=extra_data,
        )
        return response.json()
  • Supporting helper method in the ArchiveBox API client class that performs the actual HTTP POST request to the ArchiveBox server's /api/v1/cli/update endpoint to execute the update command.
    @require_auth
    def cli_update(
        self,
        resume: Optional[float] = 0,
        only_new: bool = True,
        index_only: bool = False,
        overwrite: bool = False,
        after: Optional[float] = 0,
        before: Optional[float] = 999999999999999,
        status: Optional[str] = "unarchived",
        filter_type: Optional[str] = "substring",
        filter_patterns: Optional[List[str]] = None,
        extractors: Optional[str] = "",
        extra_data: Optional[Dict] = None,
    ) -> requests.Response:
        """
        Execute archivebox update command
    
        Args:
            resume: Resume from timestamp (default: 0).
            only_new: Update only new snapshots (default: True).
            index_only: Index without archiving (default: False).
            overwrite: Overwrite existing files (default: False).
            after: Filter snapshots after timestamp (default: 0).
            before: Filter snapshots before timestamp (default: 999999999999999).
            status: Filter by status (default: "unarchived").
            filter_type: Filter type (default: "substring").
            filter_patterns: List of filter patterns (default: ["https://example.com"]).
            extractors: Comma-separated list of extractors (default: "").
            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/update",
                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. 'Execute archivebox update command' gives minimal insight into what the tool actually does behaviorally—whether it modifies existing data, triggers background processes, requires specific permissions, or has side effects like network calls or file system changes. It doesn't mention output format, error handling, or any constraints like rate limits.

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?

The description is extremely concise at just one sentence with no wasted words. However, this brevity comes at the cost of being under-specified—it's so short that it fails to convey meaningful purpose or usage. While structurally simple, it lacks the necessary detail to be truly helpful, though it's not verbose or poorly organized.

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 complexity (11 parameters, no annotations, but with an output schema), the description is incomplete. It doesn't explain what 'update' means in the ArchiveBox context, what gets updated, or the tool's role relative to siblings. The output schema existence reduces the need to describe return values, but the description fails to provide essential context about the tool's function and behavior, leaving significant gaps for an agent to understand when and how to use it.

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 adds no parameter information beyond what's already in the input schema, which has 100% description coverage for all 11 parameters. Since the schema comprehensively documents each parameter's purpose and defaults, the description doesn't need to compensate, but it also doesn't provide any additional context about how parameters interact or typical usage patterns. This meets the baseline for high schema coverage.

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 update command' is a tautology that essentially restates the tool name 'cli_update'. It doesn't specify what 'update' actually does in the context of ArchiveBox (e.g., updating snapshots, metadata, or the archive itself). While it mentions the verb 'execute' and resource 'archivebox update command', it lacks specificity about what gets updated and for what purpose.

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?

The description provides no guidance on when to use this tool versus alternatives. Given sibling tools like cli_add (likely for adding new content) and cli_list (likely for listing), there's no indication of when 'update' is appropriate versus those operations. No context about prerequisites, timing, or workflow integration is mentioned.

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