Skip to main content
Glama

get_snapshots

Retrieve archived webpage snapshots from ArchiveBox with filters for ID, URL, date, tags, and search terms to manage web archives.

Instructions

Retrieve list of snapshots.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idNoFilter by snapshot ID
abidNoFilter by snapshot abid
created_by_idNoFilter by creator ID
created_by_usernameNoFilter by creator username
created_at__gteNoFilter by creation date >= (ISO 8601)
created_at__ltNoFilter by creation date < (ISO 8601)
created_atNoFilter by exact creation date (ISO 8601)
modified_atNoFilter by exact modification date (ISO 8601)
modified_at__gteNoFilter by modification date >= (ISO 8601)
modified_at__ltNoFilter by modification date < (ISO 8601)
searchNoSearch across url, title, tags, id, abid, timestamp
urlNoFilter by URL (exact)
tagNoFilter by tag name (exact)
titleNoFilter by title (icontains)
timestampNoFilter by timestamp (startswith)
bookmarked_at__gteNoFilter by bookmark date >= (ISO 8601)
bookmarked_at__ltNoFilter by bookmark date < (ISO 8601)
with_archiveresultsNoInclude archiveresults in response
limitNoNumber of results to return
offsetNoOffset for pagination
pageNoPage number for pagination
api_key_paramNoAPI key for QueryParamTokenAuth

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • MCP tool registration and handler function for 'get_snapshots'. Defines input schema via Pydantic Fields, creates Api client, calls underlying get_snapshots, and returns JSON response.
    @mcp.tool(
        exclude_args=[
            "archivebox_url",
            "username",
            "password",
            "token",
            "api_key",
            "verify",
        ],
        tags={"core"},
    )
    def get_snapshots(
        id: Optional[str] = Field(None, description="Filter by snapshot ID"),
        abid: Optional[str] = Field(None, description="Filter by snapshot abid"),
        created_by_id: Optional[str] = Field(None, description="Filter by creator ID"),
        created_by_username: Optional[str] = Field(
            None, description="Filter by creator username"
        ),
        created_at__gte: Optional[str] = Field(
            None, description="Filter by creation date >= (ISO 8601)"
        ),
        created_at__lt: Optional[str] = Field(
            None, description="Filter by creation date < (ISO 8601)"
        ),
        created_at: Optional[str] = Field(
            None, description="Filter by exact creation date (ISO 8601)"
        ),
        modified_at: Optional[str] = Field(
            None, description="Filter by exact modification date (ISO 8601)"
        ),
        modified_at__gte: Optional[str] = Field(
            None, description="Filter by modification date >= (ISO 8601)"
        ),
        modified_at__lt: Optional[str] = Field(
            None, description="Filter by modification date < (ISO 8601)"
        ),
        search: Optional[str] = Field(
            None, description="Search across url, title, tags, id, abid, timestamp"
        ),
        url: Optional[str] = Field(None, description="Filter by URL (exact)"),
        tag: Optional[str] = Field(None, description="Filter by tag name (exact)"),
        title: Optional[str] = Field(None, description="Filter by title (icontains)"),
        timestamp: Optional[str] = Field(
            None, description="Filter by timestamp (startswith)"
        ),
        bookmarked_at__gte: Optional[str] = Field(
            None, description="Filter by bookmark date >= (ISO 8601)"
        ),
        bookmarked_at__lt: Optional[str] = Field(
            None, description="Filter by bookmark date < (ISO 8601)"
        ),
        with_archiveresults: bool = Field(
            False, description="Include archiveresults in response"
        ),
        limit: int = Field(10, description="Number of results to return"),
        offset: int = Field(0, description="Offset for pagination"),
        page: int = Field(0, description="Page number for pagination"),
        api_key_param: Optional[str] = Field(
            None, description="API key for QueryParamTokenAuth"
        ),
        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:
        """
        Retrieve list of snapshots.
        """
        client = Api(
            url=archivebox_url,
            username=username,
            password=password,
            token=token,
            api_key=api_key,
            verify=verify,
        )
        response = client.get_snapshots(
            id=id,
            abid=abid,
            created_by_id=created_by_id,
            created_by_username=created_by_username,
            created_at__gte=created_at__gte,
            created_at__lt=created_at__lt,
            created_at=created_at,
            modified_at=modified_at,
            modified_at__gte=modified_at__gte,
            modified_at__lt=modified_at__lt,
            search=search,
            url=url,
            tag=tag,
            title=title,
            timestamp=timestamp,
            bookmarked_at__gte=bookmarked_at__gte,
            bookmarked_at__lt=bookmarked_at__lt,
            with_archiveresults=with_archiveresults,
            limit=limit,
            offset=offset,
            page=page,
            api_key=api_key_param,
        )
        return response.json()
  • Supporting Api client method that performs the HTTP GET request to ArchiveBox API endpoint /api/v1/core/snapshots with query parameters for filtering snapshots.
    @require_auth
    def get_snapshots(
        self,
        id: Optional[str] = None,
        abid: Optional[str] = None,
        created_by_id: Optional[str] = None,
        created_by_username: Optional[str] = None,
        created_at__gte: Optional[str] = None,
        created_at__lt: Optional[str] = None,
        created_at: Optional[str] = None,
        modified_at: Optional[str] = None,
        modified_at__gte: Optional[str] = None,
        modified_at__lt: Optional[str] = None,
        search: Optional[str] = None,
        url: Optional[str] = None,
        tag: Optional[str] = None,
        title: Optional[str] = None,
        timestamp: Optional[str] = None,
        bookmarked_at__gte: Optional[str] = None,
        bookmarked_at__lt: Optional[str] = None,
        with_archiveresults: bool = False,
        limit: int = 200,
        offset: int = 0,
        page: int = 0,
        api_key: Optional[str] = None,
    ) -> requests.Response:
        """
        Retrieve list of snapshots
    
        Args:
            id: Filter by snapshot ID (startswith, icontains, timestamp__startswith).
            abid: Filter by snapshot abid (icontains).
            created_by_id: Filter by creator ID.
            created_by_username: Filter by creator username (icontains).
            created_at__gte: Filter by creation date >= (ISO 8601 format).
            created_at__lt: Filter by creation date < (ISO 8601 format).
            created_at: Filter by exact creation date (ISO 8601 format).
            modified_at: Filter by exact modification date (ISO 8601 format).
            modified_at__gte: Filter by modification date >= (ISO 8601 format).
            modified_at__lt: Filter by modification date < (ISO 8601 format).
            search: Search across url, title, tags, id, abid, timestamp (icontains).
            url: Filter by URL (exact).
            tag: Filter by tag name (exact).
            title: Filter by title (icontains).
            timestamp: Filter by timestamp (startswith).
            bookmarked_at__gte: Filter by bookmark date >= (ISO 8601 format).
            bookmarked_at__lt: Filter by bookmark date < (ISO 8601 format).
            with_archiveresults: Include archiveresults in response (default: False).
            limit: Number of results to return (default: 200).
            offset: Offset for pagination (default: 0).
            page: Page number for pagination (default: 0).
            api_key: API key for QueryParamTokenAuth (optional).
    
        Returns:
            Response: The response object from the GET request.
    
        Raises:
            ParameterError: If the provided parameters are invalid.
        """
        params = {
            k: v
            for k, v in locals().items()
            if k != "self" and v is not None and k != "api_key"
        }
        if api_key:
            params["api_key"] = api_key
        try:
            response = self._session.get(
                url=f"{self.url}/api/v1/core/snapshots",
                params=params,
                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?

No annotations are provided, so the description carries full burden. It mentions 'retrieve list' which implies a read-only operation, but doesn't disclose behavioral traits like pagination behavior (implied by limit/offset/page parameters), authentication needs (api_key_param suggests it), rate limits, or what happens with no filters (returns all snapshots?). The description is minimal and misses key operational context.

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 a single, efficient sentence: 'Retrieve list of snapshots.' It's front-loaded with the core action and resource, with zero wasted words. Given the rich schema, this conciseness is appropriate as it avoids redundancy.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With 22 parameters, 100% schema coverage, and an output schema (implied by context signals), the description is minimally adequate. It states the purpose but lacks context on usage guidelines, behavioral transparency, and sibling differentiation. For a complex tool with many parameters, it should provide more guidance on filtering strategies or output structure, though the output schema reduces the burden.

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 the schema fully documents all 22 parameters with clear descriptions. The description adds no parameter semantics beyond implying filtering capabilities ('list of snapshots' suggests filtering via parameters). Baseline is 3 as the schema does the heavy lifting, but the description doesn't compensate or add value regarding parameter interactions or usage.

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

Purpose3/5

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

The description 'Retrieve list of snapshots' clearly states the verb (retrieve) and resource (snapshots), but it's vague about scope and doesn't distinguish from sibling tools like 'get_snapshot' (singular) or 'get_any'. It specifies 'list' which helps differentiate from single retrieval, but lacks detail about what snapshots are or their context.

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 versus alternatives like 'get_snapshot' (for a single snapshot) or 'get_any' (for broader queries). The description implies listing with filtering, but doesn't specify scenarios, prerequisites, or exclusions for choosing between sibling tools.

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