fulcrum: "1.0"
name: wayback_save
description: |
  Capture a URL into the Internet Archive Wayback Machine via the anonymous
  "Save Page Now" endpoint (https://web.archive.org/save/{url}). Triggers a
  fresh archival crawl of the target and returns the resulting capture. Use at
  URL-triage time for link-rot prophylaxis and to lock durable, timestamped
  evidence of a source before it changes or disappears.

  Anonymous calls are rate-limited (~5/min) and synchronous. After saving,
  confirm the durable snapshot URL + timestamp with wayback_availability.

  Note: the target URL is appended to the path verbatim. The "Content-Location"
  / "Link" response headers carry the archived snapshot path.

schema:
  input:
    type: object
    properties:
      url:
        type: string
        description: The fully-qualified URL to capture (include the scheme)
        examples: ["https://example.com", "https://news.ycombinator.com/item?id=1"]
    required:
      - url
  output:
    type: object

providers:
  primary:
    service: rest
    cost_per_call: 0
    timeout: 60
    config:
      base_url: https://web.archive.org
      path: /save/{url}
      method: GET
      headers:
        Accept: "text/html,application/json"
        User-Agent: "mcp-gateway-knowledge/1.0"

cache:
  strategy: none  # each save is a fresh capture; never cache

auth:
  required: false
  type: none

metadata:
  category: knowledge
  tags: [wayback, internet-archive, archive, save-page-now, evidence, link-rot, free]
  cost_category: free
  execution_time: slow
  read_only: false
  consumes: [url]
  produces: [wayback_url, capture_timestamp]
  docs: "https://archive.org/help/wayback_api.php"
  license: "Public (Internet Archive anonymous Save Page Now)"
  rate_limit: "Anonymous ~5/min; higher with IA S3 keys (not used here)"
