unlob Docs
Browse documentation

get_document

Fetch the full cleaned text of a passage by its id (from a web_search hit), with its metadata.

Behaviour

Snippets in search results are the passage text, so most questions need no call here. Reach for it when you need the whole document rather than the matching passage.

Arguments

inputSchema

NameTypeDescription
idrequiredstringPassage id from a hit

Returns

A JSON payload in the text content block, and the same payload as structuredContent for clients that support it.

outputSchema

NameTypeDescription
hostrequiredstring
host_rankrequirednumber
idrequiredstring
langrequiredstring
qualityrequiredinteger
textrequiredstringThe full cleaned body
titlerequiredstring
urlrequiredstring
verticalrequiredstring

Calling it

Over Streamable HTTP, with the required arguments filled in:

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "get_document",
    "arguments": {
      "id": "<id>"
    }
  }
}

Most clients do this for you — see Connect a client. To drive it by hand, complete the startup lifecycle first.