Skip to main content
Glama

BYOKG

Search a room

search
Read-onlyIdempotent

Search one Meaning-Space for evidence and graph nodes by words, a reference (2:190) or a name, to find where to start and what to cite. Input: query (required) and namespace_id (a room name from find_rooms; omitted means the default room). Returns bounded source and graph evidence, never a generated answer; a hit that records an imported graph node carries node_id: pass it to query_graph_neighbors (node_id) or query_graph_paths (source_node_id, target_node_id) to follow that node's relations. Imported graph search makes no model call, matches whole words and ranks by relevance; a reference query (2:190, 2:190-193) returns exactly those nodes in order. Without the MCP token a reader searches the imported graph only: MANAGED_MEMORY and ALL are refused with READER_SEARCH_IMPORTED_ONLY. When truncated, pass next_cursor as cursor (same query and mode) for the next page. Managed-memory search embeds the query with the server's embedding model (PROVIDER_SETUP_REQUIRED when none is configured) and ranks stored facts and evidence by keyword and similarity; every model call is billed to the operator, which is why a reader is refused it. data_mode: imported data is deterministic with no model, managed and mixed use the server's model provider, and there are no silent partial results. A query naming verse-style references (2:190, a range 2:190-193 or 2:190-2:193 within one chapter) first resolves through the nodes' reference property and returns exactly those nodes in reading order; words are searched only when no node has them. Imported hits name match_source, the field the query matched in (text_en; text_en_bracket when it matched only inside square brackets, words a translator added); exclude_brackets skips hits whose every match lies inside them (match_source ending in _bracket) and leaves the stored text unchanged. match: word (the default) requires every query word in the hit as a whole word or as a part of a hyphenated or apostrophe compound (light finds light and Allah's light, never flight or delighted), and a query word with a hyphen or apostrophe matches that whole compound (j-z-y); stem also folds the endings of the text's language: common English endings (lights, lighted, lighting find light), Arabic prefixes, pronouns and endings, and, since 4.3.2, German and Turkish endings where the property names the language (text_de, text_tr; a property with a code and no rules, text_fa, is never stemmed); substring is the containment of earlier revisions. Every mode folds the query and the stored text alike: compatibility forms, case, the optional diacritics of Latin, Greek, Cyrillic, Hebrew and Arabic (ḍ-w-ʾ is found as d-w-ʾ, ضَوْء as ضوء), the Arabic letter variants and the attached article (نور finds النور), Arabic-Indic digits, Katakana as Hiragana; a word of a script written without spaces (Chinese, Japanese, Thai) matches by containment. sort: relevance (the default) is BM25 over the hit's fields (its name weighs most; a list property such as roots is a set of values), plus the whole query as a phrase in one field and a field that is exactly the query, a word the query word starts (transgressors for transgress) counting half; ties in reading order. reference is reading order, a node's reference property in natural order (2:190 before 10:5), nodes without one after them by bundle id. node_id is by node id, the order of earlier revisions. The same request on the same generation returns the same pages; a reference query keeps its references' order. context: for each imported hit, this many nodes before and after it in reading order, returned in its context and marked CONTEXT, never counted as matches: the neighbours along the hit's sequence relation (a directed relation to nodes of its own label with at most one edge each way, such as NEXT_AYAH between ayahs), or along context_relation. verbosity: full, the default, keeps snippet as the whole record and record.properties whole. compact makes snippet the text a reader would quote (text_en, text, definition, description, summary or content, else the record's longest text, else its name; at most 1024 characters) and record.properties what names and what is quoted, in any bundle (the name, every string of at most 64 characters such as an identifier, a reference or a form, that one text, and every list of at most 32 short strings such as a verse's roots or a term's synonyms); numbers, other long texts and nested values are left to fields, which adds properties to record.properties in either verbosity (a name the record does not hold is ignored). It lists at most 5 of the focus's strongest relations per kind (its counts stay whole). linked: the nodes one relation links to each imported hit, as record.linked (name, node_id and the direction of each edge, the heaviest first), read per hit: a verse's roots (OCCURS_IN, IN, labels Root, since its lemmas occur in it by the same relation), a term's parents (IS_A, OUT), a page's sites (LINKS_TO); labels filters as query_graph_neighbors does. Example: {"query": "camphor metabolic process", "namespace_id": "obo-go"}. Since contract 4.3.0 imported search matches whole words (light never finds flight or delighted; match stem folds English endings, substring restores containment), ranks by relevance (sort relevance, the default; reference for reading order; node_id), names a root hit's match_source roots (never roots_bracket, so exclude_brackets keeps it), resolves a reference query (2:190, 2:190-193) to exactly those nodes in order, returns context nodes before and after each hit (context=N, marked CONTEXT, not matches), counts every hit (total), and on page 1 names the node the query denotes (focus: Root j-z-y with its occurrences and lemmas, a rare lemma such as jizyah located in 9:29, every place saying how, located_by EDGE, LIST, TEXT or STEM, and as what word; STEM means a word of the text inflects the member's form in the text's language, بَرْزَخًا for بَرْزَخ). Since contract revision 4.6.0 verbosity compact shapes each hit for reading (snippet the quotable text, record.properties what names and what is quoted), fields adds properties and linked the nodes one relation links to each hit, every imported hit carries record (its id, labels and properties as data), the node's own name names the focus, and focus_reason says why a focus is absent or taken among several. The contract revision in force is the one every response repeats in _meta.contract_revision and server_info reports; a revision note (Added in, Since) says when a field or a tool appeared, never which revision is current.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "query": "<query>"
    },
    "name": "search"
  }
}

