Relations of a node, summarized
get_node_statsSummarize one node's relations by type and direction (counts, weights, the strongest partners) without listing every edge; use it before query_graph_neighbors on a node with many edges. Input: node_id (required: this room's opaque node id from search, get_node, explore or paths) and namespace_id; limit sizes the answer. Returns per relation type and direction the count, the weight sum and the limit heaviest relations with the nodes they reach, and with group_by the reached nodes grouped by a second relation. Deterministic, no model call; at most 50,000 edges are read (NEIGHBORHOOD_TOO_LARGE: narrow by relation_types). A node without any edge returns warning ISOLATED_NODE with the reason its record gives (LEMMA_WITHOUT_ROOT). The heaviest relations show the strongest co-occurring roots, or a root's lemmas with their occurrence counts. node_id is the node_id of a search hit or source, or an id from overview, neighbors or paths. group_by groups the nodes one relation reaches by a second relation of theirs: relation_type OCCURS_IN, direction OUT, via_relation_type HAS_AYAH, via_direction IN gives a root's ayahs per surah. relation_types counts only relations of these types (for example CO_OCCURS or OCCURS_IN). Directions are seen from the near node; an undirected edge has no direction and matches OUT and IN. 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). Example: {"node_id": "<node_id>", "namespace_id": "obo-go"}. Since contract revision 4.9.0 limit is the name of top_n (kept as a deprecated alias). 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": {
"node_id": "<node_id>"
},
"name": "get_node_stats"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Heaviest relations to list per relation type and direction. | |
| top_n | No | Deprecated since contract revision 4.9.0: pass limit instead (one name for every answer's size); still accepted. | |
| node_id | Yes | This room's opaque node id, never an external id. | |
| group_by | No | Group the nodes one relation reaches by a second relation of theirs. | |
| namespace_id | No | Room name; omitted: the default room. | |
| relation_types | No | Count only relations of these types. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| node | Yes | ||
| groups | Yes | ||
| scanned | Yes | Edges read for this answer. | |
| warnings | No | Added in contract revision 4.1.0. Set when the node has no edge at all (ISOLATED_NODE with the reason its record gives), so an empty answer reflects missing data rather than the request; empty otherwise. | |
| read_only | Yes | ||
| relations | Yes | By relation type, then direction. | |
| generation | Yes | ||
| namespace_id | Yes |