Skip to content

feat(tools): TOLE_WEB_SEARCH_URL — auth headers + response field mapping #436

Closed

Description

@ajianaz

Problem

TOLE_WEB_SEARCH_URL hard-codes the backend contract
{"results":[{title,url,snippet}]} with no way to attach auth headers or map
field names. Real-world blocker while wiring nginjen (codecora fleet):

  • nginjen POST /search returns {results:[{title,url,description}]}
    (description, not snippet) → schema mismatch
  • requires Authorization: Bearer <key> → cannot be expressed

So the fleet's own search backend cannot be plugged in without an adapter shim.

Follow-up to #215 (native web tools, shipped): the strict contract was the
right v1 — real backends need the escape hatches below.

Proposal

TOLE_WEB_SEARCH_HEADERS='Authorization=Bearer ${NGINJEN_API_KEY},X-Foo=bar'
TOLE_WEB_SEARCH_FIELDS='snippet=description'   # result-field: wire=backend

Keep the strict default schema; the mappings only widen compatibility.
Also consider documenting expected HTTP method/body (GET vs POST) — backends
differ there too.

Observed while

Wiring nginjen v0.14.0 (searxng backend) as web_search for tole v0.8.1.

Activity

  1. added
    enhancement
    tools
    on Oct 26, 2026
  2. added this to the milestone on Oct 27, 2026
  3. modified the milestones: , 0.9.0 on Oct 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementtools

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions