Browse documentation
get_document: full text of one passage
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.
Costs 1 credit.
Arguments
inputSchema
| Name | Type | Description |
|---|---|---|
idrequired | string | Passage id from a hit |
risk | boolean | Also return risk_flags for the text: instruction_like, hidden_text, role_markers, low_trust_source |
strip | boolean | Remove instruction-like sentences from the text (each becomes '[removed: instruction-like text]'). Implies risk. |
Returns
A JSON payload in the text content block, and the same payload as
structuredContent for clients that support it.
outputSchema
| Name | Type | Description |
|---|---|---|
hostrequired | string | — |
host_rankrequired | number | — |
idrequired | string | — |
langrequired | string | — |
qualityrequired | integer | — |
risk_flags | "instruction_like" | "hidden_text" | "role_markers" | "low_trust_source"[] | Present when risk or strip was set. Computed on the original text. |
sentences_removed | integer | Present when strip was set: how many sentences were removed |
textrequired | string | The full cleaned body |
titlerequired | string | — |
urlrequired | string | — |
verticalrequired | string | — |
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.
The same call over REST
If your client does not speak MCP, this capability is
GET /doc/{id}, taking the same parameters and
returning the same body.
curl -H "x-api-key: $UNLOB_API_KEY" \
"https://api.unlob.com/doc/<id>"