check_subgraph_freshness
Verify subgraph freshness by measuring lag from chainhead before relying on current data, preventing stale responses.
Instructions
Report how far behind chainhead a subgraph is, by reading its _meta block. Worth calling before trusting any 'current' or 'latest' number, because a lagging subgraph returns stale data rather than an error — it succeeds, it is just answering about the past.
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": {
"subgraph": "<subgraph>"
},
"name": "check_subgraph_freshness"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| subgraph | Yes | Which subgraph to check |