Docs Pack: contract

Created by: AgentToolbox (first-party).
Version: 0.1.1. Beta.

Inspect several documentation pages without putting all their contents into context.

Scope: 5 pages · 8 allowed hosts · literal matches

Cost: from $0.01 USDC per published success; buyer-chosen amount, USDC on Base.
Success: Every requested source returns HTTP 200 and at least one literal query-term match; excerpts respect the requested character budget and preserve complete fenced code blocks. The full output passes its schema and 14,000-byte product bound.
Failure policy: Any failed source or absent query match fails the whole pack before settlement. No partial pack charge. Unresolved settlement must be reconciled; never create a replacement authorization.

Canonical contract JSON · Buyer guide

Input schema

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "urls": {
      "minItems": 1,
      "maxItems": 5,
      "type": "array",
      "items": {
        "type": "string",
        "maxLength": 512
      }
    },
    "query": {
      "type": "string",
      "minLength": 2,
      "maxLength": 120
    },
    "max_excerpt_chars": {
      "default": 4000,
      "type": "integer",
      "minimum": 1000,
      "maximum": 6000
    }
  },
  "required": [
    "urls",
    "query",
    "max_excerpt_chars"
  ],
  "additionalProperties": false
}
```

Output schema

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "query": {
      "type": "string"
    },
    "fetched_at": {
      "type": "string"
    },
    "source_content": {
      "type": "string",
      "const": "untrusted_data"
    },
    "sources": {
      "minItems": 1,
      "maxItems": 5,
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "url": {
            "type": "string",
            "format": "uri"
          },
          "final_url": {
            "type": "string",
            "format": "uri"
          },
          "status": {
            "type": "number",
            "const": 200
          },
          "selection_status": {
            "type": "string",
            "const": "matched"
          },
          "content_type": {
            "type": "string"
          },
          "source_bytes": {
            "type": "integer",
            "exclusiveMinimum": 0,
            "maximum": 262144
          },
          "source_sha256": {
            "type": "string",
            "pattern": "^[a-f0-9]{64}$"
          },
          "text_sha256": {
            "type": "string",
            "pattern": "^[a-f0-9]{64}$"
          },
          "title": {
            "type": "string",
            "maxLength": 180
          },
          "text_chars": {
            "type": "integer",
            "exclusiveMinimum": 0,
            "maximum": 9007199254740991
          },
          "code_blocks_omitted": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "excerpts": {
            "minItems": 1,
            "maxItems": 2,
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "text": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 1800
                },
                "start_char": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 9007199254740991
                },
                "end_char": {
                  "type": "integer",
                  "minimum": 1,
                  "maximum": 9007199254740991
                },
                "heading": {
                  "anyOf": [
                    {
                      "type": "string",
                      "maxLength": 180
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "anchor": {
                  "anyOf": [
                    {
                      "type": "string",
                      "maxLength": 512
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "matched_terms": {
                  "minItems": 1,
                  "maxItems": 8,
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                }
              },
              "required": [
                "text",
                "start_char",
                "end_char",
                "heading",
                "anchor",
                "matched_terms"
              ],
              "additionalProperties": false
            }
          }
        },
        "required": [
          "url",
          "final_url",
          "status",
          "selection_status",
          "content_type",
          "source_bytes",
          "source_sha256",
          "text_sha256",
          "title",
          "text_chars",
          "code_blocks_omitted",
          "excerpts"
        ],
        "additionalProperties": false
      }
    },
    "excerpt_chars": {
      "type": "integer",
      "minimum": 1,
      "maximum": 6000
    },
    "max_excerpt_chars": {
      "type": "integer",
      "minimum": -9007199254740991,
      "maximum": 9007199254740991
    },
    "match_method": {
      "type": "string",
      "const": "case-insensitive literal terms; ranked by distinct term coverage"
    }
  },
  "required": [
    "query",
    "fetched_at",
    "source_content",
    "sources",
    "excerpt_chars",
    "max_excerpt_chars",
    "match_method"
  ],
  "additionalProperties": false
}
```

Limits

```json
{
  "max_urls": 5,
  "max_source_bytes": 262144,
  "max_excerpt_chars": 6000,
  "max_output_bytes": 14000,
  "deadline_seconds": 12,
  "redirects_per_source": 2,
  "supported_hosts": [
    "developers.cloudflare.com",
    "docs.payai.network",
    "docs.x402.org",
    "docs.python.org",
    "nodejs.org",
    "developer.mozilla.org",
    "docs.github.com",
    "www.typescriptlang.org"
  ],
  "formats": [
    "UTF-8 Markdown",
    "UTF-8 plain text",
    "static HTML with readable body/main/article"
  ],
  "unsupported": [
    "credentials, ports or query strings in URLs",
    "private or unlisted hosts",
    "login, bot challenges, JavaScript rendering, PDFs, crawling",
    "semantic relevance or completeness guarantees"
  ]
}
```