@yottagraph-app/aether-instructions 1.1.22 → 1.1.24

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -36,101 +36,13 @@ NEIDs are stable and can be persisted long-term, but may occasionally change if
36
36
  | What you need | Endpoint | Returns |
37
37
  |---------------|----------|---------|
38
38
  | Find entity by name (batch, scored) | `POST /entities/search` | Ranked matches with NEIDs and scores |
39
- | Basic info (name, aliases, type) | `GET /entities/{neid}` | Quick summary for display |
39
+ | Get entity display name | `GET /entities/{neid}/name` | Canonical name (`{"name": "..."}`) |
40
+ | Get entity aliases | `GET /entities/{neid}/aliases` | All known names (`{"aliases": [...]}`) |
41
+ | Batch name lookup | `POST /entities/names` | Map of NEID → name |
42
+ | Batch alias lookup | `POST /entities/aliases` | Map of NEID → aliases |
43
+ | Resolve merged entities | `POST /entities/redirect` | Canonical NEIDs for merges |
40
44
  | Full property values | `POST /elemental/entities/properties` | All properties with PIDs, values, timestamps |
41
45
 
42
- **Important**: When a user asks for "entity properties," clarify which they mean:
43
- - Basic info/metadata → use `/entities/{neid}`
44
- - Detailed property data (like relationships, addresses, financial data) → use `/elemental/entities/properties`
45
-
46
- ## Searching for Entities
47
-
48
- ### Batch name search (direct HTTP only)
49
-
50
- `POST /entities/search`
51
-
52
- Search for entities by name with scored ranking and optional disambiguation. Supports batch queries (multiple entities in one request). Content-Type must be `application/json`.
53
-
54
- **Note:** This endpoint is not exposed through the generated TypeScript client (`useElementalClient()`). For client-side entity search, use `findEntities()` (`POST /elemental/find`) or `getNEID()` (`GET /entities/lookup`).
55
-
56
- ### Request Body
57
-
58
- | Field | Type | Required | Description |
59
- |-------|------|----------|-------------|
60
- | queries | SearchQuery[] | yes | Array of search queries |
61
- | minScore | number | no | Minimum match score, 0.0-1.0 (default: 0.8) |
62
- | maxResults | integer | no | Maximum results per query (default: 10) |
63
- | includeNames | boolean | no | Include entity names in response (default: true) |
64
- | includeAliases | boolean | no | Include entity aliases in response (default: false) |
65
- | includeFlavors | boolean | no | Include entity type/flavor in response (default: true) |
66
- | includeScores | boolean | no | Include match scores in response (default: true) |
67
-
68
- ### SearchQuery
69
-
70
- | Field | Type | Required | Description |
71
- |-------|------|----------|-------------|
72
- | queryId | integer | yes | User-provided ID for matching queries to results |
73
- | query | string | yes | Entity name or strong ID to search for |
74
- | snippet | string | no | Free-text snippet for disambiguating entities with similar names |
75
- | flavors | string[] | no | Limit results to these entity types (e.g., `["organization"]`) |
76
- | contextType | string | no | Resolution context: `namedEntity` (default), `event`, or `strongId` |
77
- | strongIdProperty | string | no | Property name to use as strong ID (when contextType is `strongId`) |
78
-
79
- ### Response
80
-
81
- The response contains a `results` array with one entry per query:
82
-
83
- | Field | Type | Description |
84
- |-------|------|-------------|
85
- | results[].queryId | integer | Matches the queryId from the request |
86
- | results[].matches[] | Match[] | Matches sorted by decreasing score |
87
-
88
- Each Match contains:
89
-
90
- | Field | Type | Description |
91
- |-------|------|-------------|
92
- | neid | string | 20-character entity ID |
93
- | name | string | Entity display name (when includeNames is true) |
94
- | aliases | string[] | Other names for this entity (when includeAliases is true) |
95
- | flavor | string | Entity type name (when includeFlavors is true) |
96
- | score | number | Match confidence 0.0-1.0 (when includeScores is true) |
97
-
98
- ### Example
99
-
100
- **Request:**
101
-
102
- ```json
103
- {
104
- "queries": [
105
- {"queryId": 1, "query": "Apple"},
106
- {"queryId": 2, "query": "MSFT", "flavors": ["financial_instrument"]}
107
- ],
108
- "maxResults": 3
109
- }
110
- ```
111
-
112
- **Response:**
113
-
114
- ```json
115
- {
116
- "results": [
117
- {
118
- "queryId": 1,
119
- "matches": [
120
- {"neid": "00416400910670863867", "name": "Apple", "flavor": "organization", "score": 0.95},
121
- {"neid": "07437212020357111309", "name": "AAPL", "flavor": "financial_instrument", "score": 0.82}
122
- ]
123
- },
124
- {
125
- "queryId": 2,
126
- "matches": [
127
- {"neid": "03016672914748108965", "name": "MSFT", "flavor": "financial_instrument", "score": 0.98}
128
- ]
129
- }
130
- ]
131
- }
132
- ```
133
-
134
46
  ## Form-Encoded JSON Parameters
