tools

locate

Find the pages and tables that hold a piece of information.

Cost class: medium — a few seconds on a workspace the navigator has seen; the first call after an ingestion change reads the workspace's ingestion outputs first.

A decision model walks the workspace's files, sections and pages (built at ingestion) and names the pieces to read, best first, with the tables to query — the locate NDI's own navigate-mode agent runs. text is that agent's reply, word for word. Only files the key may see are considered, cut to path_prefix / paths.

Stateless: send back the pieces a previous call offered (exclude) and what you have read (already_read) to be shown something new.

Args: body: The need, the question it belongs to, the piece count, scope and exclusions. workspace: Resolved workspace and caller access predicate. A non-existent workspace returns workspace_not_found before the body executes. session: Database session.

post/v1/workspaces/{workspace_id}/tools/locate

Request

Path parameters

workspace_idstring uuid required

Workspace identifier.

Headers

Idempotency-Keystring nullable

Replaying a request with the same key returns the original job with 200, never a second job. The key is kept with the job for replay and never cleared, so it must not contain personal data.

Request body

needstring required

What is still needed, in a few words: a year, an entity, a line item, a definition.

questionstring nullable

The whole question the need is part of; every decision weighs the need within it. Omit it and the need is the whole question.

kinteger

How many pieces to name.

everyboolean

The need names a kind of file and every one is wanted (each invoice, every statement): the navigator rates each file of that kind and lists the members in population.

path_prefixstring nullable

Only files under this folder, workspace-relative; paths adds files. Omit both for the whole workspace.

pathsstring[] nullable

Only these uploaded files (with path_prefix, its folder's files too). Unknown or inaccessible paths are refused.

pointerboolean

Name every page in text by its opening lines only. Without it, the best pages come in full, as a task's first locate wants them; later locates pass it, so page text does not pile up in an agent's context.

Response

Successful Response

textstring required

The reply as NDI's own agent reads it: each piece with the command that reads it and its text (the best pages in full, the rest by their opening lines; every page by its opening lines with pointer), then a population's members and the tables to query.

population_unratedinteger

Files in folders rated likely to hold members that the budget ran out before rating: when above 0, population is incomplete; narrow the need to a folder, kind or period and locate again with every.

job_idstring uuid nullable

The external operation job.

Changes

No recorded changes to this operation across all 1 revision of this API.