help.search
Pages of the Manual ranked for a question in your own words, best first, each with a snippet.
Ranks the Manual's Pages for a question in your own words, best first, each with a snippet. Search is offline and
deterministic, and knows GnuCash's words: "quantity" finds amount, "bill" finds document, a menu path such as
"Stock Split" finds the Page for that menu item. Give kind to search one kind of Page and limit to cap the hits.
Examples
A method's own Page ranks first for the words of its name, ahead of an error that shares them:
Example: with no book.
JSON-RPC
Request:
{"jsonrpc":"2.0","id":1,"method":"help.search","params":{"query":"open a book","limit":2}}
Response:
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"hits": [
{
"id": "method/book.open",
"kind": "method",
"title": "book.open",
"summary": "…",
"snippet": "…"
},
{
"id": "error/book-already-open",
"kind": "error",
"title": "book-already-open",
"summary": "…",
"snippet": "…"
}
]
}
}
Command line
red-ale exec help.search '{"query":"open a book","limit":2}'
It prints:
{
"hits": [
{
"id": "method/book.open",
"kind": "method",
"title": "book.open",
"summary": "…",
"snippet": "…"
},
{
"id": "error/book-already-open",
"kind": "error",
"title": "book-already-open",
"summary": "…",
"snippet": "…"
}
]
}
MCP tool call
Tool call:
{"name":"help.search","arguments":{"query":"open a book","limit":2}}
Result:
{
"structuredContent": {
"hits": [
{
"id": "method/book.open",
"kind": "method",
"title": "book.open",
"summary": "…",
"snippet": "…"
},
{
"id": "error/book-already-open",
"kind": "error",
"title": "book-already-open",
"summary": "…",
"snippet": "…"
}
]
}
}
Example: with no book.
JSON-RPC
Request:
{"jsonrpc":"2.0","id":1,"method":"help.search","params":{"query":"transaction does not balance","kind":"error","limit":2}}
Response:
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"hits": [
{
"id": "error/unbalanced",
"kind": "error",
"title": "unbalanced",
"summary": "…",
"snippet": "…"
},
"…"
]
}
}
Command line
red-ale exec help.search '{"query":"transaction does not balance","kind":"error","limit":2}'
It prints:
{
"hits": [
{
"id": "error/unbalanced",
"kind": "error",
"title": "unbalanced",
"summary": "…",
"snippet": "…"
},
"…"
]
}
MCP tool call
Tool call:
{"name":"help.search","arguments":{"query":"transaction does not balance","kind":"error","limit":2}}
Result:
{
"structuredContent": {
"hits": [
{
"id": "error/unbalanced",
"kind": "error",
"title": "unbalanced",
"summary": "…",
"snippet": "…"
},
"…"
]
}
}
Effect: read.
Params
Params of help.search.
query(string, required): What to look for, in any words: a question, a GnuCash menu item ("Stock Split…"), a method name.kind(PageKind or null): Only Pages of this kind.limit(integer (uint32) or null): The most Pages to return, 1 to 100; 10 by default.
Result
Result of help.search.
hits(array of HelpHit, required): The Pages found, best first; ties in Page ID order.