okfindex

v1.1.0
com.okfindex/okfindex Checked 4 days ago Published 25 days ago

Reuse 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/…

ParameterTypeDescription
conceptstringText in the indexed root content, including listed concept names and summaries (first 1000 characters); up to 80 characters.
conceptsstringNumber of entries listed by the root. Up to 5 comma-separated bands: 0,1-5,6-20,21-100,101+.
languagestringOnly bundles whose repository language is one of these; comma-separated, up to 5 (GitHub bundles).
licensestringRepository license. Up to 5 comma-separated values, 40 characters each.
limitintegerBundles per page, at most 100.
offsetintegerHow many bundles to skip. Use `next_offset` from the previous response; the list ends at 1000.
originstringProvenance: found by the GitHub sweep, or submitted by a domain.
qstringFree text over name, tagline, description and origin identifier.
repostringOnly bundles of one repository, `owner/repo` (case-insensitive).
sortstringResult order: arrival, last content change, name or repository stars.
typestringType declared by the root, not the types of every concept. Up to 5 comma-separated values, 40 characters each.
versionstringOnly 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.

ParameterTypeDescription
id *stringBundle 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…

ParameterTypeDescription
afterstringCursor from next. Do not generate a cursor.
authoritystringIssuing body declared by the source: congresso-nacional, presidencia-da-republica or unknown. The provider is separate.
qstringNumber/year, such as 10406/2002, or words. At most 160 characters. LGPD, CDC and Código Civil aliases are supported.
typestringconstituicao, leis-ordinarias, leis-complementares, leis-delegadas or decretos-lei.
yearintegerYear, 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.

ParameterTypeDescription
id *stringStable 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.

ParameterTypeDescription
id *stringStable 24-character hexadecimal law ID from search results.
part *integerText 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…

ParameterTypeDescription
afterstringContinue 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…

ParameterTypeDescription
idempotency_key *string16–80 letters, digits, underscores or hyphens. Reuse it when retrying this creation.
name *stringBase 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…

ParameterTypeDescription
base_id *stringThe 64-character ID returned by the API.
afterstringContinue 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…

ParameterTypeDescription
base_id *stringThe 64-character ID returned by the API.
afterstringContinue 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…

ParameterTypeDescription
base_id *stringThe 64-character ID returned by the API.
q *string3–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.
afterstringContinue 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…

ParameterTypeDescription
base_id *stringThe 64-character ID returned by the API.
document_id *stringThe 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…

ParameterTypeDescription
base_id *stringThe 64-character ID returned by the API.
document_id *stringThe 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…

ParameterTypeDescription
authorize *booleanTrue only with authority to spend credit and process excerpts with AI.
base_id *string64-character ID returned by the API.
price_usd *stringCopy question_price_usd from get_base; currently 0.01.
question *stringQuestion, 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…

ParameterTypeDescription
base_id *string64-character ID returned by the API.
question_id *string64-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…

ParameterTypeDescription
afterstringCursor from next. Do not generate a cursor.
authoritystringIssuing body declared by the source: congresso-nacional, presidencia-da-republica or unknown. The provider is separate.
qstringNumber/year, such as 10406/2002, or words. At most 160 characters. LGPD, CDC and Código Civil aliases are supported.
typestringconstituicao, leis-ordinarias, leis-complementares, leis-delegadas or decretos-lei.
yearintegerYear, from 1800 to 2099.