Search Lemma Docs Context
lemma_docs_contextFind ranked excerpts from Lemma's local docs to answer questions about entity accounts, deposit bonuses, fixed fee loans, MSO-PC compliance, and onboarding.
Instructions
Search the local Lemma (getlemma.com) documentation corpus and return focused, ranked source excerpts for a question or task. Lemma is healthcare-practice banking: entity accounts, deposit bonuses, fixed fee loans, cash sweeps, MSO-PC compliant banking guardrails, and shared onboarding. Routes the query into one of three internal namespaces (getting-started: quickstart/onboarding/KYB; guides: deposit bonuses, fixed fee loans, MSO-PC compliance, collaboration, owning multiple entities; product-updates: changelog and roadmap) and returns compact chunks with source paths. This is a local documentation index only — it NEVER calls live Lemma or banking APIs, and it cannot move money or mutate any account state.
Coverage note: the corpus is the 8 pages Lemma exposes as markdown. Banking-operations pages (accounts, cards, transactions, move money), insurance/lockbox, invoicing, team-management, and the API reference are NOT in this index — say so instead of guessing when a query needs them.
Args:
query (string, required): The documentation question or task, 2-500 chars.
namespace ('auto' | 'getting-started' | 'guides' | 'product-updates', default 'auto'): Corpus area. Use 'auto' unless you already know the area.
intent ('answer' | 'build_context' | 'source_map', default 'answer'): How the returned context will be used; adjusts guidance.
max_chunks (int 1-12, default 6): Page size.
offset (int >= 0, default 0): Ranked matches to skip, for paging.
response_format ('markdown' | 'json', default 'markdown'): Text rendering; structured content is always attached.
Returns (structured): { query, namespace, intent, guidance, chunks: [{ id, score, namespace, source_type, path, heading, excerpt, metadata }], pagination: { total_matches, count, offset, has_more, next_offset? }, follow_ups: [string], truncated?, truncation_message?, stats: { indexed_chunks, returned_chunks } }
Chunk excerpts are capped; pass a chunk's id (or its path) to lemma_docs_get for the full text.
Examples:
"How does the deposit bonus accrue and when is it paid?" -> guides (deposit-bonuses).
"Open an account for a new PLLC" -> getting-started (quickstart, KYB, beneficial owners).
"Does Lemma support Zelle?" -> product-updates (roadmap workaround section).
"What guardrails does Lemma set up for an MSO-PC structure?" -> guides (mso-pc-compliance).
Follow-up paging: repeat the same query with offset=pagination.next_offset.
Errors:
"Lemma docs corpus root not found ..." -> set LEMMA_DOCS_CORPUS_ROOT to the absolute path of the lemma-docs-*.md folder and restart.
Empty chunks with guidance "No strong ... matches" -> retry with a more specific Lemma term (entity, deposit bonus, fixed fee loan, cash sweep, MSO-PC), or the topic may be outside the 8-page corpus.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | The Lemma documentation question or task, e.g. 'How does the deposit bonus accrue?'. | |
| intent | No | How the context will be used: 'answer' a question, 'build_context' for coding/implementation, or 'source_map' to list where sources live. | answer |
| offset | No | Number of ranked matches to skip, for paging through results (default 0). | |
| namespace | No | Corpus area to search: 'getting-started' (quickstart, onboarding, KYB), 'guides' (deposit bonuses, fixed fee loans, MSO-PC compliance, collaboration, multiple entities), 'product-updates' (changelog, roadmap), or 'auto' to route from the query (default). | auto |
| max_chunks | No | Maximum chunks to return per page, 1-12 (default 6). | |
| response_format | No | Text output format: 'markdown' for human-readable (default) or 'json' for the full machine-readable object. Structured content is always attached either way. | markdown |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | ||
| stats | Yes | ||
| chunks | Yes | ||
| intent | Yes | ||
| guidance | Yes | ||
| namespace | Yes | ||
| truncated | No | ||
| follow_ups | Yes | ||
| pagination | Yes | ||
| truncation_message | No |