135
47
 
136
48
  Several Elemental API endpoints use `application/x-www-form-urlencoded` with
@@ -185,49 +97,222 @@ const res = await client.getPropertyValues({
185
97
  } as any);
186
98
  ```
187
99
 
188
- Attribute values are keyed by **numeric PID**, not by name. Resolve attribute names to PIDs via the schema before accessing them.
100
+ **Important:** Attribute keys are **quad attribute type IDs (AIDs)**, NOT property PIDs. These are a separate numeric namespace. For example, property PID 15 is "industry", but attribute key "15" is "sentiment". To resolve attribute keys to names, use the `attributes` array from `GET /schema` (see schema.md).
189
101
 
190
102
  <!-- BEGIN GENERATED CONTENT -->
191
103
 
192
104
  ## Endpoints
193
105
 
194
- ### Get entity details
106
+ ### Batch entity alias lookup
195
107
 
196
- `GET /entities/{neid}`
108
+ `POST /entities/aliases`
197
109
 
198
- Get details about a named entity including name, aliases, and type. This is an alias for /reports/{neid}. Response is cached for 5 minutes.
110
+ Look up all known aliases for multiple entities by their NEIDs in a single request.
199
111
 
200
- #### Guidance
112
+ #### Request Body
113
+
114
+ Batch aliases request
115
+
116
+ **Type:** `BatchEntityAliasesRequest`
117
+
118
+ #### Responses
119
+
120
+ | Status | Description |
121
+ |--------|-------------|
122
+ | 200 | Entity aliases (`BatchEntityAliasesResponse`) |
123
+ | 400 | Invalid request (`Error`) |
124
+
125
+ #### Example
126
+
127
+ **Request:**
128
+
129
+ ```
130
+ POST /entities/aliases
131
+ {"neids": ["00416400910670863867"]}
132
+ ```
133
+
134
+ **Response:**
135
+
136
+ ```json
137
+ {"results": {"00416400910670863867": ["Apple", "AAPL", "Apple Inc", "Apple Inc."]}}
138
+ ```
139
+
140
+ ---
141
+
142
+ ### Batch entity name lookup
143
+
144
+ `POST /entities/names`
145
+
146
+ Look up canonical display names for multiple entities by their NEIDs in a single request.
147
+
148
+ #### Request Body
149
+
150
+ Batch names request
151
+
152
+ **Type:** `BatchEntityNamesRequest`
153
+
154
+ #### Responses
155
+
156
+ | Status | Description |
157
+ |--------|-------------|
158
+ | 200 | Entity names (`BatchEntityNamesResponse`) |
159
+ | 400 | Invalid request (`Error`) |
160
+
161
+ #### Example
162
+
163
+ **Request:**
164
+
165
+ ```
166
+ POST /entities/names
167
+ {"neids": ["00416400910670863867", "03016672914748108965"]}
168
+ ```
169
+
170
+ **Response:**
171
+
172
+ ```json
173
+ {"results": {"00416400910670863867": "Apple", "03016672914748108965": "MSFT"}}
174
+ ```
175
+
176
+ ---
177
+
178
+ ### Get canonical NEIDs for merges
179
+
180
+ `POST /entities/redirect`
181
+
182
+ Get the canonical NEIDs for a set of entities, resolving any merges. If an entity has been merged into another, the canonical NEID of the merge target is returned.
183
+
184
+ #### Request Body
185
+
186
+ Redirect request
187
+
188
+ **Type:** `RedirectRequest`
189
+
190
+ #### Responses
201
191
 
202
- Response is wrapped in a 'report' container object. Access entity data via response.report.
192
+ | Status | Description |
193
+ |--------|-------------|
194
+ | 200 | Redirect results (`RedirectResponse`) |
195
+ | 400 | Invalid request (`Error`) |
196
+
197
+ #### Example
198
+
199
+ **Request:**
200
+
201
+ ```
202
+ POST /entities/redirect
203
+ {"neids": ["00416400910670863867", "03016672914748108965"]}
204
+ ```
205
+
206
+ **Response:**
207
+
208
+ ```json
209
+ {"redirects": [{"neid": "00416400910670863867", "canonicalNeid": "00416400910670863867"}, {"neid": "03016672914748108965", "canonicalNeid": "01234567890123456789"}]}
210
+ ```
211
+
212
+ ---
213
+
214
+ ### Search for entities
215
+
216
+ `POST /entities/search`
217
+
218
+ Search for entities by name with scored ranking and optional disambiguation. Supports batch queries (multiple entities in one request). Content-Type must be application/json.
219
+
220
+ #### Request Body
221
+
222
+ Search request
223
+
224
+ **Type:** `SearchRequest`
225
+
226
+ #### Responses
227
+
228
+ | Status | Description |
229
+ |--------|-------------|
230
+ | 200 | Search results (`SearchResponse`) |
231
+ | 400 | Invalid request (`Error`) |
232
+
233
+ #### Example
234
+
235
+ **Request:**
236
+
237
+ ```
238
+ POST /entities/search
239
+ {"queries": [{"queryId": 1, "query": "Apple"}, {"queryId": 2, "query": "MSFT", "flavors": ["financial_instrument"]}], "maxResults": 3}
240
+ ```
241
+
242
+ **Response:**
243
+
244
+ ```json
245
+ {"results": [{"queryId": 1, "matches": [{"neid": "00416400910670863867", "name": "Apple", "flavor": "organization", "score": 0.95}]}, {"queryId": 2, "matches": [{"neid": "03016672914748108965", "name": "MSFT", "flavor": "financial_instrument", "score": 0.98}]}]}
246
+ ```
247
+
248
+ ---
249
+
250
+ ### Get entity aliases
251
+
252
+ `GET /entities/{neid}/aliases`
253
+
254
+ Get all known aliases for an entity by its NEID. Includes the canonical name and all alternative names, abbreviations, and synonyms.
203
255
 
204
256
  #### Parameters
205
257
 
206
258
  | Name | Type | Required | Description |
207
259
  |------|------|----------|-------------|
208
- | neid | string | yes | Named Entity ID |
260
+ | neid | string | yes | Named Entity ID (20-character zero-padded) |
209
261
 
210
262
  #### Responses
211
263
 
212
264
  | Status | Description |
213
265
  |--------|-------------|
214
- | 200 | Entity details (`GetNamedEntityReportResponse`) |
215
- | 400 | Invalid NEID (`Error`) |
266
+ | 200 | Entity aliases (`NindexToAliasesResponse`) |
216
267
  | 404 | Entity not found (`Error`) |
217
- | 500 | Internal server error (`Error`) |
218
268
 
219
269
  #### Example
220
270
 
221
271
  **Request:**
222
272
 
223
273
  ```
