okfindex
v1.1.0Reuse searchable private documents across agent sessions.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
api_index API index
Index of the OKF Index API: routes, quota and how to connect via MCP.
search_bundles Search bundles
Search the index of OKF bundles: free text over name, tagline, description and origin; filter by provenance (github|domain), repository, version, language, license, root type or concept count; search root concept text. Paginate with limit/offset. Without an account, only the HTTP sample opens: GET https://okfindex.com/api/bundles. A free account (API key, or OAuth sign-in in the MCP client) gets 5 lookups per day. Beyond that, each call costs US$ 0.05 through x402 or prepaid credit. Only `live` bundles. Free text matches the name, the tagline, the description and the origin identifier (`owner/…
| Parameter | Type | Description |
|---|---|---|
concept | string | Text in the indexed root content, including listed concept names and summaries (first 1000 characters); up to 80 characters. |
concepts | string | Number of entries listed by the root. Up to 5 comma-separated bands: 0,1-5,6-20,21-100,101+. |
language | string | Only bundles whose repository language is one of these; comma-separated, up to 5 (GitHub bundles). |
license | string | Repository license. Up to 5 comma-separated values, 40 characters each. |
limit | integer | Bundles per page, at most 100. |
offset | integer | How many bundles to skip. Use `next_offset` from the previous response; the list ends at 1000. |
origin | string | Provenance: found by the GitHub sweep, or submitted by a domain. |
q | string | Free text over name, tagline, description and origin identifier. |
repo | string | Only bundles of one repository, `owner/repo` (case-insensitive). |
sort | string | Result order: arrival, last content change, name or repository stars. |
type | string | Type declared by the root, not the types of every concept. Up to 5 comma-separated values, 40 characters each. |
version | string | Only bundles declaring one of these `okf_version` values; comma-separated, up to 5. |
get_bundle Get bundle
One bundle's card: root index.md URL, version, concept count, provenance and repository signal. Without an account, only the HTTP sample opens: GET https://okfindex.com/api/bundles. A free account (API key, or OAuth sign-in in the MCP client) gets 5 lookups per day. Beyond that, each call costs US$ 0.05 through x402 or prepaid credit. `live` and `low` (example or fixture bundles kept out of the search) both answer here.
| Parameter | Type | Description |
|---|---|---|
id * | string | Bundle id, the `id` of every item in the list. |
index_stats Index stats
Size of the index by provenance and when it last changed.
search_legislation Search legislation
Search Brazilian federal laws by number/year or full-text words. Filter by type, year and issuing body (authority). Results preserve source attribution. Follow next; do not infer current legal validity. Without an account, this call has no open sample. A free account (API key, or OAuth sign-in in the MCP client) gets 5 lookups per day. Beyond that, each call costs US$ 0.05 through x402 or prepaid credit. Full-text search covers title, description and body. Number/year uses an exact indexed lookup. Source metadata is not a verification of legal currency. No state or municipal laws in this colle…
| Parameter | Type | Description |
|---|---|---|
after | string | Cursor from next. Do not generate a cursor. |
authority | string | Issuing body declared by the source: congresso-nacional, presidencia-da-republica or unknown. The provider is separate. |
q | string | Number/year, such as 10406/2002, or words. At most 160 characters. LGPD, CDC and Código Civil aliases are supported. |
type | string | constituicao, leis-ordinarias, leis-complementares, leis-delegadas or decretos-lei. |
year | integer | Year, from 1800 to 2099. |
get_legislation Get legislation
Read a law's first part, original-source links, download date and part count. Repository metadata is not legal verification. Without an account, this call has no open sample. A free account (API key, or OAuth sign-in in the MCP client) gets 5 lookups per day. Beyond that, each call costs US$ 0.05 through x402 or prepaid credit.
| Parameter | Type | Description |
|---|---|---|
id * | string | Stable 24-character hexadecimal law ID from search results. |
get_legislation_part Get legislation part
Read one law text part. Read every numbered part for the complete body. Preserve source and version when citing. Without an account, this call has no open sample. A free account (API key, or OAuth sign-in in the MCP client) gets 5 lookups per day. Beyond that, each call costs US$ 0.05 through x402 or prepaid credit.
| Parameter | Type | Description |
|---|---|---|
id * | string | Stable 24-character hexadecimal law ID from search results. |
part * | integer | Text part, from 1 to the document's parts value. |
list_bases List bases
List bases in your personal account. Personal-account operations. Free initial capacity: 3 bases and 256 KiB per text file, with no document or retained-version quantity quota. Only explicit permanent deletion removes retained files. Read limits for current account capacity. After paid capacity expires, extra bases keep read, export, archival, permanent deletion and make-private access. Files and historical versions are not automatically deleted. Purchase requires an explicit browser action; an API key cannot buy a subscription. Bases start private. Only publish_base exposes current files afte…
| Parameter | Type | Description |
|---|---|---|
after | string | Continue from the cursor in next. Do not construct cursors. |
create_base Create base
Create a private base. Personal-account operations. Free initial capacity: 3 bases and 256 KiB per text file, with no document or retained-version quantity quota. Only explicit permanent deletion removes retained files. Read limits for current account capacity. After paid capacity expires, extra bases keep read, export, archival, permanent deletion and make-private access. Files and historical versions are not automatically deleted. Purchase requires an explicit browser action; an API key cannot buy a subscription. Bases start private. Only publish_base exposes current files after an explicit…
| Parameter | Type | Description |
|---|---|---|
idempotency_key * | string | 16–80 letters, digits, underscores or hyphens. Reuse it when retrying this creation. |
name * | string | Base name, 1–120 characters. |
get_base Get base
Read your base and its documents. Personal-account operations. Free initial capacity: 3 bases and 256 KiB per text file, with no document or retained-version quantity quota. Only explicit permanent deletion removes retained files. Read limits for current account capacity. After paid capacity expires, extra bases keep read, export, archival, permanent deletion and make-private access. Files and historical versions are not automatically deleted. Purchase requires an explicit browser action; an API key cannot buy a subscription. Bases start private. Only publish_base exposes current files after a…
| Parameter | Type | Description |
|---|---|---|
base_id * | string | The 64-character ID returned by the API. |
after | string | Continue from the cursor in next. Do not construct cursors. |
list_base_documents List base documents
List the documents in your base. Personal-account operations. Free initial capacity: 3 bases and 256 KiB per text file, with no document or retained-version quantity quota. Only explicit permanent deletion removes retained files. Read limits for current account capacity. After paid capacity expires, extra bases keep read, export, archival, permanent deletion and make-private access. Files and historical versions are not automatically deleted. Purchase requires an explicit browser action; an API key cannot buy a subscription. Bases start private. Only publish_base exposes current files after an…
| Parameter | Type | Description |
|---|---|---|
base_id * | string | The 64-character ID returned by the API. |
after | string | Continue from the cursor in next. Do not construct cursors. |
search_base Search base
Search the full text of your base. Personal-account operations. Free initial capacity: 3 bases and 256 KiB per text file, with no document or retained-version quantity quota. Only explicit permanent deletion removes retained files. Read limits for current account capacity. After paid capacity expires, extra bases keep read, export, archival, permanent deletion and make-private access. Files and historical versions are not automatically deleted. Purchase requires an explicit browser action; an API key cannot buy a subscription. Bases start private. Only publish_base exposes current files after…
| Parameter | Type | Description |
|---|---|---|
base_id * | string | The 64-character ID returned by the API. |
q * | string | 3–160 characters. Search a word or phrase in document bodies, in the order entered. Case and accent insensitive. MySQL FULLTEXT token and stopword rules apply. |
after | string | Continue from the cursor in next. Do not construct cursors. |
get_base_document Get base document
Read the document Markdown and metadata. Personal-account operations. Free initial capacity: 3 bases and 256 KiB per text file, with no document or retained-version quantity quota. Only explicit permanent deletion removes retained files. Read limits for current account capacity. After paid capacity expires, extra bases keep read, export, archival, permanent deletion and make-private access. Files and historical versions are not automatically deleted. Purchase requires an explicit browser action; an API key cannot buy a subscription. Bases start private. Only publish_base exposes current files…
| Parameter | Type | Description |
|---|---|---|
base_id * | string | The 64-character ID returned by the API. |
document_id * | string | The 64-character ID returned by the API. |
read_base_markdown Read base markdown
Download document Markdown. Personal-account operations. Free initial capacity: 3 bases and 256 KiB per text file, with no document or retained-version quantity quota. Only explicit permanent deletion removes retained files. Read limits for current account capacity. After paid capacity expires, extra bases keep read, export, archival, permanent deletion and make-private access. Files and historical versions are not automatically deleted. Purchase requires an explicit browser action; an API key cannot buy a subscription. Bases start private. Only publish_base exposes current files after an expl…
| Parameter | Type | Description |
|---|---|---|
base_id * | string | The 64-character ID returned by the API. |
document_id * | string | The 64-character ID returned by the API. |
ask_base_question Ask base question
Ask a question with sources from your base. Ask about one base owned by the current personal account. Up to five retrieved excerpts go to our AI service. No web search, tools or external actions. Generation costs USD 0.01 after explicit authorization. No retrieval match returns unsupported without a charge. The same question and selected source versions reuse the saved purchase. Responses cite document ID, version, content hash and an exact excerpt. Removed or replaced sources produce stale without revealing the old answer. Processing uses the existing private base stream; get_base also return…
| Parameter | Type | Description |
|---|---|---|
authorize * | boolean | True only with authority to spend credit and process excerpts with AI. |
base_id * | string | 64-character ID returned by the API. |
price_usd * | string | Copy question_price_usd from get_base; currently 0.01. |
question * | string | Question, 5–600 characters. |
get_base_answer Get base answer
Read an answer and its source versions. Ask about one base owned by the current personal account. Up to five retrieved excerpts go to our AI service. No web search, tools or external actions. Generation costs USD 0.01 after explicit authorization. No retrieval match returns unsupported without a charge. The same question and selected source versions reuse the saved purchase. Responses cite document ID, version, content hash and an exact excerpt. Removed or replaced sources produce stale without revealing the old answer. Processing uses the existing private base stream; get_base also returns th…
| Parameter | Type | Description |
|---|---|---|
base_id * | string | 64-character ID returned by the API. |
question_id * | string | 64-character ID returned by the API. |
pricing Pricing
Current public prices, free allowances and payment discovery; does not create a charge.
get_api_x402_legislation Get API X402 legislation
Searches Brazilian federal laws for an agent, paid per call: up to 20 items, with no account. The search of `GET /api/legislation/search`, sold per call to agents with no account or prior free allowance. A request without payment receives HTTP 402 with the price; a paid request returns the items in the same response with the receipt in `cobranca`. Send at least one of `q`, `type`, `year` or `authority`. A refused search, a search with no matching law or an unavailable corpus is not charged. Full-text search covers title, description and body. Number/year uses an exact indexed lookup. Source me…
| Parameter | Type | Description |
|---|---|---|
after | string | Cursor from next. Do not generate a cursor. |
authority | string | Issuing body declared by the source: congresso-nacional, presidencia-da-republica or unknown. The provider is separate. |
q | string | Number/year, such as 10406/2002, or words. At most 160 characters. LGPD, CDC and Código Civil aliases are supported. |
type | string | constituicao, leis-ordinarias, leis-complementares, leis-delegadas or decretos-lei. |
year | integer | Year, from 1800 to 2099. |