Find possible gaps
find_gapsList patterns in the stored data where an edge might be missing at one node, when the user asks what a term may lack or how complete a neighborhood is. Input: ref (required, as get_node takes it: external id, alt id, IRI, exact name or node_id), namespace_id, relation_types and limit. Returns candidates of two rules over the node's outgoing edges: SIBLING_PATTERN (most siblings under one IS_A parent satisfy a relation to a target the node does not) and TWO_HOP_ONLY (the node reaches a target through several intermediate nodes and no stored edge joins them). A candidate is a pattern, not a fact: report it as such, with the notice the answer carries, and never as a missing truth. Deterministic, read-only, no model call, no embedding, nothing stored; at most 20000 edges a call, truncated beyond. SIBLING_PATTERN needs at least min_share of a group of min_group siblings; TWO_HOP_ONLY needs at least min_support distinct intermediate nodes along one two-step path, neither step transitive. The defaults are global, the same for every room. Satisfied patterns (an edge to the target or to an IS_A descendant, a chain of a transitive relation, an edge an IS_A ancestor holds, a declared inverse) are never candidates, nor are obsolete nodes, the structural types and the card's sequence relations. relation_types limits the candidate relations (SIBLING_PATTERN: the relation; TWO_HOP_ONLY: both steps); satisfaction always reads every relation. The relations the room card declares derived from the data (derived_relations on get_room_overview, a co-occurrence count with its basis) are no step of TWO_HOP_ONLY unless relation_types names them, because almost every pair of nodes is two such edges apart; the answer lists them in derived_relation_types. The ref resolves as in get_node (alt ids, NODE_REF_AMBIGUOUS with its candidates). limit counts the candidates returned, in order; candidates_total counts them all, and limit is the name every tool uses for the size of its answer (top_n is its deprecated alias; passing both is SCHEMA_VALIDATION_FAILED). Without the MCP token it reads the public rooms. Example: {"ref": "CL:0000094", "namespace_id": "obo-cl"}. Added in contract revision 4.8.0. Since contract revision 4.9.0 limit is the name of top_n (kept as a deprecated alias). Since contract revision 4.9.2 the card's derived relations are skipped by TWO_HOP_ONLY unless named in relation_types, and derived_relation_types lists them. 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": {
"ref": "<ref>"
},
"name": "find_gaps"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ref | Yes | External id, alt id, IRI, exact name or node_id. | |
| limit | No | Candidates to return, in order. | |
| top_n | No | Deprecated since contract revision 4.9.0: pass limit instead (one name for every answer's size); still accepted. | |
| min_group | No | SIBLING_PATTERN: fewest siblings that make a group. | |
| min_share | No | SIBLING_PATTERN: share of siblings that must satisfy the relation. | |
| min_support | No | TWO_HOP_ONLY: fewest distinct intermediate nodes. | |
| namespace_id | No | Room name; omitted: the default room. | |
| relation_types | No | Only these candidate relations. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| node | Yes | ||
| groups | Yes | ||
| notice | Yes | ||
| reason | Yes | Why there is no candidate: ISOLATED_NODE (no edge at all), NO_GROUP (no sibling group and no two-step path), NO_PATTERN (none passes the thresholds); null with candidates. | |
| scanned | Yes | Edges read. | |
| read_only | Yes | ||
| truncated | Yes | The scan reached scan_limit: the candidates come from the edges read, and an unread edge could satisfy one. | |
| candidates | Yes | ||
| generation | Yes | ||
| parameters | Yes | ||
| scan_limit | Yes | Edges one call reads at most (20000). | |
| external_id | Yes | ||
| resolved_by | Yes | ||
| namespace_id | Yes | ||
| candidates_total | Yes | ||
| derived_relation_types | No | Added in contract revision 4.9.2. The relations the room card declares derived from the data that this call left out of TWO_HOP_ONLY; one named in relation_types is a step like any other and is not listed here. | |
| transitive_relation_types | Yes | IS_A, PART_OF and the relations the room states transitive: their chains are implied, never a gap. |