Input Schema

NameRequiredDescriptionDefault
sortNorelevance, reference (reading order) or node_id.relevance
limitNoResults per page.
matchNoword: whole words. stem: also the language's endings. substring: containment.word
queryYesWords, a name or references (2:190, 2:190-193).
cursorNonext_cursor of the previous page of the same request.
fieldsNoProperties to add to record.properties.
linkedNoNodes one relation links to each imported hit, as record.linked.
contextNoNodes to add before and after each hit in reading order, marked CONTEXT.
data_modeNoIMPORTED_GRAPH calls no model; MANAGED_MEMORY and ALL need the MCP token.AUTO
verbosityNofull keeps the whole record; compact what names and what is quoted.full
namespace_idNoRoom name; omitted: the default room.
context_relationNoRelation type context follows instead of the hit's sequence relation.
exclude_bracketsNoSkip imported hits that match only inside square brackets.

Output Schema

NameRequiredDescriptionDefault
sortNoAdded in contract revision 4.3.0. On pages of imported hits: the order they are listed in; reference when a reference query resolved.
focusNoAdded in contract revision 4.3.0. On the first page of an imported search: the node the query names exactly (a property other than its name is the query and its name holds it, as Root j-z-y for j-z-y), its stated counts (occurrences, ayah_count, lemma_count) and its relations per type and direction with the 20 heaviest of each, as get_node_stats lists them (a root's lemmas with their occurrences). A member stated to occur at most 3 times is located: by its own stored edges to places when it has any (located_by EDGE), else among the places the node reaches by its own forms, in a list property (LIST), as a word of their text (TEXT) or, since 4.3.2, as a word inflecting the form in the text's language (STEM; بَرْزَخًا for بَرْزَخ); every place says how it was found. The hits follow as results.
matchNoAdded in contract revision 4.3.0. On pages of imported hits: how the query was matched.
totalNoAdded in contract revision 4.3.0. On pages of imported hits: every imported hit of the request over all pages (exactly 1 for a word that occurs once); null in node_id order, which does not count ahead.
resultsYes
truncatedYes
referencesNoAdded in contract revision 4.3.0. The references a reference query named (2:190-193 is 2:190, 2:191, 2:192, 2:193) when nodes with them exist: the results are exactly those nodes, in this order.
next_cursorNoAdded in contract revision 3.1.0. Set exactly when truncated is true; send it as cursor with the same request for the next page. Pages of one generation never overlap or skip.
focus_reasonNoAdded in contract revision 4.6.0, on imported pages. Why focus is absent, or taken among several: NO_HIT_NAMED (no hit has a property equal to the query while its name holds it, and none is named so; light matches verses while no root states an English gloss), REFERENCE (a reference query returns its nodes and names no focus), AMBIGUOUS (several nodes are named exactly so; the one ranked first is the focus), NOT_REQUESTED (a later page, or a page sorted by node_id). Absent when exactly one node is named. Since 4.6.0 the node's own name counts (Root n-w-r resolves).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.4/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare this a safe, idempotent, closed read, and the description still adds substantial behavior beyond them: named error codes (READER_SEARCH_IMPORTED_ONLY, PROVIDER_SETUP_REQUIRED), that every managed-memory model call is billed to the operator, that imported search is deterministic and page-stable, that there are no silent partial results, and that context nodes are marked CONTEXT and never counted as matches.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness2/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The definition is roughly four times longer than needed and repeats itself: 'light never finds flight or delighted' appears twice, the reference-query behavior (2:190, 2:190-193) is explained at least three times, and context marking is restated in both the body and the contract-revision paragraph. The opening sentence is well front-loaded, but the trailing 'Since contract 4.3.0 / 4.6.0' block is largely a recapitulation of preceding text rather than new information.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 13-parameter tool with nested objects, enums and an output schema, nothing an agent needs in order to call it correctly is absent: binding/pagination, auth gating, determinism, ranking, stemming rules and return shaping are all addressed. The output schema carries return structure, so the description is right not to detail response fields beyond focus, match_source and record.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the baseline is 3, and the description earns above that by explaining semantics the schema only labels: how match=stem folds English, Arabic, German and Turkish endings (and refuses text_fa), how exclude_brackets keys off match_source, how context follows the sequence relation unless context_relation overrides it, and what verbosity=compact keeps versus drops. The gain is real but partially diluted by restating the same match and reference behavior three separate times.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The opening sentence gives a specific verb, resource and scope: search one Meaning-Space for evidence and graph nodes by words, a reference or a name, to find where to start and what to cite. It immediately distinguishes the tool from retrieval siblings by stating it returns bounded evidence, 'never a generated answer', and it names query_graph_neighbors and query_graph_paths as the follow-on tools rather than substitutes.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Usage conditions are covered in depth: when to follow a hit via node_id into query_graph_neighbors/query_graph_paths, when to pass next_cursor, when a reader without the MCP token is refused (MANAGED_MEMORY and ALL), and what data_mode selects. What is missing is signposting — the routing advice is buried mid-paragraph rather than stated up front, so an agent must read the whole block to extract it.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources