Skip to content
unlob

get_document

Search & retrieval

Fetches the full cleaned text of one passage by id — the lazy read path.

Search gives the agent metadata; this gives it the text, for exactly the passage it chose. The content is cleaned extraction rather than raw HTML, so there is no navigation, no cookie banner and no footer eating the budget.

Arguments

NameTypeDescription
idrequiredstringA passage id from a search hit.

Returns:The cleaned passage text plus its metadata.

Example

Prompt: “Read the tokio documentation page you just found.”

get_document calljson
{ "id": "p:8f2c9a" }

Over HTTP

The same operation is available as GET /doc/:id for anything that does not speak MCP.

/doc/:idbash
curl -H "x-api-key: $UNLOB_API_KEY" \
  "https://api.unlob.com/doc/p:8f2c9a"

Setup

One config block gives your client all 11 tools, including this one.

MCP configjson
{
  "mcpServers": {
    "unlob": {
      "command": "npx",
      "args": ["-y", "@unlob/mcp"],
      "env": { "UNLOB_API_KEY": "ulb_your_key_here" }
    }
  }
}

Get a key and connect

10,000 free requests a month. MCP calls bill exactly like HTTP calls — one request each.