Skip to main content
Glama

get_any

Retrieve archived snapshots, results, or tags by their unique identifier to access specific archived content from ArchiveBox.

Instructions

Get a specific Snapshot, ArchiveResult, or Tag by abid.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
abidYesThe abid of the Snapshot, ArchiveResult, or Tag

Implementation Reference

  • MCP tool handler for 'get_any': decorated with @mcp.tool, defines parameters with pydantic Field for schema, creates Api client and calls client.get_any to fetch data by abid.
    @mcp.tool( exclude_args=[ "archivebox_url", "username", "password", "token", "api_key", "verify", ], tags={"core"}, ) def get_any( abid: str = Field( description="The abid of the Snapshot, ArchiveResult, or Tag", ), 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: """ Get a specific Snapshot, ArchiveResult, or Tag by abid. """ client = Api( url=archivebox_url, username=username, password=password, token=token, api_key=api_key, verify=verify, ) response = client.get_any(abid=abid) return response.json()
  • Helper method in Api class: performs HTTP GET request to ArchiveBox API endpoint /api/v1/core/any/{abid} to retrieve the resource.
    def get_any(self, abid: str) -> requests.Response: """ Get a specific Snapshot, ArchiveResult, or Tag by abid Args: abid: The abid of the Snapshot, ArchiveResult, or Tag. Returns: Response: The response object from the GET request. Raises: ParameterError: If the provided parameters are invalid. """ try: response = self._session.get( url=f"{self.url}/api/v1/core/any/{abid}", headers=self.headers, verify=self.verify, ) except ValidationError as e: raise ParameterError(f"Invalid parameters: {e.errors()}") return response
  • Registration of the 'get_any' tool using @mcp.tool decorator, excluding auth args and tagging as core.
    @mcp.tool(

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