subgraph-registry-mcp 0.7.2 → 0.8.0
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.
- package/README.md +68 -3
- package/data/openapi.json +600 -0
- package/openapi.yaml +390 -0
- package/package.json +6 -2
- package/src/index.js +520 -12
package/README.md
CHANGED
|
@@ -8,6 +8,11 @@ Agent-friendly semantic classification of all subgraphs on [The Graph Network](h
|
|
|
8
8
|
|
|
9
9
|
Pre-computed index of **14,700+ subgraphs** with domain classification, protocol type detection, schema fingerprinting, canonical entity mapping, and composite reliability scoring.
|
|
10
10
|
|
|
11
|
+
> **What's new in 0.8.0** — three agent-discovery upgrades:
|
|
12
|
+
> - **[Semantic search](#semantic-search)** via 384-dim embeddings (`semantic_search_subgraphs`)
|
|
13
|
+
> - **[Schema evolution tracking](#schema-evolution)** with stability days surfaced on every result (`get_schema_changes`)
|
|
14
|
+
> - **[OpenAPI 3.1 spec](#openapi)** auto-generated for MCP tools + REST routes, served at `/.well-known/openapi.json`
|
|
15
|
+
|
|
11
16
|
## The Problem
|
|
12
17
|
|
|
13
18
|
Agents querying The Graph need to discover and select the right subgraph before they can query data. Today this requires 3-4 tool calls (search, check volumes, fetch schema, infer structure) before any real work happens. This registry flips that: agents start with structured knowledge, not a blank slate.
|
|
@@ -162,11 +167,13 @@ The registry is available as an MCP server with **dual transport** — stdio for
|
|
|
162
167
|
|
|
163
168
|
> The shipped server is the Node implementation in [`src/index.js`](src/index.js); that's what `npx subgraph-registry-mcp` runs and what's published to npm. A Python equivalent in [`python/mcp_server.py`](python/mcp_server.py) is kept for local development against the same SQLite database — bug fixes and new tools should land in the Node version first.
|
|
164
169
|
|
|
165
|
-
**
|
|
170
|
+
**6 tools:**
|
|
166
171
|
- **search_subgraphs** — filter by domain, network, protocol type, entity, or keyword
|
|
167
|
-
- **recommend_subgraph** — natural language goal to best subgraphs
|
|
168
|
-
- **get_subgraph_detail** — full classification for a specific subgraph
|
|
172
|
+
- **recommend_subgraph** — natural language goal to best subgraphs (includes `schema_stable_days`)
|
|
173
|
+
- **get_subgraph_detail** — full classification for a specific subgraph (includes `schema_changed_at`)
|
|
169
174
|
- **list_registry_stats** — registry overview (domains, networks, counts)
|
|
175
|
+
- **semantic_search_subgraphs** — vector-similarity search over precomputed embeddings (sentence-transformers/all-MiniLM-L6-v2, 384-dim). Use for fuzzy/paraphrased goals where literal keyword match would miss.
|
|
176
|
+
- **get_schema_changes** — chronological schema-fingerprint history for a subgraph (one row per detected change). Helps agents prefer mature subgraphs whose data contract has been stable.
|
|
170
177
|
|
|
171
178
|
### Install
|
|
172
179
|
|
|
@@ -215,6 +222,64 @@ curl http://localhost:3848/.well-known/subgraph/5zvR82QoaXYFyDEKLZ9t6v9adgnptxYp
|
|
|
215
222
|
|
|
216
223
|
---
|
|
217
224
|
|
|
225
|
+
## Semantic Search
|
|
226
|
+
|
|
227
|
+
Every subgraph has a precomputed 384-dim embedding from `sentence-transformers/all-MiniLM-L6-v2`, built from its display name, description, canonical entities, top schema entity names, and protocol metadata. At MCP-tool-call time the Node server embeds the query string with the same model (via [@xenova/transformers](https://github.com/xenova/transformers.js), quantized ONNX bundled in the npm package — no first-call download) and ranks rows by cosine similarity.
|
|
228
|
+
|
|
229
|
+
```js
|
|
230
|
+
const { subgraphs } = await mcp.call("semantic_search_subgraphs", {
|
|
231
|
+
query: "lending positions near liquidation on a Layer 2",
|
|
232
|
+
limit: 5,
|
|
233
|
+
});
|
|
234
|
+
// subgraphs[i].semantic_score is cosine similarity in [0, 1]; >0.5 ~= strong match.
|
|
235
|
+
```
|
|
236
|
+
|
|
237
|
+
Use it when:
|
|
238
|
+
- The goal is paraphrased or use-case-shaped (`search_subgraphs` is keyword-only).
|
|
239
|
+
- You're exploring "what data exists for X?" rather than fetching a specific protocol's subgraph.
|
|
240
|
+
|
|
241
|
+
Same model is shared between Python crawl-time (`fastembed`) and JS runtime (`@xenova/transformers`) — vectors are bitwise-comparable so cosine math gives consistent rankings across runtimes.
|
|
242
|
+
|
|
243
|
+
Embeddings add ~22 MB to `registry.db` (14k × 384 × 4 bytes); model bundle adds ~23 MB to the npm package.
|
|
244
|
+
|
|
245
|
+
---
|
|
246
|
+
|
|
247
|
+
## Schema Evolution
|
|
248
|
+
|
|
249
|
+
Each crawl computes a `schema_fingerprint` (MD5 of sorted `entity:field_count` pairs) per subgraph. Whenever the fingerprint changes from the previous sync, an immutable row is written to `schema_history`. The table is append-only and survives full DB rebuilds.
|
|
250
|
+
|
|
251
|
+
```js
|
|
252
|
+
const history = await mcp.call("get_schema_changes", {
|
|
253
|
+
subgraph_id: "5zvR82QoaXYFyDEKLZ9t6v9adgnptxYpKpSbxtgVENFV",
|
|
254
|
+
});
|
|
255
|
+
// {
|
|
256
|
+
// total_changes: 3,
|
|
257
|
+
// stable_days: 47.2,
|
|
258
|
+
// changed_within_24h: false,
|
|
259
|
+
// changed_within_7d: false,
|
|
260
|
+
// changes: [
|
|
261
|
+
// { fingerprint: "abc123...", prev_fingerprint: "def456...", detected_at: 1717... },
|
|
262
|
+
// ...
|
|
263
|
+
// ]
|
|
264
|
+
// }
|
|
265
|
+
```
|
|
266
|
+
|
|
267
|
+
`recommend_subgraph` and `get_subgraph_detail` results now also include `schema_changed_at` (unix seconds of last detected change) and `schema_stable_days` so agents can prefer subgraphs whose data contract has been stable longer — useful when a query needs to keep working across the agent's planning horizon.
|
|
268
|
+
|
|
269
|
+
---
|
|
270
|
+
|
|
271
|
+
## OpenAPI
|
|
272
|
+
|
|
273
|
+
The full API surface (MCP tools + REST routes) is published as OpenAPI 3.1:
|
|
274
|
+
|
|
275
|
+
- `openapi.yaml` — checked into the repo, single source of truth
|
|
276
|
+
- `data/openapi.json` — bundled with the npm tarball
|
|
277
|
+
- `GET /.well-known/openapi.json` — served by the HTTP transport for live discovery
|
|
278
|
+
|
|
279
|
+
The spec is regenerated on every release from the declarative `TOOLS[]` + `REST_ROUTES[]` exports in [`src/index.js`](src/index.js) via [`scripts/gen-openapi.js`](scripts/gen-openapi.js). CI fails any PR that touches `src/index.js` without regenerating the spec.
|
|
280
|
+
|
|
281
|
+
---
|
|
282
|
+
|
|
218
283
|
## REST API
|
|
219
284
|
|
|
220
285
|
```
|
|
@@ -0,0 +1,600 @@
|
|
|
1
|
+
{
|
|
2
|
+
"openapi": "3.1.0",
|
|
3
|
+
"info": {
|
|
4
|
+
"title": "Subgraph Registry",
|
|
5
|
+
"description": "Agent-friendly subgraph discovery on The Graph Network. 14,700+ classified subgraphs with semantic search, reliability scoring, schema-evolution tracking, and x402 query URLs ($0.01 USDC on Base, no API key).",
|
|
6
|
+
"version": "0.7.2",
|
|
7
|
+
"license": {
|
|
8
|
+
"name": "MIT"
|
|
9
|
+
},
|
|
10
|
+
"contact": {
|
|
11
|
+
"name": "PaulieB14",
|
|
12
|
+
"url": "https://github.com/PaulieB14/subgraph-registry"
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
"servers": [
|
|
16
|
+
{
|
|
17
|
+
"url": "http://localhost:3848",
|
|
18
|
+
"description": "Local MCP HTTP transport (default port)"
|
|
19
|
+
}
|
|
20
|
+
],
|
|
21
|
+
"paths": {
|
|
22
|
+
"/mcp/tools/search_subgraphs": {
|
|
23
|
+
"post": {
|
|
24
|
+
"operationId": "tool_search_subgraphs",
|
|
25
|
+
"summary": "Search and filter the classified subgraph registry (15,500+ subgraphs).",
|
|
26
|
+
"description": "Search and filter the classified subgraph registry (15,500+ subgraphs). Filter by domain (defi, nfts, dao, gaming, identity, infrastructure, social, analytics), network (mainnet, arbitrum-one, base, matic, bsc, optimism, avalanche), protocol_type (dex, lending, bridge, staking, options, perpetuals, nft-marketplace, yield-aggregator, governance, name-service), canonical entity type (liquidity_pool, trade, token, position, vault, loan, collateral, liquidation, nft_collection, nft_item, nft_sale, proposal, delegate, domain_name, account, transaction, daily_snapshot, hourly_snapshot), or free-text keyword. Returns subgraphs ranked by reliability score. Each result includes query_url_x402 (POST GraphQL and pay $0.01 USDC on Base per query — no API key needed) and a legacy query_url (Studio API key required).",
|
|
27
|
+
"tags": [
|
|
28
|
+
"mcp-tools"
|
|
29
|
+
],
|
|
30
|
+
"requestBody": {
|
|
31
|
+
"required": false,
|
|
32
|
+
"content": {
|
|
33
|
+
"application/json": {
|
|
34
|
+
"schema": {
|
|
35
|
+
"type": "object",
|
|
36
|
+
"additionalProperties": false,
|
|
37
|
+
"properties": {
|
|
38
|
+
"query": {
|
|
39
|
+
"type": "string",
|
|
40
|
+
"description": "Free-text search across names and descriptions"
|
|
41
|
+
},
|
|
42
|
+
"domain": {
|
|
43
|
+
"type": "string",
|
|
44
|
+
"description": "Filter by domain: defi, nfts, dao, gaming, identity, infrastructure, social, analytics"
|
|
45
|
+
},
|
|
46
|
+
"network": {
|
|
47
|
+
"type": "string",
|
|
48
|
+
"description": "Filter by chain: mainnet, arbitrum-one, base, matic, bsc, optimism, avalanche, etc."
|
|
49
|
+
},
|
|
50
|
+
"protocol_type": {
|
|
51
|
+
"type": "string",
|
|
52
|
+
"description": "Filter by protocol type: dex, lending, bridge, staking, options, perpetuals, etc."
|
|
53
|
+
},
|
|
54
|
+
"entity": {
|
|
55
|
+
"type": "string",
|
|
56
|
+
"description": "Filter by canonical entity: liquidity_pool, trade, token, position, vault, loan, etc."
|
|
57
|
+
},
|
|
58
|
+
"min_reliability": {
|
|
59
|
+
"type": "number",
|
|
60
|
+
"description": "Minimum reliability score (0-1). Higher = more query fees, volume, curation signal, and indexer allocation."
|
|
61
|
+
},
|
|
62
|
+
"limit": {
|
|
63
|
+
"type": "integer",
|
|
64
|
+
"description": "Max results to return (default: 20)",
|
|
65
|
+
"default": 20
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
},
|
|
72
|
+
"responses": {
|
|
73
|
+
"200": {
|
|
74
|
+
"description": "Tool result (JSON-encoded)",
|
|
75
|
+
"content": {
|
|
76
|
+
"application/json": {
|
|
77
|
+
"schema": {
|
|
78
|
+
"type": "object"
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
},
|
|
83
|
+
"400": {
|
|
84
|
+
"description": "Invalid input",
|
|
85
|
+
"content": {
|
|
86
|
+
"application/json": {
|
|
87
|
+
"schema": {
|
|
88
|
+
"$ref": "#/components/schemas/ToolError"
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
},
|
|
96
|
+
"/mcp/tools/recommend_subgraph": {
|
|
97
|
+
"post": {
|
|
98
|
+
"operationId": "tool_recommend_subgraph",
|
|
99
|
+
"summary": "Given a natural-language goal like 'find DEX trades on Arbitrum' or 'get lending liquidation data', returns the best…",
|
|
100
|
+
"description": "Given a natural-language goal like 'find DEX trades on Arbitrum' or 'get lending liquidation data', returns the best matching subgraphs with reliability scores. Automatically infers domain and protocol type from the goal. Each result includes query_url_x402 (preferred — POST GraphQL, pay $0.01 USDC on Base per query, no API key) and a legacy query_url for Studio-key flows.",
|
|
101
|
+
"tags": [
|
|
102
|
+
"mcp-tools"
|
|
103
|
+
],
|
|
104
|
+
"requestBody": {
|
|
105
|
+
"required": true,
|
|
106
|
+
"content": {
|
|
107
|
+
"application/json": {
|
|
108
|
+
"schema": {
|
|
109
|
+
"type": "object",
|
|
110
|
+
"additionalProperties": false,
|
|
111
|
+
"properties": {
|
|
112
|
+
"goal": {
|
|
113
|
+
"type": "string",
|
|
114
|
+
"description": "What you want to do, e.g. 'query Uniswap pool data on Base'"
|
|
115
|
+
},
|
|
116
|
+
"chain": {
|
|
117
|
+
"type": "string",
|
|
118
|
+
"description": "Optional chain filter: mainnet, arbitrum-one, base, matic, etc."
|
|
119
|
+
}
|
|
120
|
+
},
|
|
121
|
+
"required": [
|
|
122
|
+
"goal"
|
|
123
|
+
]
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
},
|
|
128
|
+
"responses": {
|
|
129
|
+
"200": {
|
|
130
|
+
"description": "Tool result (JSON-encoded)",
|
|
131
|
+
"content": {
|
|
132
|
+
"application/json": {
|
|
133
|
+
"schema": {
|
|
134
|
+
"type": "object"
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
},
|
|
139
|
+
"400": {
|
|
140
|
+
"description": "Invalid input",
|
|
141
|
+
"content": {
|
|
142
|
+
"application/json": {
|
|
143
|
+
"schema": {
|
|
144
|
+
"$ref": "#/components/schemas/ToolError"
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
},
|
|
152
|
+
"/mcp/tools/get_subgraph_detail": {
|
|
153
|
+
"post": {
|
|
154
|
+
"operationId": "tool_get_subgraph_detail",
|
|
155
|
+
"summary": "Get full classification detail for a specific subgraph by its subgraph ID or IPFS hash.",
|
|
156
|
+
"description": "Get full classification detail for a specific subgraph by its subgraph ID or IPFS hash. Returns domain, protocol type, canonical entities, all entity names with field counts, reliability score, signal data, both query URLs (x402 and legacy), the x402 pricing manifest ($0.01 USDC on Base), and step-by-step instructions for both query paths.",
|
|
157
|
+
"tags": [
|
|
158
|
+
"mcp-tools"
|
|
159
|
+
],
|
|
160
|
+
"requestBody": {
|
|
161
|
+
"required": true,
|
|
162
|
+
"content": {
|
|
163
|
+
"application/json": {
|
|
164
|
+
"schema": {
|
|
165
|
+
"type": "object",
|
|
166
|
+
"additionalProperties": false,
|
|
167
|
+
"properties": {
|
|
168
|
+
"subgraph_id": {
|
|
169
|
+
"type": "string",
|
|
170
|
+
"description": "Subgraph ID or IPFS hash (Qm...)"
|
|
171
|
+
}
|
|
172
|
+
},
|
|
173
|
+
"required": [
|
|
174
|
+
"subgraph_id"
|
|
175
|
+
]
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
},
|
|
180
|
+
"responses": {
|
|
181
|
+
"200": {
|
|
182
|
+
"description": "Tool result (JSON-encoded)",
|
|
183
|
+
"content": {
|
|
184
|
+
"application/json": {
|
|
185
|
+
"schema": {
|
|
186
|
+
"type": "object"
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
},
|
|
191
|
+
"400": {
|
|
192
|
+
"description": "Invalid input",
|
|
193
|
+
"content": {
|
|
194
|
+
"application/json": {
|
|
195
|
+
"schema": {
|
|
196
|
+
"$ref": "#/components/schemas/ToolError"
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
},
|
|
204
|
+
"/mcp/tools/list_registry_stats": {
|
|
205
|
+
"post": {
|
|
206
|
+
"operationId": "tool_list_registry_stats",
|
|
207
|
+
"summary": "Get an overview of the subgraph registry: total count, available domains, networks, and protocol types with counts.",
|
|
208
|
+
"description": "Get an overview of the subgraph registry: total count, available domains, networks, and protocol types with counts. Use this to understand what data is available before searching.",
|
|
209
|
+
"tags": [
|
|
210
|
+
"mcp-tools"
|
|
211
|
+
],
|
|
212
|
+
"requestBody": {
|
|
213
|
+
"required": false,
|
|
214
|
+
"content": {
|
|
215
|
+
"application/json": {
|
|
216
|
+
"schema": {
|
|
217
|
+
"type": "object",
|
|
218
|
+
"additionalProperties": false,
|
|
219
|
+
"properties": {}
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
},
|
|
224
|
+
"responses": {
|
|
225
|
+
"200": {
|
|
226
|
+
"description": "Tool result (JSON-encoded)",
|
|
227
|
+
"content": {
|
|
228
|
+
"application/json": {
|
|
229
|
+
"schema": {
|
|
230
|
+
"type": "object"
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
},
|
|
235
|
+
"400": {
|
|
236
|
+
"description": "Invalid input",
|
|
237
|
+
"content": {
|
|
238
|
+
"application/json": {
|
|
239
|
+
"schema": {
|
|
240
|
+
"$ref": "#/components/schemas/ToolError"
|
|
241
|
+
}
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
|
+
},
|
|
248
|
+
"/mcp/tools/semantic_search_subgraphs": {
|
|
249
|
+
"post": {
|
|
250
|
+
"operationId": "tool_semantic_search_subgraphs",
|
|
251
|
+
"summary": "Semantic vector search over the subgraph registry.",
|
|
252
|
+
"description": "Semantic vector search over the subgraph registry. Embeds the query string with sentence-transformers/all-MiniLM-L6-v2 (the same model architecture used at crawl time; the runtime uses an INT8-quantized ONNX build so absolute scores can drift ~0.01-0.03 from the float32 reference but top-K rankings are stable) and ranks subgraphs by cosine similarity against the precomputed 384-dim embedding of each subgraph's description + entities + protocol metadata. Prefer this over search_subgraphs when the goal is fuzzy, paraphrased, or describes a use-case rather than a literal protocol/entity name. Supports the same domain/network/protocol_type/min_reliability pre-filters as search_subgraphs (applied as SQL WHERE before cosine scoring for performance). Returns the same shape as search_subgraphs plus a `semantic_score` in [0,1] (>0.5 is typically a strong match).",
|
|
253
|
+
"tags": [
|
|
254
|
+
"mcp-tools"
|
|
255
|
+
],
|
|
256
|
+
"requestBody": {
|
|
257
|
+
"required": true,
|
|
258
|
+
"content": {
|
|
259
|
+
"application/json": {
|
|
260
|
+
"schema": {
|
|
261
|
+
"type": "object",
|
|
262
|
+
"additionalProperties": false,
|
|
263
|
+
"properties": {
|
|
264
|
+
"query": {
|
|
265
|
+
"type": "string",
|
|
266
|
+
"description": "Natural-language description of the data the agent wants to query, e.g. 'on-chain options market activity' or 'lending positions near liquidation'"
|
|
267
|
+
},
|
|
268
|
+
"limit": {
|
|
269
|
+
"type": "integer",
|
|
270
|
+
"description": "Max results to return (default 10, max 50)",
|
|
271
|
+
"default": 10,
|
|
272
|
+
"minimum": 1,
|
|
273
|
+
"maximum": 50
|
|
274
|
+
},
|
|
275
|
+
"min_score": {
|
|
276
|
+
"type": "number",
|
|
277
|
+
"description": "Minimum cosine similarity to include (0-1). Default 0.3.",
|
|
278
|
+
"default": 0.3
|
|
279
|
+
},
|
|
280
|
+
"include_unserved": {
|
|
281
|
+
"type": "boolean",
|
|
282
|
+
"description": "Include subgraphs with 0 active indexer allocations (returns 'no allocations' on query). Default false.",
|
|
283
|
+
"default": false
|
|
284
|
+
},
|
|
285
|
+
"domain": {
|
|
286
|
+
"type": "string",
|
|
287
|
+
"description": "Pre-filter by domain (defi, nfts, dao, gaming, identity, infrastructure, social, analytics)"
|
|
288
|
+
},
|
|
289
|
+
"network": {
|
|
290
|
+
"type": "string",
|
|
291
|
+
"description": "Pre-filter by chain (mainnet, arbitrum-one, base, matic, bsc, optimism, avalanche, etc.)"
|
|
292
|
+
},
|
|
293
|
+
"protocol_type": {
|
|
294
|
+
"type": "string",
|
|
295
|
+
"description": "Pre-filter by protocol type (dex, lending, bridge, staking, options, perpetuals, etc.)"
|
|
296
|
+
},
|
|
297
|
+
"min_reliability": {
|
|
298
|
+
"type": "number",
|
|
299
|
+
"description": "Pre-filter: minimum reliability score (0-1)."
|
|
300
|
+
}
|
|
301
|
+
},
|
|
302
|
+
"required": [
|
|
303
|
+
"query"
|
|
304
|
+
]
|
|
305
|
+
}
|
|
306
|
+
}
|
|
307
|
+
}
|
|
308
|
+
},
|
|
309
|
+
"responses": {
|
|
310
|
+
"200": {
|
|
311
|
+
"description": "Tool result (JSON-encoded)",
|
|
312
|
+
"content": {
|
|
313
|
+
"application/json": {
|
|
314
|
+
"schema": {
|
|
315
|
+
"type": "object"
|
|
316
|
+
}
|
|
317
|
+
}
|
|
318
|
+
}
|
|
319
|
+
},
|
|
320
|
+
"400": {
|
|
321
|
+
"description": "Invalid input",
|
|
322
|
+
"content": {
|
|
323
|
+
"application/json": {
|
|
324
|
+
"schema": {
|
|
325
|
+
"$ref": "#/components/schemas/ToolError"
|
|
326
|
+
}
|
|
327
|
+
}
|
|
328
|
+
}
|
|
329
|
+
}
|
|
330
|
+
}
|
|
331
|
+
}
|
|
332
|
+
},
|
|
333
|
+
"/mcp/tools/get_schema_changes": {
|
|
334
|
+
"post": {
|
|
335
|
+
"operationId": "tool_get_schema_changes",
|
|
336
|
+
"summary": "Return chronological schema-fingerprint changes for a subgraph.",
|
|
337
|
+
"description": "Return chronological schema-fingerprint changes for a subgraph. Each row is one detected fingerprint change with prev_fingerprint, fingerprint, and detected_at (unix seconds). Use to assess schema stability before depending on a subgraph: a long stable_days value means the schema contract is mature; a recent changed_within_24h means the upstream protocol just shipped a schema update and queries may need to be revisited.",
|
|
338
|
+
"tags": [
|
|
339
|
+
"mcp-tools"
|
|
340
|
+
],
|
|
341
|
+
"requestBody": {
|
|
342
|
+
"required": true,
|
|
343
|
+
"content": {
|
|
344
|
+
"application/json": {
|
|
345
|
+
"schema": {
|
|
346
|
+
"type": "object",
|
|
347
|
+
"additionalProperties": false,
|
|
348
|
+
"properties": {
|
|
349
|
+
"subgraph_id": {
|
|
350
|
+
"type": "string",
|
|
351
|
+
"description": "Subgraph ID (the same id used by other tools)"
|
|
352
|
+
},
|
|
353
|
+
"since_timestamp": {
|
|
354
|
+
"type": "integer",
|
|
355
|
+
"description": "Only return changes detected at or after this unix timestamp (seconds). Default 0 (full history).",
|
|
356
|
+
"default": 0
|
|
357
|
+
}
|
|
358
|
+
},
|
|
359
|
+
"required": [
|
|
360
|
+
"subgraph_id"
|
|
361
|
+
]
|
|
362
|
+
}
|
|
363
|
+
}
|
|
364
|
+
}
|
|
365
|
+
},
|
|
366
|
+
"responses": {
|
|
367
|
+
"200": {
|
|
368
|
+
"description": "Tool result (JSON-encoded)",
|
|
369
|
+
"content": {
|
|
370
|
+
"application/json": {
|
|
371
|
+
"schema": {
|
|
372
|
+
"type": "object"
|
|
373
|
+
}
|
|
374
|
+
}
|
|
375
|
+
}
|
|
376
|
+
},
|
|
377
|
+
"400": {
|
|
378
|
+
"description": "Invalid input",
|
|
379
|
+
"content": {
|
|
380
|
+
"application/json": {
|
|
381
|
+
"schema": {
|
|
382
|
+
"$ref": "#/components/schemas/ToolError"
|
|
383
|
+
}
|
|
384
|
+
}
|
|
385
|
+
}
|
|
386
|
+
}
|
|
387
|
+
}
|
|
388
|
+
}
|
|
389
|
+
},
|
|
390
|
+
"/health": {
|
|
391
|
+
"get": {
|
|
392
|
+
"operationId": "rest_get_health",
|
|
393
|
+
"summary": "Liveness probe + total subgraph count",
|
|
394
|
+
"tags": [
|
|
395
|
+
"rest"
|
|
396
|
+
],
|
|
397
|
+
"responses": {
|
|
398
|
+
"200": {
|
|
399
|
+
"description": "Success",
|
|
400
|
+
"content": {
|
|
401
|
+
"application/json": {
|
|
402
|
+
"schema": {
|
|
403
|
+
"type": "object",
|
|
404
|
+
"properties": {
|
|
405
|
+
"status": {
|
|
406
|
+
"type": "string",
|
|
407
|
+
"enum": [
|
|
408
|
+
"ok"
|
|
409
|
+
]
|
|
410
|
+
},
|
|
411
|
+
"subgraphs": {
|
|
412
|
+
"type": "integer"
|
|
413
|
+
}
|
|
414
|
+
},
|
|
415
|
+
"required": [
|
|
416
|
+
"status",
|
|
417
|
+
"subgraphs"
|
|
418
|
+
]
|
|
419
|
+
}
|
|
420
|
+
}
|
|
421
|
+
}
|
|
422
|
+
},
|
|
423
|
+
"404": {
|
|
424
|
+
"description": "Not found",
|
|
425
|
+
"content": {
|
|
426
|
+
"application/json": {
|
|
427
|
+
"schema": {
|
|
428
|
+
"$ref": "#/components/schemas/ToolError"
|
|
429
|
+
}
|
|
430
|
+
}
|
|
431
|
+
}
|
|
432
|
+
}
|
|
433
|
+
}
|
|
434
|
+
}
|
|
435
|
+
},
|
|
436
|
+
"/.well-known/subgraph/{id}.jsonld": {
|
|
437
|
+
"get": {
|
|
438
|
+
"operationId": "rest_get_well_known_subgraph_id_jsonld",
|
|
439
|
+
"summary": "JSON-LD manifest for a single subgraph (canonical location)",
|
|
440
|
+
"tags": [
|
|
441
|
+
"rest"
|
|
442
|
+
],
|
|
443
|
+
"parameters": [
|
|
444
|
+
{
|
|
445
|
+
"name": "id",
|
|
446
|
+
"in": "path",
|
|
447
|
+
"required": true,
|
|
448
|
+
"schema": {
|
|
449
|
+
"type": "string"
|
|
450
|
+
}
|
|
451
|
+
}
|
|
452
|
+
],
|
|
453
|
+
"responses": {
|
|
454
|
+
"200": {
|
|
455
|
+
"description": "JSON-LD SubgraphDeployment manifest",
|
|
456
|
+
"content": {
|
|
457
|
+
"application/json": {
|
|
458
|
+
"schema": {
|
|
459
|
+
"type": "object",
|
|
460
|
+
"description": "JSON-LD SubgraphDeployment manifest"
|
|
461
|
+
}
|
|
462
|
+
}
|
|
463
|
+
}
|
|
464
|
+
},
|
|
465
|
+
"404": {
|
|
466
|
+
"description": "Not found",
|
|
467
|
+
"content": {
|
|
468
|
+
"application/json": {
|
|
469
|
+
"schema": {
|
|
470
|
+
"$ref": "#/components/schemas/ToolError"
|
|
471
|
+
}
|
|
472
|
+
}
|
|
473
|
+
}
|
|
474
|
+
}
|
|
475
|
+
}
|
|
476
|
+
}
|
|
477
|
+
},
|
|
478
|
+
"/subgraphs/{id}.jsonld": {
|
|
479
|
+
"get": {
|
|
480
|
+
"operationId": "rest_get_subgraphs_id_jsonld",
|
|
481
|
+
"summary": "JSON-LD manifest alias (same payload as /.well-known/...)",
|
|
482
|
+
"tags": [
|
|
483
|
+
"rest"
|
|
484
|
+
],
|
|
485
|
+
"parameters": [
|
|
486
|
+
{
|
|
487
|
+
"name": "id",
|
|
488
|
+
"in": "path",
|
|
489
|
+
"required": true,
|
|
490
|
+
"schema": {
|
|
491
|
+
"type": "string"
|
|
492
|
+
}
|
|
493
|
+
}
|
|
494
|
+
],
|
|
495
|
+
"responses": {
|
|
496
|
+
"200": {
|
|
497
|
+
"description": "JSON-LD SubgraphDeployment manifest",
|
|
498
|
+
"content": {
|
|
499
|
+
"application/json": {
|
|
500
|
+
"schema": {
|
|
501
|
+
"type": "object",
|
|
502
|
+
"description": "JSON-LD SubgraphDeployment manifest"
|
|
503
|
+
}
|
|
504
|
+
}
|
|
505
|
+
}
|
|
506
|
+
},
|
|
507
|
+
"404": {
|
|
508
|
+
"description": "Not found",
|
|
509
|
+
"content": {
|
|
510
|
+
"application/json": {
|
|
511
|
+
"schema": {
|
|
512
|
+
"$ref": "#/components/schemas/ToolError"
|
|
513
|
+
}
|
|
514
|
+
}
|
|
515
|
+
}
|
|
516
|
+
}
|
|
517
|
+
}
|
|
518
|
+
}
|
|
519
|
+
},
|
|
520
|
+
"/.well-known/subgraph-index.jsonld": {
|
|
521
|
+
"get": {
|
|
522
|
+
"operationId": "rest_get_well_known_subgraph_index_jsonld",
|
|
523
|
+
"summary": "Top-100 subgraphs by reliability with their manifest URLs",
|
|
524
|
+
"tags": [
|
|
525
|
+
"rest"
|
|
526
|
+
],
|
|
527
|
+
"responses": {
|
|
528
|
+
"200": {
|
|
529
|
+
"description": "JSON-LD SubgraphIndex",
|
|
530
|
+
"content": {
|
|
531
|
+
"application/json": {
|
|
532
|
+
"schema": {
|
|
533
|
+
"type": "object",
|
|
534
|
+
"description": "JSON-LD SubgraphIndex"
|
|
535
|
+
}
|
|
536
|
+
}
|
|
537
|
+
}
|
|
538
|
+
},
|
|
539
|
+
"404": {
|
|
540
|
+
"description": "Not found",
|
|
541
|
+
"content": {
|
|
542
|
+
"application/json": {
|
|
543
|
+
"schema": {
|
|
544
|
+
"$ref": "#/components/schemas/ToolError"
|
|
545
|
+
}
|
|
546
|
+
}
|
|
547
|
+
}
|
|
548
|
+
}
|
|
549
|
+
}
|
|
550
|
+
}
|
|
551
|
+
},
|
|
552
|
+
"/.well-known/openapi.json": {
|
|
553
|
+
"get": {
|
|
554
|
+
"operationId": "rest_get_well_known_openapi_json",
|
|
555
|
+
"summary": "This OpenAPI spec, self-served for discovery",
|
|
556
|
+
"tags": [
|
|
557
|
+
"rest"
|
|
558
|
+
],
|
|
559
|
+
"responses": {
|
|
560
|
+
"200": {
|
|
561
|
+
"description": "OpenAPI 3.1 document",
|
|
562
|
+
"content": {
|
|
563
|
+
"application/json": {
|
|
564
|
+
"schema": {
|
|
565
|
+
"type": "object",
|
|
566
|
+
"description": "OpenAPI 3.1 document"
|
|
567
|
+
}
|
|
568
|
+
}
|
|
569
|
+
}
|
|
570
|
+
},
|
|
571
|
+
"404": {
|
|
572
|
+
"description": "Not found",
|
|
573
|
+
"content": {
|
|
574
|
+
"application/json": {
|
|
575
|
+
"schema": {
|
|
576
|
+
"$ref": "#/components/schemas/ToolError"
|
|
577
|
+
}
|
|
578
|
+
}
|
|
579
|
+
}
|
|
580
|
+
}
|
|
581
|
+
}
|
|
582
|
+
}
|
|
583
|
+
}
|
|
584
|
+
},
|
|
585
|
+
"components": {
|
|
586
|
+
"schemas": {
|
|
587
|
+
"ToolError": {
|
|
588
|
+
"type": "object",
|
|
589
|
+
"properties": {
|
|
590
|
+
"error": {
|
|
591
|
+
"type": "string"
|
|
592
|
+
}
|
|
593
|
+
},
|
|
594
|
+
"required": [
|
|
595
|
+
"error"
|
|
596
|
+
]
|
|
597
|
+
}
|
|
598
|
+
}
|
|
599
|
+
}
|
|
600
|
+
}
|