224
- GET /entities/00416400910670863867
274
+ GET /entities/00416400910670863867/aliases
275
+ ```
276
+
277
+ **Response:**
278
+
279
+ ```json
280
+ {"aliases": ["Apple", "AAPL", "Apple Inc", "Apple Inc."]}
281
+ ```
282
+
283
+ ---
284
+
285
+ ### Get entity name
286
+
287
+ `GET /entities/{neid}/name`
288
+
289
+ Get the canonical display name for an entity by its NEID. Works for all entity types (organizations, people, documents, etc.).
290
+
291
+ #### Parameters
292
+
293
+ | Name | Type | Required | Description |
294
+ |------|------|----------|-------------|
295
+ | neid | string | yes | Named Entity ID (20-character zero-padded) |
296
+
297
+ #### Responses
298
+
299
+ | Status | Description |
300
+ |--------|-------------|
301
+ | 200 | Entity name (`NindexToNameResponse`) |
302
+ | 404 | Entity not found (`Error`) |
303
+
304
+ #### Example
305
+
306
+ **Request:**
307
+
308
+ ```
309
+ GET /entities/05501022040203405417/name
225
310
  ```
226
311
 
227
312
  **Response:**
228
313
 
229
314
  ```json
230
- {"report": {"neid": "00416400910670863867", "name": "Apple", "aliases": ["AAPL", "APPLE", "APPLE INC", "Apple Inc"], "type": "organization"}}
315
+ {"name": "Apple Inc"}
231
316
  ```
232
317
 
233
318
  ---
@@ -279,24 +364,66 @@ eids=["00416400910670863867"]&pids=[8]
279
364
 
280
365
  ## Types
281
366
 
282
- ### GetNamedEntityReportResponse
283
-
284
- Response containing a report about a named entity
367
+ ### BatchEntityNamesResponse
285
368
 
286
369
  | Field | Type | Description |
287
370
  |-------|------|-------------|
288
- | report | `NamedEntityReport` | |
371
+ | errors | string[] | |
372
+ | results | object | |
373
+
374
+ ### Match
289
375
 
290
- ### NamedEntityReport
376
+ | Field | Type | Description |
377
+ |-------|------|-------------|
378
+ | aliases | string[] | Other names for this entity |
379
+ | created | boolean | True if newly created |
380
+ | flavor | string | |
381
+ | name | string | |
382
+ | neid | string | Named Entity ID |
383
+ | score | number | 0.0-1.0 |
291
384
 
292
- The named entity report
385
+ ### Redirect
293
386
 
294
387
  | Field | Type | Description |
295
388
  |-------|------|-------------|
296
- | aliases | string[] | Aliases of the Named Entity from the forwarding map (i.e., from ER) |
297
- | name | string | Name of the Named Entity |
389
+ | canonicalNeid | string | Named Entity ID |
298
390
  | neid | string | Named Entity ID |
299
- | type | string | Entity type (flavor) |
391
+
392
+ ### SearchQuery
393
+
394
+ | Field | Type | Description |
395
+ |-------|------|-------------|
396
+ | context | integer[] | Additional context for disambiguation |
397
+ | contextType | `EntityContextType` | |
398
+ | eventCategory | string | Category of an event, e.g. strategic partnership |
399
+ | eventDate | string | Date of an event, e.g. 2026-01-20 |
400
+ | eventDescription | string | Description of an event |
401
+ | eventLikelihood | string | Likelihood of an event, e.g. confirmed, ongoing, likely, speculative |
402
+ | flavors | string[] | Limit to these flavors if non-empty |
403
+ | query | string | Entity name or strong ID to search for |
404
+ | queryId | integer | User-provided ID for matching with response |
405
+ | snippet | string | Free-text snippet for disambiguating named entities |
406
+ | strongIdProperty | string | Property to use as the strong ID type |
407
+
408
+ ### SearchRequest
409
+
410
+ | Field | Type | Description |
411
+ |-------|------|-------------|
412
+ | includeAliases | boolean | default false |
413
+ | includeFlavors | boolean | default true |
414
+ | includeNames | boolean | default true |
415
+ | includeScores | boolean | default true |
416
+ | maxResults | integer | default 10 |
417
+ | minScore | number | 0.0-1.0, default 0.8 |
418
+ | queries | `SearchQuery`[] | |
419
+
420
+ ### SearchResult
421
+
422
+ | Field | Type | Description |
423
+ |-------|------|-------------|
424
+ | error | string | Set if query failed |
425
+ | matches | `Match`[] | Sorted by decreasing score |
426
+ | queryId | integer | |
300
427
 
301
428
  ### GetPropertyValuesResponse
302
429
 
@@ -18,12 +18,60 @@ Every expression is a JSON object with a `type` field that determines which othe
18
18
 
19
19
  Expressions are passed as URL-encoded form data in the `expression` parameter (NOT as a JSON request body).
20
20
 
21
+ ## Common Mistakes
22
+
23
+ These errors come up repeatedly. Check this section before constructing expressions.
24
+
25
+ ### Using `comparison` to filter by entity type
26
+
27
+ **Wrong** — `comparison` with `pid: 0` fails:
28
+ ```json
29
+ {"type": "comparison", "comparison": {"operator": "eq", "pid": 0, "value": 12}}
30
+ ```
31
+ → Error: "Comparison expression requires pid != 0"
32
+
33
+ **Right** — use `is_type`:
34
+ ```json
35
+ {"type": "is_type", "is_type": {"fid": 12}}
36
+ ```
37
+
38
+ ### Using `string_like` on non-name properties
39
+
40
+ `string_like` **only works on the name property (PID 8)**. Any other PID returns an error.
41
+
42
+ **Wrong:**
43
+ ```json
44
+ {"type": "comparison", "comparison": {"operator": "string_like", "pid": 115, "value": "Politics"}}
45
+ ```
46
+ → Error: "string_like only supports the 'name' property (pid=8)"
47
+
48
+ **Right** — use `eq` for exact matches on other properties, or fetch all results and filter client-side:
49
+ ```json
50
+ {"type": "comparison", "comparison": {"operator": "eq", "pid": 115, "value": "Politics"}}
51
+ ```
52
+
53
+ ### Using `conjunction` / `disjunction` instead of `and` / `or`
54
+
55
+ **Wrong:**
56
+ ```json
57
+ {"type": "conjunction", "conjunction": {"operator": "and", "expressions": [...]}}
58
+ ```
59
+
60
+ **Right:**
61
+ ```json
62
+ {"type": "and", "and": [expression1, expression2]}
63
+ ```
64
+
65
+ ### Using `lt` / `gt` on non-numeric properties
66
+
67
+ `lt` and `gt` only work on `data_int` and `data_float` properties. Using them on strings or categories returns an error.
68
+
21
69
  ## Expression Types
22
70
 
23
71
  | Type | Description | Key Fields | Status |
24
72
  |------|-------------|------------|--------|
25
73
  | `is_type` | Filter entities by type (flavor) | `is_type.fid` (integer) | Implemented |
26
- | `comparison` | Compare a property value | `comparison.operator`, `comparison.pid`, `comparison.value` | Partial -- see operator table below |
74
+ | `comparison` | Compare a property value | `comparison.operator`, `comparison.pid`, `comparison.value` | Partial see operator table and limitations below |
27
75
  | `linked` | Find entities linked via relationships | `linked.distance`, `linked.to_entity`, `linked.pids` | Implemented |
28
76
  | `and` | All sub-expressions must match | `and` (array of expressions) | Implemented |
29
77
  | `or` | At least one sub-expression must match | `or` (array of expressions) | Implemented |
@@ -56,14 +104,16 @@ Compares a property (identified by PID) against a value. Look up PIDs via the sc
56
104
 
57
105
  **Operators:**
58
106
 
59
- | Operator | Description | Value Type | Status |
60
- |----------|-------------|------------|--------|
61
- | `string_like` | Case-insensitive substring match | string | Implemented (name property only) |
62
- | `has_value` | Property has any value (value field not needed) | n/a | Implemented |
63
- | `eq` | Equal to | string, number, or boolean | Implemented (type-aware) |
64
- | `lt` | Less than | number | Implemented (numeric properties only) |
65
- | `gt` | Greater than | number | Implemented (numeric properties only) |
66
- | `regex` | Regular expression match | string (regex pattern) | Not yet implemented |
107
+ | Operator | Description | Value Type | Limitations |
108
+ |----------|-------------|------------|-------------|
109
+ | `string_like` | Case-insensitive substring match | string | **NAME PROPERTY ONLY (PID 8)**. Fails with error on any other PID. Use `eq` for other string properties. |
110
+ | `has_value` | Property has any value (value field not needed) | n/a | |
111
+ | `eq` | Equal to | string, number, or boolean | Type-aware; works on any property |
112
+ | `lt` | Less than | number | Numeric properties only (`data_int`, `data_float`) |
113
+ | `gt` | Greater than | number | Numeric properties only (`data_int`, `data_float`) |
114
+ | `regex` | Regular expression match | string (regex pattern) | **Not yet implemented** — returns error |
115
+
116
+ **Important:** The `pid` field must be non-zero. PID 0 is reserved; use `is_type` to filter by entity type instead of `comparison` with PID 0.
67
117
 
68
118
  ### `linked` -- Relationship Traversal
69
119
 
@@ -0,0 +1,180 @@
1
+ # MCP Tools
2
+
3
+ The Elemental MCP server provides agent-friendly tools for exploring the Lovelace Knowledge Graph. All tools accept entity **names** (resolved automatically), **NEIDs**, or **structured IDs** — no manual PID lookups or NEID zero-padding required.
4
+
5
+ ## When to Use MCP vs REST
6
+
7
+ | Path | Best for | Docs |
8
+ |------|----------|------|
9
+ | **MCP Tools** | Interactive exploration, Cursor agent workflows, multi-step research | This file |
10
+ | **REST API** (`useElementalClient()`) | Building app features, UI components, server routes | entities.md, find.md, schema.md, graph.md |
11
+
12
+ Both paths access the same knowledge graph. MCP tools handle entity resolution,
13
+ property name fuzzy-matching, and NEID formatting automatically — the REST API
14
+ requires you to manage these yourself (see entities.md and schema.md).
15
+
16
+ ## Tools
17
+
18
+ ### elemental_get_schema
19
+
20
+ Discover entity types, properties, and relationships.
21
+
22
+ | Param | Type | Description |
23
+ |-------|------|-------------|
24
+ | flavor | string | Entity type to inspect — fuzzy-matched (e.g. "company" matches "organization"). Omit to list available flavors. |
25
+ | query | string | Natural language search within a flavor's schema (e.g. "revenue"). Requires flavor. |
26
+
27
+ **Usage pattern:**
28
+ 1. Call with no arguments to list available flavors.
29
+ 2. Pick a flavor and call again to see its properties and relationships.
30
+ 3. Add a query to search within a flavor's schema (e.g. "trustee", "revenue").
31
+
32
+ **Response:** When no flavor is given, returns `flavors[]` (name, description). When a flavor is given, returns `properties[]` (name, type, domain_flavors) and `relationships[]` (name, type, domain_flavors, target_flavors). When the input was fuzzy-matched, a `resolution` object explains the rewrite.
33
+
34
+ ### elemental_get_entity
35
+
36
+ Look up an entity and optionally fetch its properties.
37
+
38
+ | Param | Type | Description |
39
+ |-------|------|-------------|
40
+ | entity | string | Entity name or NEID. Required unless entity_id is provided. |
41
+ | entity_id | object | Structured identifier: `{id_type, id}`. Use instead of entity for exact ID lookups. |
42
+ | flavor | string | Disambiguate ambiguous names (e.g. "Apollo" could be a PE firm or healthcare company). |
43
+ | snippet | string | Free-text context for disambiguation (e.g. "the chemical element"). |
44
+ | properties | string[] | Property names to fetch (e.g. `["total_revenue", "industry"]`). Fuzzy-matched. |
45
+ | history | object | Include historical values instead of latest snapshot. Fields: `limit`, `after`, `before`. |
46
+
47
+ **Entity ID types:** `"neid"` for direct NEID lookup; `"company_cik"`, `"ein"`, `"imo_number"`, `"lei_code"`, etc. for strong ID search.
48
+
49
+ **Response:** Returns `entity` with NEID, name, flavor, confidence score, and requested property values. Properties include citation markers (e.g. `[1]`). When history is set, returns `historical_properties` with timestamped value arrays instead.
50
+
51
+ ### elemental_get_related
52
+
53
+ Find entities connected to a center entity via relationships.
54
+
55
+ | Param | Type | Description |
56
+ |-------|------|-------------|
57
+ | entity / entity_id | | Center entity (same as get_entity). |
58
+ | flavor / snippet | | Disambiguation (same as get_entity). |
59
+ | related_flavor | string | **Required.** Type of related entities to find (e.g. "person", "organization", "event"). Fuzzy-matched. |
60
+ | relationship_types | string[] | Filter by relationship type (e.g. `["owns", "board_member_of"]`). Fuzzy-matched. |
61
+ | direction | string | `"outgoing"` (center is subject), `"incoming"` (center is object), or `"both"` (default). |
62
+ | related_properties | string[] | Properties to fetch on each related entity. |
63
+ | time_range | object | Filter by date: `{after, before}` (ISO date strings). |
64
+ | limit | integer | Max related entities to return (default 50). |
65
+
66
+ **Response:** Returns `resolved` (center entity), `relationships[]` (each with NEID, name, flavor, relationship_types, and optional properties), and `total` count.
67
+
68
+ ### elemental_get_relationships
69
+
70
+ Get relationship types and temporal occurrence counts between two specific entities.
71
+
72
+ | Param | Type | Description |
73
+ |-------|------|-------------|
74
+ | source | object | Source entity: `{entity, entity_id, flavor, snippet}`. |
75
+ | target | object | Target entity: same fields as source. |
76
+
77
+ **Response:** Returns `resolved_source`, `resolved_target`, `relationships` (map of relationship type to `{dates[], counts[], total}`), and `summary` (map of type to total count).
78
+
79
+ ### elemental_graph_neighborhood
80
+
81
+ Get the most influential neighbors of an entity.
82
+
83
+ | Param | Type | Description |
84
+ |-------|------|-------------|
85
+ | entity / entity_id | | Center entity. |
86
+ | flavor / snippet | | Disambiguation. |
87
+ | size | integer | Max neighbors to return (default 15). |
88
+ | types | string[] | Filter by entity type. |
89
+ | relationships | string[] | Filter by relationship type. |
90
+ | history | boolean | Include historical neighborhood data (default false). |
91
+
92
+ **Response:** Returns `neighbors[]` (NEID, name, type, influence score, relationship types). When history is true, also returns `history[]` with dated snapshots.
93
+
94
+ ### elemental_graph_sentiment
95
+
96
+ Get sentiment analysis from news articles for an entity.
97
+
98
+ | Param | Type | Description |
99
+ |-------|------|-------------|
100
+ | entity / entity_id | | Entity to analyze. |
101
+ | flavor / snippet | | Disambiguation. |
102
+
103
+ **Response:** Returns `resolved` entity, `time_range`, `sentiment` (time series data), `statistics` (mean, std dev, min, max), and `trend` (direction, magnitude, analysis).
104
+
105
+ ### elemental_get_events
106
+
107
+ Find events related to an entity or search for events by description.
108
+
109
+ | Param | Type | Description |
110
+ |-------|------|-------------|
111
+ | entity / entity_id | | Entity to find events for. |
112
+ | flavor / snippet | | Disambiguation. |
113
+ | query | string | Free-text event search (e.g. "spacex rocket launch"). Alternative to entity. |
114
+ | categories | string[] | Filter by event category (e.g. `["Bankruptcy", "IPO"]`). |
115
+ | time_range | object | Filter by date: `{after, before}`. |
116
+ | include_participants | boolean | Include participant details with roles and sentiment (default false). |
117
+ | limit | integer | Max events to return. |
118
+
119
+ **Response:** Returns `events[]` (category, date, description, likelihood, participants with roles and sentiment), `total` count, and optional `resolved` entity.
120
+
121
+ ### elemental_health
122
+
123
+ Check server health and connectivity.
124
+
125
+ No parameters. Returns health status, version, and uptime.
126
+
127
+ ## Key Capabilities
128
+
129
+ ### Fuzzy Matching
130
+
131
+ All flavor, property, and relationship names are fuzzy-matched. Approximate names work:
132
+
133
+ - "company" matches "organization"
134
+ - "ship" matches "vessel"
135
+ - "revenue" matches "total_revenue"
136
+
137
+ When a name is rewritten, the response includes a `resolution` object explaining
138
+ what happened (e.g. `"company" matched to "organization"`).
139
+
140
+ ### Entity Resolution
141
+
142
+ Every tool that accepts an entity supports three input modes:
143
+
144
+ 1. **Name search** — `entity: "Apple"` resolves via the entity resolver with scored ranking.
145
+ 2. **NEID lookup** — `entity: "00416400910670863867"` bypasses the resolver. NEIDs of 10+ digits are auto-detected.
146
+ 3. **Structured ID** — `entity_id: {id_type: "company_cik", id: "0000320193"}` for exact lookups by CIK, EIN, IMO, LEI, etc.
147
+
148
+ Use `snippet` to help disambiguate common names (e.g. `entity: "Mercury", snippet: "the chemical element"`).
149
+
150
+ Low-confidence matches (below 80%) include a `low_confidence: true` flag and a warning message so the agent can verify before proceeding.
151
+
152
+ ### Citation Tracking
153
+
154
+ Tools automatically track which data sources back each fact. Property values
155
+ include citation markers like `[1]`, `[2]` that reference the bibliography.
156
+
157
+ Retrieve the full bibliography (titles, URLs, dates) with `elemental_get_bibliography`
158
+ or by reading the `session://elemental/bibliography` resource.
159
+
160
+ ## Documentation Resources
161
+
162
+ The MCP server ships embedded documentation as readable resources:
163
+
164
+ | URI | Content |
165
+ |-----|---------|
166
+ | `docs://elemental/guide` | Quick-start: tools, prompts, resources, getting oriented |
167
+ | `docs://elemental/data-model` | Entities, properties, relationships, events, citations |
168
+ | `docs://elemental/workflows` | Multi-step tool patterns for common research tasks |
169
+ | `docs://elemental/schema` | Schema layers, source types, discovery with elemental_get_schema |
170
+ | `session://elemental/bibliography` | All sources accessed in this session (citations) |
171
+
172
+ ## Prompts
173
+
174
+ Pre-built guided workflows available via `prompts/list`:
175
+
176
+ | Prompt | Description | Required args |
177
+ |--------|-------------|---------------|
178
+ | `company-deep-dive` | Structured company report: leadership, financials, corporate structure, events — with citations | `entity` |
179
+ | `blast-radius` | Map ripple effects across connected entities, expanding outward level by level | `entity`; optional `relationship_types`, `depth` |
180
+ | `event-monitor` | Track recent events for one or more entities with cross-entity analysis | `entities`; optional `event_types`, `time_range` |