Skip to main content
Glama

cli_schedule

Schedule automated web archiving tasks in ArchiveBox to capture and preserve URLs at specified intervals with customizable crawl depth and tagging.

Instructions

Execute archivebox schedule command.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
import_pathNoPath to import file
addNoEnable adding new URLs
everyNoSchedule frequency (e.g., 'daily')
tagNoComma-separated tags
depthNoCrawl depth
overwriteNoOverwrite existing files
updateNoUpdate existing snapshots
clearNoClear existing schedules
extra_dataNoAdditional parameters as a dictionary

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • MCP handler for 'cli_schedule' tool: decorated with @mcp.tool(), defines input schema via Pydantic Fields, creates Api client, calls client.cli_schedule(), and returns JSON response. This is the primary implementation and registration point.
    @mcp.tool(
        exclude_args=[
            "archivebox_url",
            "username",
            "password",
            "token",
            "api_key",
            "verify",
        ],
        tags={"cli"},
    )
    def cli_schedule(
        import_path: Optional[str] = Field(None, description="Path to import file"),
        add: bool = Field(False, description="Enable adding new URLs"),
        every: Optional[str] = Field(
            None, description="Schedule frequency (e.g., 'daily')"
        ),
        tag: str = Field("", description="Comma-separated tags"),
        depth: int = Field(0, description="Crawl depth"),
        overwrite: bool = Field(False, description="Overwrite existing files"),
        update: bool = Field(False, description="Update existing snapshots"),
        clear: bool = Field(False, description="Clear existing schedules"),
        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 schedule command.
        """
        client = Api(
            url=archivebox_url,
            username=username,
            password=password,
            token=token,
            api_key=api_key,
            verify=verify,
        )
        response = client.cli_schedule(
            import_path=import_path,
            add=add,
            every=every,
            tag=tag,
            depth=depth,
            overwrite=overwrite,
            update=update,
            clear=clear,
            extra_data=extra_data,
        )
        return response.json()
  • Supporting Api.cli_schedule method: constructs JSON payload from arguments and sends POST request to ArchiveBox server's /api/v1/cli/schedule endpoint.
    def cli_schedule(
        self,
        import_path: Optional[str] = None,
        add: bool = False,
        every: Optional[str] = None,
        tag: str = "",
        depth: int = 0,
        overwrite: bool = False,
        update: bool = False,
        clear: bool = False,
        extra_data: Optional[Dict] = None,
    ) -> requests.Response:
        """
        Execute archivebox schedule command
    
        Args:
            import_path: Path to import file (optional).
            add: Enable adding new URLs (default: False).
            every: Schedule frequency (e.g., "daily").
            tag: Comma-separated tags (default: "").
            depth: Crawl depth (default: 0).
            overwrite: Overwrite existing files (default: False).
            update: Update existing snapshots (default: False).
            clear: Clear existing schedules (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 extra_data:
            data.update(extra_data)
        try:
            response = self._session.post(
                url=f"{self.url}/api/v1/cli/schedule",
                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 full burden for behavioral disclosure but offers minimal information. 'Execute archivebox schedule command' implies this triggers some scheduled process but doesn't describe what the schedule does (e.g., periodic URL imports, automated updates), whether it runs immediately or sets up future execution, what permissions are needed, or what side effects occur. The description lacks crucial behavioral context for a scheduling tool.

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 extremely concise at just 4 words. While this brevity comes at the cost of completeness, the description is front-loaded with the core action and wastes no words. For conciseness alone, this is optimal.

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 this is a scheduling tool with 9 parameters, no annotations, and sibling CLI tools, the description is severely incomplete. While an output schema exists (which reduces need to describe return values), the description fails to explain what scheduling means in this context, how it differs from immediate operations, what gets scheduled, or any behavioral characteristics. For a complex scheduling tool, this minimal description 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?

Schema description coverage is 100%, so all parameters are documented in the schema itself. The description adds no parameter information beyond what's in the schema. The baseline score of 3 reflects that the schema adequately documents parameters, though the description provides no additional semantic context about how parameters interact or typical usage patterns.

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 schedule command' is tautological - it essentially restates the tool name 'cli_schedule' with slightly different wording. While it indicates this is a command execution tool for scheduling, it doesn't specify what kind of scheduling (e.g., URL import scheduling, snapshot scheduling) or what resource it operates on, nor does it differentiate from sibling tools like cli_add or cli_update.

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 CLI tools (cli_add, cli_list, cli_remove, cli_update) but no indication of when schedule operations are appropriate versus direct add/update operations, or what prerequisites might exist for scheduling functionality.

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